Re: PyQt pass data from class

2016-11-15 Thread luca72 via Python-list
Thanks for your reply Is the latter, can you explain how i can do it. Thanks -- https://mail.python.org/mailman/listinfo/python-list

__debug__ http://stackoverflow.com/questions/15305688/conditional-debug-statement-not-executed-though-debug-is-true

2016-11-15 Thread Veek M
Trying to make sense of that article. My understanding of debug was simple: 1. __debug__ is always True, unless -O or -OO 2. 'if' is optimized out when True and the expr is inlined. So what does he mean by: 1. 'If you rebind __debug__, it can cause symptoms' 2. 'During module compilation, the sa

Re: __debug__ http://stackoverflow.com/questions/15305688/conditional-debug-statement-not-executed-though-debug-is-true

2016-11-15 Thread Veek M
Veek M wrote: > Trying to make sense of that article. My understanding of debug was > simple: > 1. __debug__ is always True, unless -O or -OO > 2. 'if' is optimized out when True and the expr is inlined. > > So what does he mean by: > > 1. 'If you rebind __debug__, it can cause symptoms' > 2. 'D

Re: help on "from deen import *" vs. "import deen"

2016-11-15 Thread Michael Torrie
On 11/15/2016 07:39 PM, jf...@ms4.hinet.net wrote: > Michael Torrie at 2016/11/15 10:43:58PM wrote: >> Seems like you're still not understanding Python variables. > > I do, just not get used to it yet:-) No you don't yet. See below. > Why? the name "tblm" is already exist and is a mutable one,

Re: help on "from deen import *" vs. "import deen"

2016-11-15 Thread jfong
Michael Torrie at 2016/11/15 10:43:58PM wrote: > Seems like you're still not understanding Python variables. I do, just not get used to it yet:-) > However once > you assign to these names in your current module you are breaking this > link to the deen module and assigning a new object to th

Re: help on "from deen import *" vs. "import deen"

2016-11-15 Thread Steve D'Aprano
On Wed, 16 Nov 2016 09:16 am, Erik wrote: > On 15/11/16 14:43, Michael Torrie wrote: >> As you've been told several times, if you "import deen" then you can >> place a new object into the deen namespace using something like: >> >> deen.foo=bar >> >> Importing everything from an imported module int

Re: A question about sprite rendering in game development

2016-11-15 Thread Steve D'Aprano
On Wed, 16 Nov 2016 08:57 am, shadecelebi wrote: > I'm still quite new to python, but I have a concern. I want to learn > python for game development, but I need to know if python is capable of > rendering, let's say 50 animated character sprites, at once without > lagging. Absolutely. For someth

Re: help on "from deen import *" vs. "import deen"

2016-11-15 Thread Erik
On 15/11/16 14:43, Michael Torrie wrote: As you've been told several times, if you "import deen" then you can place a new object into the deen namespace using something like: deen.foo=bar Importing everything from an imported module into the current module's namespace is not the best idea But

Re: A question about sprite rendering in game development

2016-11-15 Thread Marko Rauhamaa
shadecelebi : > I'm still quite new to python, but I have a concern. I want to learn > python for game development, but I need to know if python is capable > of rendering, let's say 50 animated character sprites, at once without > lagging. > > if anyone's ever played the epic war game series then

A question about sprite rendering in game development

2016-11-15 Thread shadecelebi
I'm still quite new to python, but I have a concern. I want to learn python for game development, but I need to know if python is capable of rendering, let's say 50 animated character sprites, at once without lagging. if anyone's ever played the epic war game series then you should have an idea

Re: Making stl files with python for 3d printing

2016-11-15 Thread Poul Riis
Den mandag den 14. november 2016 kl. 05.55.20 UTC+1 skrev Gregory Ewing: > Poul Riis wrote: > > However, when sending the .stl file produced to a 3D-printer the vase comes > > out as a filled solid - no room for water and flowers! > > My guess is that you have a problem with the orientation > of y

Re: PyQt pass data from class

2016-11-15 Thread Michael Torrie
On 11/15/2016 10:01 AM, luca72 via Python-list wrote: > in wich way i can have access to the lineedit of class Form without event > from class Cornice If I understand you, you are asking how to set the text without having it emit a signal. Is that correct? Or are you asking how to access the memb

Re: PyQt pass data from class

2016-11-15 Thread Rob Gaddi
luca72 wrote: > Hello i need to this > > class Form(QWidget, Ui_Form): > """ > Class documentation goes here. > """ > def __init__(self, parent=None): > """ > Constructor > > @param parent reference to the parent widget > @type QWidget >

PyQt pass data from class

2016-11-15 Thread luca72 via Python-list
Hello i need to this class Form(QWidget, Ui_Form): """ Class documentation goes here. """ def __init__(self, parent=None): """ Constructor @param parent reference to the parent widget @type QWidget """ super(Form, self).__ini

Python Guarded Pattern matching (when x -> do action)

2016-11-15 Thread ygutfreund
I am looking to see if there is prior work, or design ideas for implementing pattern-matched guard statements in a very natural format for python programmers. For those not familiar with pattern matching in [SCALA][1], [Erlang][2], or [F#][3] They all have constructs similiar to: When (patter

Re: exit ThreadPoolExecutor immediately

2016-11-15 Thread woooee
Doug Hellmann has what looks like a similar example using a poison pill (2nd example at) https://pymotw.com/2/multiprocessing/communication.html#multiprocessing-queues Note that join() allows the processes to finish so it you don't care then don't "join()" them. You can also terminate a multi

Re: help on "from deen import *" vs. "import deen"

2016-11-15 Thread Michael Torrie
On 11/14/2016 11:32 PM, jf...@ms4.hinet.net wrote: > But obviously it's not. The compiled code of function gpa is still > reference to a hidden deen.tblm 'global' object which I can't access > anymore. A bad news:-( Seems like you're still not understanding Python variables. After importing all t

Re: exit ThreadPoolExecutor immediately

2016-11-15 Thread dieter
Atul Johri writes: > I am looking for a way to stop a ThreadPoolExecutor immediately under the > assumption that I don't care about what's currently running or pending. > > ``` > limit = 2 > executor = ThreadPoolExecutor(10) > posts = itertools.islice(mygen(executor=executor, **kwargs), 0, limit)