Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-02 Thread Torsten Bronger
env version and the answer is that > we want to write software that runs everywhere that Python runs. Granted, but you must draw the line somewhere anyway. I cannot pollute my program with hundreds of if clauses just to make it work on every quirky system. It's the *systems* where the s

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-02 Thread Torsten Bronger
Hallöchen! D'Arcy J.M. Cain writes: > On Fri, 02 May 2008 16:26:51 +0200 > Torsten Bronger <[EMAIL PROTECTED]> wrote: > >>> Certainly #! /usr/bin/python is fine if you never expect your >>> software to run outside of your own little corner of the world >&

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-02 Thread Torsten Bronger
to Usenet. Welcome here. ;-) Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for further contact info.) -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature suggestion: sum() ought to use a compensated summation algorithm

2008-05-03 Thread Torsten Bronger
; What you wrote is nonsensical there, no different from 'a' + 1 -- > which is why it quite rightly raises a TypeError. No, the above expression should yield ''+'abc'+'efg', look for the signature of sum in the docs. Tschö, Torsten. -- Torsten Bronge

Re: Am I missing something with Python not having interfaces?

2008-05-06 Thread Torsten Bronger
languages (Java, C# come to mind.) I'm > afraid that if I never use them I'll lose them and when I need them > for something beside Python, I'll be lost. Thank you. See also http://www.python.org/dev/peps/pep-3119/ Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus

new style classes, __new__, __init__

2008-09-16 Thread Torsten Mohr
elf): print self.a a = C2(7) a.fct() This way __new__ is not called, if i remove __init__ then there are too many parameters to __new__, if i add a parameter to __new__ then it says that __new__ does not take arguments. Thanks for any hints, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

Re: new style classes, __new__, __init__

2008-09-16 Thread Torsten Mohr
.a a = C2(7) a.fct() Best regards, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

optparse

2008-09-16 Thread Torsten Mohr
e'} args [] I would rather like to see the actual value False in "opts", did i use some wrong parameters somewhere? I can't imagine that this is the wanted behaviour of optparse. Thanks for any hints, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

Re: optparse

2008-09-16 Thread Torsten Mohr
Hi, > If i call it without any parameters i get: > > opts {'verb': 'store_false'} > args [] If i call it with parameter -v i get: ./script.py -v opts {'verb': True} args [] I wonder what's wrong here. Best regards, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

Extending embedded Python: Adding single methods

2006-03-08 Thread Torsten Bronger
he C++ source. It works. However, is there a way to avoid this dummy "pp3" module and add the C++ functions directy to the main namespace in the Python script? Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetusICQ 264-296-646 -- http://mail.python.org/mailman/listinfo/python-list

Re: Extending embedded Python: Adding single methods

2006-03-08 Thread Torsten Bronger
Hallöchen! Thomas Heller <[EMAIL PROTECTED]> writes: > Torsten Bronger wrote: > >> [...] However, is there a way to avoid this dummy "pp3" module >> and add the C++ functions directy to the main namespace in the >> Python script? > > Yes. You

Re: embedding Python: how to avoid memory leaks?

2006-03-09 Thread Torsten Bronger
urrently uses calls > like these every time a user decides to run a script: > >Py_Initialize(); >PyRun_SimpleString("execfile('foo.py')"); Does PyRun_AnyFile show the same effect? That's the way I'm about to go. Tschö, Torsten. -- Tor

Re: embedding Python: how to avoid memory leaks?

2006-03-09 Thread Torsten Bronger
Hallöchen! [EMAIL PROTECTED] (Andrew Trevorrow) writes: > [...] > > I couldn't get the PyRun_*File* calls to work on Windows, presumably > because of the FILE* problem mentioned in the docs. Which compiler do you use? Tschö, Torsten. -- Torsten Bronger, aquisgr

Re: embedding Python: how to avoid memory leaks?

2006-03-09 Thread Torsten Bronger
Hallöchen! [EMAIL PROTECTED] (Andrew Trevorrow) writes: > Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] (Andrew Trevorrow) writes: >> >>> [...] >>> >>> I couldn't get the PyRun_*File* calls to work on Windows, >>&

Re: Cheese Shop -> BSOL?

2006-03-11 Thread Torsten Bronger
Hallöchen! "Michael Tobis" <[EMAIL PROTECTED]> writes: > [...] > > Pythons build no nests. Their eggs are found in coils. coil.python.org > ? Better eggs.python.org. Would support the spread of the new file format, too. Tschö, Torsten. -- Torsten Brong

test if an input string starts with a python expression

2009-12-07 Thread Torsten Mohr
t? Can i do this using just modules from the python library? Thanks for any hints, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

deriving from array.array

2010-01-26 Thread Torsten Mohr
class and then call array's __getitem__. How do i best derive from array.array? Thanks for any hints, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

Re: deriving from array.array

2010-01-26 Thread Torsten Mohr
out what i need to call? I haven't found much in the documentation. From writing C extensions i knew about the "new" entry in the PyTypeObject struct but it seems there's more behind it. In docs.python.org i did not find much, is there an URL where i can read more? Best regards, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

Read / Write OpenOffice SpreadSheet ?

2010-12-16 Thread Torsten Mohr
Hi, i search for a possibility to access OpenOffoce SpreadSheets from Python with a reasonably new version of Python. Can anybody point me to a package that can do this? Best regards, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

Re: Read / Write OpenOffice SpreadSheet ?

2010-12-17 Thread Torsten Mohr
gh its > UNO interface; but, I find that much more involved then simply accessing > the files directly. Thanks, i read about it but as i understood it, UNO needs Python 2.3.x and i'd like to base on something actual. Best regards, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

Noddy with submodules?

2009-09-07 Thread Torsten Mohr
ent import measurement.adc import measurement.adc.channels import measurement.pwm What do i need to do to create submodules within the initialisation code of a python module written in C? Maybe there is an example based on "noddy"? Thanks for any hints, Torsten. -- http://mail.python.org/mai

Windows, CreateThread

2009-09-07 Thread Torsten Mohr
hanks for any hints, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

iterate over list while changing it

2009-09-24 Thread Torsten Mohr
l items in that list, which is not happening in the example above. The conditions in the example are not real but much more complex in reality. Can anybody tell me how to do this? Thanks for any hints, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

Python und Referenzen auf Variablen?

2009-09-25 Thread Torsten Mohr
, wenn z.B. aus einer list() ein Eintrag gelöscht wird. Der nachfolgende Eintrag würde dann nachrücken und sich damit sein Index ändern. Wie könnte ich in so einer verschachtelten Struktur Referenzen abbilden? Viele Grüße, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

nested structure with "internal references"

2009-09-25 Thread Torsten Mohr
n Python? The references only need to refer to entries in this structure. The lists may change at runtime (entries removed / added), so storing the index may not help. Thanks for any hints, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

Re: "Strong typing vs. strong testing"

2010-09-29 Thread Torsten Zühlsdorff
Keith Thompson schrieb: >>> print c # floating point accuracy aside 299792458.0 m/s Actually, the speed of light is exactly 299792458.0 m/s by definition. Yes, but just in vacuum. Greetings, Torsten -- http://www.dddbl.de - ein Datenbank-Layer, der die Arbeit mit 8 vers

scandir slower than listdir

2017-07-19 Thread Torsten Bronger
quot;/home/bronger/.saves")) print("scandir:", time.time() - start) yields listdir: 0.045470237731933594 scandir: 0.08043360710144043 However, scandir is supposed to be faster than listdir. Why do I see this? Tschö, Torsten. -- Torsten Bronger -- https://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4