Re: What happens when you 'break' a generator?

2014-07-29 Thread Johannes Schneider
actually terminate. What happens to it? My guess is that normal scoping rules apply. Using my example, the generator is referenced by 'x', so when 'x' goes out of scope, the generator is garbage collected, even though it never completed. Is this correct? Frank Millm

Re: The possibility integration in Python without an equation, just an array-like file

2014-05-16 Thread Johannes Schneider
;mailto:enlong@student.kuleuven.be>; enlong@biotech.tu-dresden.de <mailto:enlong@biotech.tu-dresden.de> Mobile Phone: +4917666191322 Mailing Address: Zi. 0108R, Budapester Straße 24, 01069, Dresden, Germany -- Johannes Schneider Webentwicklung johannes.schnei...@galileo-press.de

Re: The “does Python have variables?” debate

2014-05-08 Thread Johannes Schneider
x27;foo', 3] this means, l1 consists of "pointers" to its values. Otherwise, it's not calling by reference, because >>> g(l1) >>> l1 [1, 'foo', 3] does not change l1. Once again, if I pass an object it behaves like calling by reference: >>>

Re: why i have the output of [None, None, None]

2014-04-10 Thread Johannes Schneider
>>> [print("ok") for it in x if it.strip() !=""] ok ok ok [None, None, None] i understand there are three 'ok' in the output,but why i have the output of [None, None, None] -- Johannes Schneider Webentwicklung johannes.schnei...@galileo-press.d

Re: The sum of numbers in a line from a file

2014-02-21 Thread Johannes Schneider
hen do the same for the last two columns. I want to do this for every name. All I've got is sum([int(s.strip()) for s in open('file').readlines()]) -- Johannes Schneider Webentwicklung johannes.schnei...@galileo-press.de Tel.: +49.228.42150.xxx Galileo Press GmbH Rhein

Re: SSH/Telnet program to Router/switch

2014-02-19 Thread Johannes Schneider
I'm using paramiko to access some routers and firewalls from python and it works very well. bg, Johannes -- Johannes Schneider Webentwicklung johannes.schnei...@galileo-press.de Tel.: +49.228.42150.xxx Galileo Press GmbH Rheinwerkallee 4 - 53227 Bonn - Germany Tel.: +49.228.42.

Re: SIngleton from __defaults__

2014-01-24 Thread Johannes Schneider
thnx guys. On 24.01.2014 01:10, Terry Reedy wrote: Johannes Schneider Wrote in message: On 22.01.2014 20:18, Ned Batchelder wrote: On 1/22/14 11:37 AM, Asaf Las wrote: Chris is right here, too: modules are themselves singletons, no matter how many times you import them, they are only

Re: SIngleton from __defaults__

2014-01-23 Thread Johannes Schneider
lobal namespace. But the value differs in stuff() and before/after the import statement. So the instance of the module differs -> it cannot be a singelton. bg, Johannes -- Johannes Schneider Webentwicklung johannes.schnei...@galileo-press.de Tel.: +49.228.42150.xxx Galileo Press GmbH Rheinw

Re: matlabFunction Equivalent?

2014-01-21 Thread Johannes Schneider
ebraSystem using python as its base and supporting most (all?) of the python syntax and moduls bg, Johannes -- Johannes Schneider Webentwicklung johannes.schnei...@galileo-press.de Tel.: +49.228.42150.xxx Galileo Press GmbH Rheinwerkallee 4 - 53227 Bonn - Germany Tel.: +49.228.42.150.0

Imports in Python

2014-01-21 Thread Johannes Schneider
ation? bg, Johannes -- Johannes Schneider Webentwicklung johannes.schnei...@galileo-press.de Tel.: +49.228.42150.xxx Galileo Press GmbH Rheinwerkallee 4 - 53227 Bonn - Germany Tel.: +49.228.42.150.0 (Zentrale) .77 (Fax) http://www.galileo-press.de/ Geschäftsführer: Tomas Wehren, Ralf Kaulisch, R

Re: Brython (Python in the browser)

2013-12-27 Thread Johannes Schneider
On 27.12.2013 07:14, Pierre Quentel wrote: Hi, Ever wanted to use Python instead of Javascript for web client programming ? Take a look at Brython, an implementation of Python 3 in the browser, with an interface with DOM elements and events Its use is very simple : - load the Javascript libra

Re: Differences between obj.attribute and getattr(obj, "attribute")

2013-12-11 Thread Johannes Schneider
thank you guys. On 11.12.2013 10:36, Chris Angelico wrote: 2013/12/11 Johannes Schneider : can somebody explain me the difference between accessing attributes via obj.attribute and getattr(obj, "attribute")? Is there a special reason or advantage when using getattr? You use getatt

Differences between obj.attribute and getattr(obj, "attribute")

2013-12-11 Thread Johannes Schneider
Hi list, can somebody explain me the difference between accessing attributes via obj.attribute and getattr(obj, "attribute")? Is there a special reason or advantage when using getattr? bg, Johannes -- Johannes Schneider Webentwicklung johannes.schnei...@galileo-press.de Tel.: +49.228