Re: Copy constructor and assignment operator

2018-09-15 Thread MRAB
On 2018-09-15 19:47, Ajay Patel wrote: I have created below code and i want to restrict an object copy. What are the methods called for copy constructor and assignment operator? Basically i don't want to allow below operation. p = Point(1,3) p2 = Point(6,7) => How to disallow below operations

Re: Add header at top with email.message

2018-09-15 Thread Jason Friedman
> > the EmailMessage class of email.message provides the methods > add_header() and __setitem__() to add a header to a message. > add_header() effectively calls __setitem__(), which does > `self._headers.append(self.policy.header_store_parse(name, val))`. This > inserts the header at the bottom. >

Copy constructor and assignment operator

2018-09-15 Thread Ajay Patel
I have created below code and i want to restrict an object copy. What are the methods called for copy constructor and assignment operator? Basically i don't want to allow below operation. p = Point(1,3) p2 = Point(6,7) => How to disallow below operations? p(p2) p = p2 Please point out a

Re: Experiences with a programming exercise

2018-09-15 Thread Alister via Python-list
On Sat, 15 Sep 2018 17:08:57 +, Stefan Ram wrote: > I gave two different functions: > > def triangle(): > for i in range( 3 ): > forward( 99 ); left( 360/3 ) > > def rectangle() > for i in range( 4 ): > forward( 99 ); left( 360/4 ) > > , and the exercise was to wri

python3.7 - how to open a new thread and close the old each click on a button?

2018-09-15 Thread alon . najman
hii all, python3.7 - how to open a new thread and close the old each click on a button? here is my code: # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'AlonStockMarket.ui' # # Created by: PyQt5 UI code generator 5.11.2 # # WARNING! All c

Re: Fumbling with emacs + elpy + flake8

2018-09-15 Thread Martin Schöön
Den 2018-09-14 skrev Toni Sissala : > I'm on Ubuntu 16.04. I found out that flake8 did not play well with > emacs if installed with --user option, nor when installed in a virtual > environment. Didn't research any further, since I got it working with > plain pip3 install flake8 > Toni, your ad

Re: Fumbling with emacs + elpy + flake8

2018-09-15 Thread Martin Schöön
Den 2018-09-13 skrev Brian Oney : > Hi Martin, > > I have messed around alot with the myriad emacs configurations out > there. I found spacemacs and threw out my crappy but beloved .emacs > config. I have looked back, but will stay put. http://spacemacs.org/ > Thanks Brian but not the answer I w

Re: python 3.7 - I try to close the thread without closing the GUI is it possible?

2018-09-15 Thread Michael Torrie
On 09/15/2018 01:23 AM, Albert-Jan Roskam wrote: > > I try to close the thread without closing the GUI is it possible? > > > Qthread seems to be worth investigating: > https://medium.com/@webmamoffice/getting-started-gui-s-with-python-pyqt-qthread-class-1b796203c18c Or better yet, investigate Q

Re: python 3.7 - I try to close the thread without closing the GUI is it possible?

2018-09-15 Thread Michael Torrie
Here's a small PyQt example of using Qt's asynchronous facilities: http://zetcode.com/pyqt/qnetworkaccessmanager/ That should get the original poster started. -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.7 - I try to close the thread without closing the GUI is it possible?

2018-09-15 Thread Albert-Jan Roskam
> I try to close the thread without closing the GUI is it possible? Qthread seems to be worth investigating: https://medium.com/@webmamoffice/getting-started-gui-s-with-python-pyqt-qthread-class-1b796203c18c -- https://mail.python.org/mailman/listinfo/python-list