Path-like objects in the standard library

2018-08-24 Thread Torsten Bronger
modules seem to accept them anyway. Regards, Torsten. -- Torsten Bronger -- https://mail.python.org/mailman/listinfo/python-list

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

ANN: JuliaBase -- LIMS for specimen-based research published as open source

2015-01-27 Thread Torsten Bronger
is year and made by John” - export to spreadsheets - automatic lab notebooks - server interaction with other programs through an HTTP/JSON interface JuliaBase's sources include an "example institute" that programmers can use as a starting point. -- Torsten BrongerJabber ID: t

Re: Python 3 is killing Python

2014-07-18 Thread Torsten Bronger
much doubt). > > Now, _that's_ funny. This is the internet. If you can't stand the > heat get out of the kitchen. Now, _that's_ funny. This is the internet. If you can't stand people who can't stand the heat get out of the kitchen. Tschö, Torsten.

Re: Proposal: === and !=== operators

2014-07-11 Thread Torsten Bronger
Hallöchen! Torsten Bronger writes: > Alan Bawden writes: > >> [...] >> >> You lost me right here. If list equality is determined by >> comparing lists element-by-element, and the second element of old >> is _not_ equal to the second element of data, then

Re: Proposal: === and !=== operators

2014-07-11 Thread Torsten Bronger
on first tests for identity, and falls back to equality (or the other way round). This behaviour is questionable in my opinion. Tschö, Torsten. -- Torsten BrongerJabber ID: torsten.bron...@jabber.rwth-aachen.de or http://bronger-jmp.appspot.com -- https://mail.

How to upload a file

2011-04-27 Thread Torsten Bronger
sting code. If you now say "Torsten, unfortunately it *is* so complicated" I'll jump through the hoops, but I'd love to hear that with Python 2.6.5 there's an easier way. ;-) Tschö, Torsten. -- Torsten BrongerJabber ID: torsten.bron...@jabber.rwth-aachen.de

Re: ElementTree: How to return only unicode?

2009-03-15 Thread Torsten Bronger
Hallöchen! Stefan Behnel writes: > Torsten Bronger wrote: > >> Stefan Behnel writes: >> >>> Torsten Bronger wrote: >>> >>>> [...] >>>> >>>> My problem is that if there is only ASCII, these methods return >>>>

Re: ElementTree: How to return only unicode?

2009-03-14 Thread Torsten Bronger
Hallöchen! Stefan Behnel writes: > Torsten Bronger wrote: > >> [...] >> >> My problem is that if there is only ASCII, these methods return >> ordinary strings instead of unicode. So sometimes I get str, >> sometimes I get unicode. Can one change this

Re: Style question - defining immutable class data members

2009-03-14 Thread Torsten Bronger
er the first style > over the second? I think that tools like epydoc can generate more accurate API documentation if you write them as instance attributes. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: torsten.bron...@jabber.rwth-aachen.de -- http://ma

ElementTree: How to return only unicode?

2009-03-14 Thread Torsten Bronger
s instead of unicode. So sometimes I get str, sometimes I get unicode. Can one change this globally so that they only return unicode? Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: torsten.bron...@jabber.rwth-aachen.de -- http://mail.python.org/mailman/listinfo/python-list

Re: Attack a sacred Python Cow

2008-07-26 Thread Torsten Bronger
Hallöchen! Terry Reedy writes: > Torsten Bronger wrote: > >> D'Arcy J.M. Cain writes: >> >>> On Sat, 26 Jul 2008 09:45:21 +0200 >>> Torsten Bronger <[EMAIL PROTECTED]> wrote: >>> >>>> Of course, "self" would have to be

Re: Attack a sacred Python Cow

2008-07-26 Thread Torsten Bronger
Hallöchen! Terry Reedy writes: > Torsten Bronger wrote: > >> Terry Reedy writes: >> >>> [...] >>> >>> Or the proposal would have to be that 'self' is mandatory for >>> all programmers in all languages. I think *that* would be >

Re: Attack a sacred Python Cow

2008-07-26 Thread Torsten Bronger
Hallöchen! Kay Schluehr writes: > On 26 Jul., 09:45, Torsten Bronger <[EMAIL PROTECTED]> > wrote: >> >> Terry Reedy writes: >> >>> [...] >>> >>> Or the proposal would have to be that 'self' is mandatory for >>> all progr

Re: Attack a sacred Python Cow

2008-07-26 Thread Torsten Bronger
Hallöchen! D'Arcy J.M. Cain writes: > On Sat, 26 Jul 2008 16:25:18 +0200 > Torsten Bronger <[EMAIL PROTECTED]> wrote: > >>> Isn't this a showstopper all by itself? >> >> Yes. But I've seen no code that uses some other word. Emacs' >&g

Re: Attack a sacred Python Cow

2008-07-26 Thread Torsten Bronger
Hallöchen! D'Arcy J.M. Cain writes: > On Sat, 26 Jul 2008 09:45:21 +0200 > Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> Of course, "self" would have to become a reserved word. You >> could say that this may break some code, but I don't see much

Re: Attack a sacred Python Cow

2008-07-26 Thread Torsten Bronger
od > def sfoo(arg): > print arg See <news:[EMAIL PROTECTED]>. It is only added to non-decorated methods within a class. This implies that you can switch this mechanism off with a noop decorator. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Attack a sacred Python Cow

2008-07-26 Thread Torsten Bronger
an, I still can't write "Für i in range(10)". ;-) Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Attack a sacred Python Cow

2008-07-24 Thread Torsten Bronger
Hallöchen! Sebastian \"lunar\" Wiesner writes: > Torsten Bronger <[EMAIL PROTECTED]>: > >> Bruno Desthuilliers writes: >> >>> Torsten Bronger a écrit : >>> >>>> Bruno Desthuilliers writes: >>>> >>>> [...]

Re: Attack a sacred Python Cow

2008-07-24 Thread Torsten Bronger
Hallöchen! Bruno Desthuilliers writes: > Torsten Bronger a écrit : > >> Bruno Desthuilliers writes: >> >>> [...] >>> >>> How would you handle this case with an implicit 'self' : >>> >>> class Foo(object): >>>p

Re: Attack a sacred Python Cow

2008-07-24 Thread Torsten Bronger
Hallöchen! Bruno Desthuilliers writes: > Torsten Bronger a écrit : > >> Kay Schluehr writes: >> >>> On 24 Jul., 11:40, Torsten Bronger <[EMAIL PROTECTED]> >>> wrote: >>> >>>> [...] Just like this. However, the compiler could ad

Re: Attack a sacred Python Cow

2008-07-24 Thread Torsten Bronger
Hallöchen! Kay Schluehr writes: > On 24 Jul., 11:40, Torsten Bronger <[EMAIL PROTECTED]> > wrote: >> >> Bruno Desthuilliers writes: >> >>> [...] >>> >>> How would you handle this case with an implicit 'self' : >>>

Re: Attack a sacred Python Cow

2008-07-24 Thread Torsten Bronger
self" to non-decorated methods which are defined within "class". Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Amazon: "Practical Django Projects" by James Bennett (June 2008)

2008-07-19 Thread Torsten Bronger
Hallöchen! Bruno Desthuilliers writes: > Torsten Bronger a écrit : > >> [EMAIL PROTECTED] writes: >> >>> On 16 juil, 10:35, Stefan Scholl <[EMAIL PROTECTED]> wrote: >>> >>>> Dave U. Random <[EMAIL PROTECTED]> wrote: >>>>

Re: Amazon: "Practical Django Projects" by James Bennett (June 2008)

2008-07-17 Thread Torsten Bronger
27;s policy is that "1.0" equals "API is frozen". And I consider publishing a book four months before the API is polished bad timing, too. Especially because Django is exquisitely documented on its webpage, so there is no urgent need for it. I thought about buying a Django book, too

Re: Cyclic imports

2008-06-26 Thread Torsten Bronger
until everything is fully loaded -- for example, by wrapping the access in a function which is called from the main program. On the other hand, the above code was for debugging purposes I assume. So maybe there's no real problem anyway because all your uses of module b are wrap

Re: Making wxPython a standard module?

2008-06-15 Thread Torsten Bronger
Hallöchen! Grant Edwards writes: > On 2008-06-14, Torsten Bronger <[EMAIL PROTECTED]> wrote: > >>> You're saying that having the user or-together a bunch of >>> bitmasks and pass the result as an integer is a common way for >>> Python functions/obj

Re: Making wxPython a standard module?

2008-06-15 Thread Torsten Bronger
Hallöchen! Grant Edwards writes: > On 2008-06-14, Torsten Bronger <[EMAIL PROTECTED]> wrote: > >>> [...] >>> >>> IMO, a few of the "un-Pythonic" things about wxPython are: >>> >>> 1) Window ID numbers. >> >> Whe

Re: Making wxPython a standard module?

2008-06-14 Thread Torsten Bronger
matter of taste. I don't think that because you didn't find sizers convenient, or some parts too explicit, you can say that wxWidgets is un-Pythonic. I rather have the impression that you like terseness, which is totally okay but a different thing. I agree that changing the naming con

Re: Making wxPython a standard module?

2008-06-14 Thread Torsten Bronger
on names as strings is also a wart, and *I* have simply never understood signal and slots. Maybe we should accept that there is no silver bullet in GUI toolkits, and any personal preferences amongst the Big Four are just a matter of taste. This "un-Pythonic" thing is arbitrary and u

Re: Python and Flaming Thunder

2008-05-30 Thread Torsten Bronger
Hallöchen! Grant Edwards writes: > On 2008-05-30, Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> Duncan Booth writes: >> >>> [...] >>> >>> I don't understand your problem: it's just a single thread so >>> killfile or skip i

Re: Python and Flaming Thunder

2008-05-30 Thread Torsten Bronger
hread. 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: Python is slow

2008-05-23 Thread Torsten Bronger
torontolife.com is exactly as fast as Wikipedia. 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: Python and Flaming Thunder

2008-05-22 Thread Torsten Bronger
ement results. But people simply don't trust cheap non-point'n'click programs which don't occupy two shelves in the bookstore. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See

Re: Python and Flaming Thunder

2008-05-21 Thread Torsten Bronger
urce of python also uses > goto at tons of places. Is that Arf! too? In the hands of a skilled person who really knows what he/she does, it can be a useful statement. But this collides with the goals of FT, which claims to be simple to use. Besides, the above use case for a goto is

Re: Python and Flaming Thunder

2008-05-13 Thread Torsten Bronger
ming Thunder itself is not free software, is it? 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: Python and Flaming Thunder

2008-05-13 Thread Torsten Bronger
> and those awkwardnesses are already getting fixed. The > difference: I can't afford to ignore users. Really, the Python developers listen *very* carefully what the users want. Of course, the response time in Python is months rather than days, which has turned out to be a good t

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

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: #!/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: #!/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
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: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Torsten Bronger
Hallöchen! Ivan Illarionov writes: > On Fri, 02 May 2008 01:21:38 +0200, Torsten Bronger wrote: > >> [...] >> >> In contrast to many other areas of software, configuration files >> needn't be compatible with anything except the user's brain. So >

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Torsten Bronger
in. So even if the rest of the world uses config format X, you can safely stick with config format Y. I mean, YAML is not really a complex thing, yet it was conceived not before 2001. The reason is that traditional config files do a good job. Tschö, Torsten. --

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Torsten Bronger
n.key=value scheme so anything else would be overkill. Besides, YAML adds another dependency. 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: Problems with Cheese Shop

2008-05-01 Thread Torsten Bronger
Hallöchen! Christian Heimes writes: > Torsten Bronger schrieb: > >> How can I authorise to the Python Cheese Shop in order to use >> setup.py upload? Currently, I get >> >> Upload failed (401): You must be identified to edit package >> information > >

Problems with Cheese Shop

2008-05-01 Thread Torsten Bronger
Hallöchen! How can I authorise to the Python Cheese Shop in order to use setup.py upload? Currently, I get Upload failed (401): You must be identified to edit package information Thanks! Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus

Re: relative import broken?

2008-04-30 Thread Torsten Bronger
No module named S". >> >> >> A silly question: is the directory that contains "S" in PYTHONPATH or >> >> in sys.path? >> >> > It's in sys.path. >> >> "S" or its parent directory? > > I added r'C:\

Re: relative import broken?

2008-04-30 Thread Torsten Bronger
t;> >> > from S import p >> >> > in u.py Python gives "ImportError: No module named S". >> >> A silly question: is the directory that contains "S" in PYTHONPATH or >> in sys.path? > > It's in sys.path. "S" or its parent directory? 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: relative import broken?

2008-04-30 Thread Torsten Bronger
gt; sys.path, but when I execute > > from S import p > > in u.py Python gives "ImportError: No module named S". I didn't look it up myself, but maybe a __init__.py file is missing so that it can be recognised as a package. Tschö, Torsten. -- Torsten Bronger, aquisgrana, e

Re: computing with characters

2008-04-30 Thread Torsten Bronger
sing related > method/functionality to a general purpose sequence type. Okay, my wording was unfortunate. However, I've already twice (before and after the above posting of mine) said what I mean, namely join(list, separator), possibly with a default value for "separator". Tschö, Torsten.

Re: computing with characters

2008-04-30 Thread Torsten Bronger
Hallöchen! Marco Mariani writes: > Torsten Bronger wrote: > >> However, join() is really bizarre. The list rather than the >> separator should be the leading actor. > > No, because join must work with _any sequence_, and there is no > "sequence" type to put

Re: computing with characters

2008-04-30 Thread Torsten Bronger
Hallöchen! Duncan Booth writes: > Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> The biggest ugliness though is ",".join(). No idea why this should >> be better than join(list, separator=" "). Besides, ",".join(u"x") >&

Re: computing with characters

2008-04-30 Thread Torsten Bronger
s were chosen? Just curious *Maybe* for aesthetical reasons. I find ord(c) more pleasent for the eye. YMMV. The biggest ugliness though is ",".join(). No idea why this should be better than join(list, separator=" "). Besides, ",".join(u"x") yields an unico

Re: Simple unicode-safe version of str(exception)?

2008-04-29 Thread Torsten Bronger
something printable is a quite ugly kludge anyway in my opinion, so it needn't special support. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for further contact info.

Re: Simple unicode-safe version of str(exception)?

2008-04-29 Thread Torsten Bronger
Hallöchen! Russell E. Owen writes: > Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> Russell E. Owen writes: >> >>> [...] >>> >>> So...to repeat the original question, is there any simpler >>> unicode-safe replacement for str(exc

Re: Simple unicode-safe version of str(exception)?

2008-04-29 Thread Torsten Bronger
chö, 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

Abuse in comp.lang.python

2008-04-28 Thread Torsten Bronger
Path: uni-berlin.de!fu-berlin.de!postnews.google.com!f63g2000hsf.googlegroups.com!not-for-mail Message-ID: <[EMAIL PROTECTED]> From: [EMAIL PROTECTED] Newsgroups: comp.lang.python Subject: the pink patch Date: Mon, 28 Apr 2008 00:52:20 -0700 (PDT) Lines: 10 Organization: http://groups.google.com N

Re: Python development tools

2008-04-24 Thread Torsten Bronger
noying IMHO. My formulation was unfortunate. What doesn't work (at least for me) is something like """This is a docstring in which some "variables" are quoted.""" Here, "variables" doesn't seem to belong to the docstring for python-mode.

Re: Python development tools

2008-04-23 Thread Torsten Bronger
quot; prefixes?), and it ends multi-line strings at single quotes. That's bad. 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: Finally had to plonk google gorups.

2008-04-21 Thread Torsten Bronger
one of those who accept high amounts of false positives in their anti-spam strategy. 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

lost sourcecode: decompyle?

2008-04-21 Thread Torsten Bronger
content of the files. 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: Is massive spam coming from me on python lists?

2008-04-21 Thread Torsten Bronger
t; things. By the way, why does mailman change the Message-IDs when tunneling postings to the newsgroup? This destroys the thread structure. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See h

Re: "Help needed - I don't understand how Python manages memory"

2008-04-20 Thread Torsten Bronger
at code that doesn't use stack frames nor stores > references to exception objects/tracebacks is safe? Circular referencing is no leaking on the C level but in a way it is memory leaking, too. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus

Re: I just killed GIL!!!

2008-04-16 Thread Torsten Bronger
dy has thought of it >>> before. [...] >> >> If I were you I would keep it a secret until a Hollywood producer >> offers big bucks for the film rights. > > Who would play Guido, I wonder? Ralf Möller. No other. Tschö, Torsten. -- Torsten Bronger, aquisgr

Re: Finally had to plonk google gorups.

2008-04-16 Thread Torsten Bronger
sting. It was sent through the mailing list. By the way, the "References:" header seems to get lost sometimes through the mailing list when reading it as a Usenet group, so that the discussion trees become a mess. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus

Re: Finally had to plonk google gorups.

2008-04-16 Thread Torsten Bronger
Hallöchen! Steve Holden writes: > Torsten Bronger wrote: > >> [...] >> >> The admistrative overhead of mailing lists is tedious. >> Fortunately, most important computer-related lists are on >> gmane.org. We could list c.l.py there, too. ;-) > &

Re: Finally had to plonk google gorups.

2008-04-16 Thread Torsten Bronger
Hallöchen! Michael Torrie writes: > Torsten Bronger wrote: > >> The admistrative overhead of mailing lists is tedious. >> Fortunately, most important computer-related lists are on >> gmane.org. We could list c.l.py there, too. ;-) > > Running a few lists mys

Re: Finally had to plonk google gorups.

2008-04-16 Thread Torsten Bronger
it's much better since list > subscription can actually be controlled by someone. The admistrative overhead of mailing lists is tedious. Fortunately, most important computer-related lists are on gmane.org. We could list c.l.py there, too. ;-) Tschö, Torsten. -- Torsten Br

Re: How is GUI programming in Python?

2008-04-15 Thread Torsten Bronger
;> Object Pascal/Delphi == the hobbyist/beginner's toolkit > > I'm pretty sure that there are more professional software products > written in Delphi than in wxPython. Certainly. 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: How is GUI programming in Python?

2008-04-15 Thread Torsten Bronger
now. They tweaked it a little in recent years and it is reasonable pythonic now. It still has its warts, but Qt definitely has them, too. If you want to have it clean, you must climb up to another level of abstraction (Dabo, Wax etc). I wouldn't do this because it gets slowe

Re: How is GUI programming in Python?

2008-04-12 Thread Torsten Bronger
...] > - WxPython is terribly unstable. I can't confirm that. When I chose wxPython after thorough consideration one year ago, my impression was that reports of instability were indeed frequent but rather old. Apparently, the situation had improved. Does your experience rely

unittest: which directory structure?

2008-04-12 Thread Torsten Bronger
os.path rootpath = os.path.split(os.path.dirname(os.path.abspath(__file__)))[0] sys.path.append(rootpath) in order to be able to import the source modules. I surely have missed something because this is only a workaround solution. Thanks for any hints! Tschö, Torsten. -- Torsten Bronger, aqui

Cyclic relative imports don't work

2008-04-10 Thread Torsten Bronger
Why is this restriction? 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: Coping with cyclic imports

2008-04-09 Thread Torsten Bronger
r indictly) the current module and which comes before the current module in the import order while the program runs. If you don't rely on imported things at top-level code (but only in functions and methods which in turn must not be called from the top-level), everything is fine.

Coping with cyclic imports

2008-04-08 Thread Torsten Bronger
works? Because at least once, the imported module was not "finished" and thus largely unusual. Thank you! Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for furth

Re: Translating keywords

2008-04-07 Thread Torsten Bronger
near = λ a,b,ε=0.01: a-ε ≤ b ≤ a+ε As far as I've understood it, only letters are allowed in identifiers rather than arbitrary Unicode code points. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED]

Re: Is there any way to say ignore case with "in"?

2008-04-04 Thread Torsten Bronger
Hallöchen! [EMAIL PROTECTED] writes: > Is there any way in python to say > > if string1 in string2: > > > ignoring the case of string1 and string2? You can "normalise" both first, i.e. converting to lower case. Tschö, Torsten. -- Torsten Brong

Re: Why prefer != over <> for Python 3.0?

2008-04-01 Thread Torsten Bronger
a keyboard that has those symbols and I'm all up for it. For <= I have to press three buttons, for ≤ I have to press four buttons. Not much of a difference. ;-) However, I'm slightly disappointed with the UTF-8 support in some mail clients involved in this thread, so Unicode sure

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Torsten Bronger
Hallöchen! Bjoern Schliessmann writes: > Torsten Bronger wrote: > >> Emacs is generally not regarded as being convenient, however, it >> has very strong input methods. I type "\gtrless" and get "?", or >> "\forall" and get "?".

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Torsten Bronger
gt; >> Could you please list some that do, and are also convenient? > > AFAICT there's none. This should be easy to implement on emacs, It *is* implemented in Emacs. You can even choose from many input methods, optimised for differend areas/languag

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Torsten Bronger
nvenient". Emacs is generally not regarded as being convenient, however, it has very strong input methods. I type "\gtrless" and get "≷", or "\forall" and get "∀". Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Torsten Bronger
rue. Personally, I don't ever use "a!=b" in favor of "not > a==b". As a side note, I've always found == rather ugly. I'd prefer to have = for both purposes. The constructs that wouldn't work anymore are rare as far as I can see (and possibly there are even

Re: What Programming Languages Should You Learn Next?

2008-03-19 Thread Torsten Bronger
is, Could you elaborate on this? (Sincere question; I have almost no idea of Haskell.) Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for further contact info.) -- http:/

Re: What Programming Languages Should You Learn Next?

2008-03-19 Thread Torsten Bronger
Python so much, but I find this blog entry highly unoriginal. Browsing through Wikipedia gives more insight ... Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for furth

Re: PyCon Feedback and Volunteers ( Pycon disappointment)

2008-03-17 Thread Torsten Bronger
Hallöchen! Aahz writes: > In article <[EMAIL PROTECTED]>, > Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> [...] >> >> I see no reason why the "fault" for parts of the rest being >> sub-optimal, too, must necessarily be on the atte

Re: PyCon Feedback and Volunteers ( Pycon disappointment)

2008-03-17 Thread Torsten Bronger
ho paid good money for travel, lodging, and >> registration is also an experiment, you can hereby consider it >> also failed. > > He said "aside from the sponsor talks", chief. I see no reason why the "fault" for parts of the rest being sub-optimal, too, must

Re: 'join' in the wrong word for the method in class Thread.

2008-03-16 Thread Torsten Bronger
Hallöchen! [EMAIL PROTECTED] writes: > [...] > *** English is SVO, subject-verb-object. French is too, unless the > object is direct: subject- direct-object -verb. Really? I thought this is only the case for pronouns. Tschö, Torsten. -- Torsten Bronger, aquisgrana, eur

anydbm and sync'ing

2008-03-14 Thread Torsten Bronger
t read new data from it. 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: How about adding rational fraction to Python?

2008-02-28 Thread Torsten Bronger
on that 1/2 yield 0.5 is just as > much a convention as that it yield 0 or a true rational. Should be set up a poll? Do you really think that less than 90% of the voters would enter something else than 0.5 in the result edit field? Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vet

Re: How about adding rational fraction to Python?

2008-02-26 Thread Torsten Bronger
Hallöchen! Grant Edwards writes: > On 2008-02-26, Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> Grant Edwards writes: >> >>> [...] >>> >>> Nope. I would prefer that int OP int always produce an int. >> >> And 2**-1? > > An e

Re: How about adding rational fraction to Python?

2008-02-26 Thread Torsten Bronger
ic in computer languages. However, I don't consider this a particularly good reason. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for further contact info.) -- htt

Re: Official IRC channel for Python?

2008-02-24 Thread Torsten Bronger
simply prefer it and maybe others do so, too. 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: Return value of an assignment statement?

2008-02-21 Thread Torsten Bronger
more complicated. I had my bad experiences with it, too (e.g. initialising two lists with "x_values=y_values=[]"). But only once per year I stumble over it. 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: What's "the standard" for code docs?

2008-02-15 Thread Torsten Bronger
being the best tool for generating documentation from the source code, Epydoc+reST is the way to go. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for further contac

Re: Is there any Generic RSS/ATOM generator in Python?

2008-02-14 Thread Torsten Bronger
Hallöchen! Stefan Behnel writes: > [...] > > The E factory is a small module with one main class. Adding that > to your code base doesn't give you any dependencies... Yes, but just for creating five elements? ;-) Tschö, Torsten. -- Torsten Bronger, aquisgr

Re: Is there any Generic RSS/ATOM generator in Python?

2008-02-14 Thread Torsten Bronger
Hallöchen! Stefan Behnel writes: > Torsten Bronger wrote: > >> [...] >> >> Excerpt from my code: >> >> root = ElementTree.Element("feed", xmlns="http://www.w3.org/2005/Atom";) >> ElementTree.SubElement(root, "id

Re: Is there any Generic RSS/ATOM generator in Python?

2008-02-14 Thread Torsten Bronger
nt(root, "id").text = self.id ElementTree.SubElement(root, "title").text = self.title ElementTree.SubElement(root, "updated").text = format_time(self.updated) Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID:

Re: Is there any Generic RSS/ATOM generator in Python?

2008-02-14 Thread Torsten Bronger
Hallöchen! Stefan Behnel writes: > Torsten Bronger wrote: > >> Terran Melconian writes: >> >> [...] >> >> Maybe I understand you wrongly but there *is* a general XML >> generator with ElementTree. I wouldn't generate XML directly but >>

Re: Is there any Generic RSS/ATOM generator in Python?

2008-02-13 Thread Torsten Bronger
stand you wrongly but there *is* a general XML generator with ElementTree. I wouldn't generate XML directly but using ElementTree to generate Atom. I did it myself three months ago and it was really trivial. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus

  1   2   3   >