ANN: PyVISA 1.0 -- GPIB, USB, RS232 instrument control

2006-01-24 Thread Torsten Bronger
of last september already, you needn't download it because it contains only minor improvements in the documentation. However, since I've received a couple of positive reports about successful use of PyVISA (and no negatives), I finally dare to jump to 1.0 and declare it stable. Tsch

Installing packages in /usr/local

2006-02-16 Thread Torsten Bronger
r backup, I don't want to change that.) What is the best way to make Python look there? I tried PYTHONPATH but I had trouble with a Python cron job which didn't have the proper environment. I could edit site.py manually, however, I wonder whether there is a cleaner way? Tschö, Torste

Re: Evil, evil wxPython (and a glimmer of hope)

2006-02-17 Thread Torsten Bronger
about other users. Has Wax exceeded the critical mass so that one can be quite certain that it will still be maintained, say, next year? (Sincere question since I don't know.) Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetusICQ 264-296-646 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Torsten Bronger
ting Python implementations spring up. Even worse: In one of them Microsoft is involved. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetusICQ 264-296-646 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Torsten Bronger
(only a physicist) but if you *need* a bytecode interpreter on top of the CPU interpretation, it's an interpreted language to me. I've had such a discussion about TeX already, and my personal conclusion was that you can defend almost any opinion in that area. However, one should ensure that

Re: Python vs. Lisp -- please explain

2006-02-20 Thread Torsten Bronger
Hallöchen! bruno at modulix <[EMAIL PROTECTED]> writes: > Torsten Bronger wrote: > >> [...] >> >> I've had such a discussion about TeX already, and my personal >> conclusion was that you can defend almost any opinion in that >> area. However

Re: Python vs. Lisp -- please explain

2006-02-20 Thread Torsten Bronger
Hallöchen! Carl Friedrich Bolz <[EMAIL PROTECTED]> writes: > Torsten Bronger wrote: > >> [...] >> >> My definiton would be that an interpreted language has in its >> typical implementation an interpreting layer necessary for >> typical hardwar

Re: Python vs. Lisp -- please explain

2006-02-20 Thread Torsten Bronger
which again would have an effect on what will be considered Pythonic. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetusICQ 264-296-646 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Lisp -- please explain

2006-02-22 Thread Torsten Bronger
Hallöchen! Peter Mayne <[EMAIL PROTECTED]> writes: > Torsten Bronger wrote: > >> My definiton would be that an interpreted language has in its >> typical implementation an interpreting layer necessary for typical >> hardware. Of couse, now we could discuss wha

Re: Python vs. Lisp -- please explain

2006-02-22 Thread Torsten Bronger
Hallöchen! Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Wed, 22 Feb 2006 10:15:21 +0100, Torsten Bronger wrote: > >>> And, as someone in this thread has pointed out, it is likely >>> that your important modern (x86) processor is not natively >>> ex

Re: Python vs. Lisp -- please explain

2006-02-22 Thread Torsten Bronger
Hallöchen! Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Wed, 22 Feb 2006 10:15:21 +0100, Torsten Bronger wrote: > >>> And, as someone in this thread has pointed out, it is likely >>> that your important modern (x86) processor is not natively >>> ex

Re: Python vs. Lisp -- please explain

2006-02-23 Thread Torsten Bronger
effectively you would have changed Python. Maybe I misunderstood something because I could not follow all of Kay's text but I think one should not change Python or create a look-alike to allow for better implementations. The language should fit my brain rather than an implementation.

Re: Python vs. Lisp -- please explain

2006-02-24 Thread Torsten Bronger
Hallöchen! Peter Mayne <[EMAIL PROTECTED]> writes: > Torsten Bronger wrote: > >>>>> Another example: is Java the bytecode, which is compiled from >>>>> Java the language, interpreted or not? Even when the HotSpot >>>>> JIT cuts in? >&g

Re: Python vs. Lisp -- please explain

2006-02-24 Thread Torsten Bronger
Hallöchen! "Kay Schluehr" <[EMAIL PROTECTED]> writes: > Torsten Bronger wrote: > >> [...] >> >> I'm still afraid of the following scenario: Eventually, people >> might regard "RPython plus type declarations" (or something >> sim

Python as an extension language

2006-03-06 Thread Torsten Bronger
posed to import modules after all, at least not explicitly. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetusICQ 264-296-646 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python as an extension language

2006-03-06 Thread Torsten Bronger
Hallöchen! Sybren Stuvel <[EMAIL PROTECTED]> writes: > Torsten Bronger enlightened us with: > >> I already know how to do that in principle. My only concern is >> distributing the thing, especially for the Windows platform. > > Check out distutils and py2exe. I

Re: Why I chose Python over Ruby

2006-03-06 Thread Torsten Bronger
oose Python was its set of tools, modules, and Usenet participants. I don't want to do something manually in Ruby which I could have had ready-for-use in Python just for infinitesimally nicer syntax. Probably I'm just too old for language adventures. Ruby might be good enough for

Re: Why I chose Python over Ruby

2006-03-06 Thread Torsten Bronger
Hallöchen! Xavier Morel <[EMAIL PROTECTED]> writes: > Torsten Bronger wrote: > >> Yes, however, this is also true for Python in my opinion. > > Ruby's ability to generate DSLs is an order of magnitude better > than Python's at least. If good DSL includes mor

Re: Python Graphing Utilities.

2005-05-10 Thread Torsten Bronger
dcopy version[*]. It *seems* to me that the programming interfaces are quite different, so a Gnuplot backend for matplotlib would be helpful for me. TschÃ, Torsten. [*] because of the "pslatex" backend, which means that the plot is typeset by the same LaTeX run as your document --&g

Re: Python Graphing Utilities.

2005-05-11 Thread Torsten Bronger
HallÃchen! Bill Mill <[EMAIL PROTECTED]> writes: > On 5/11/05, Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> Fernando Perez <[EMAIL PROTECTED]> writes: >> >>> [...] >>> >>> [...] Matplotlib is very good, has an active developmen

Re: Python Graphing Utilities.

2005-05-11 Thread Torsten Bronger
ng equivalent, (at least) I wouldn't call for a Gnuplot backend anymore. TschÃ, Torsten. -- Torsten Bronger, aquisgrana, europa vetus -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Graphing Utilities.

2005-05-11 Thread Torsten Bronger
measurement programs in Python (I work in a project making this feasible) with on-line plots with mpl, it'd be nice to have the possibility to direct them to a file for high-quality typesetting as well. TschÃ, Torsten. -- Torsten Bronger, aquisgrana, europa vetus -- http://mail.python.org/mailman/listinfo/python-list

Build-in or user-defined exceptions?

2005-05-14 Thread Torsten Bronger
e build-in exceptions whereever one thinks it's appropriate? Is the definition of module exceptions derived from "IOError", "TypeError" etc. a good idea? Is there some sort of style guide for recommended exceptions design in Python? Thank you! TschÃ, Tors

Re: first release of PyPy

2005-05-20 Thread Torsten Bronger
jectspace > and language design patterns. There will be some CPython > compliance - that's all. Please could somebody explain to us non-CS people why PyPy could have speed features CPython can't have? Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus -- http://mail.python.org/mailman/listinfo/python-list

Re: first release of PyPy

2005-05-21 Thread Torsten Bronger
Hallöchen! Paul Rubin <http://[EMAIL PROTECTED]> writes: > Torsten Bronger <[EMAIL PROTECTED]> writes: > >> Please could somebody explain to us non-CS people why PyPy could >> have speed features CPython can't have? > > Does the one-word answer "comp

IDLE 1.0.5 crashs on Windows

2005-05-21 Thread Torsten Bronger
r: [Errno 9] Bad file descriptor Then it hangs, i.e., I can't input anything. Does anybody know why this happens? Thank you! Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus -- http://mail.python.org/mailman/listinfo/python-list

Re: IDLE 1.0.5 crashs on Windows

2005-05-21 Thread Torsten Bronger
Hallöchen! Torsten Bronger <[EMAIL PROTECTED]> writes: > I've installed Python 2.3.5, IDLE 1.0.5 on a Win2k box and have > fatal Windows errors with a trivial script. You can see a > screenshot of the problem at > <http://www-users.rwth-aachen.de/torsten.bronger/idle_

Removing a warnings filter?

2005-06-03 Thread Torsten Bronger
ception to keep track of it more easily. However, before leaving my function I want to restore the old status. How can this be achieved? Thank you! Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing a warnings filter?

2005-06-04 Thread Torsten Bronger
Hallöchen! Dave Benjamin <[EMAIL PROTECTED]> writes: > Torsten Bronger wrote: > >> When I add a warning filter with warnings.filterwarnings, how can >> I get rid of it? I've read about resetwarnings(), but it removes >> all filters, even those that I didn

Re: maybe a bug in python

2005-06-05 Thread Torsten Bronger
Hallöchen! flyaflya <[EMAIL PROTECTED]> writes: >>>> a = {1: ("a")} >>>> a[1] > 'a' > why not ('a')? ("a") is not a tuple, but ("a",) is. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus -- http://mail.python.org/mailman/listinfo/python-list

Unbound names in __del__

2005-06-16 Thread Torsten Bronger
vpp43 ... to guarantee that I can access all the routines in vpp43 in the __del__ method? Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus -- http://mail.python.org/mailman/listinfo/python-list

Re: Unbound names in __del__

2005-06-17 Thread Torsten Bronger
Hallöchen! "Terry Reedy" <[EMAIL PROTECTED]> writes: > "Torsten Bronger" <[EMAIL PROTECTED]> wrote: > >> Is there a way to detect whether the program is being terminated? > > See atexit module to register cleanup functions that run *before* &

Re: Unbound names in __del__

2005-06-17 Thread Torsten Bronger
this is actually not necessary, because then all resources are freed anyway. __del__ is called nevertheless. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus -- http://mail.python.org/mailman/listinfo/python-list

text-mode tree viewer?

2007-06-26 Thread Torsten Bronger
--> Peter | | | +---> Ian | | | +---> Randy | | | +---> Clara | +---> Paul | +---> Mary | +---> Arthur Neither the input data structure nor the output must be exactly like here but probably you got the

Re: text-mode tree viewer?

2007-06-26 Thread Torsten Bronger
uot; " + "|" print current_line if isinstance(item, list): print current_line[:-1] + "+---> " + item[0] new_line_columns = line_columns + [line_columns[-1] + 6 + len(item[0]) // 2] if i == len(tree) - 1: de

Trouble with email package

2007-07-16 Thread Torsten Bronger
oding: 8bit Hallöchen! I mean, I can work around anything, but is the email package just rather buggy or do I something completely misguided here? Thanks for any hints! Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTE

Re: Trouble with email package

2007-07-16 Thread Torsten Bronger
uot; > MIME-Version: 1.0 > Content-Transfer-Encoding: base64 > Content-Transfer-Encoding: 8bit > > Hallöchen! I found the cause of this part of my trouble. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMA

Regexes: How to handle escaped characters

2007-05-17 Thread Torsten Bronger
a thing, or did I miss something? Any other ideas? Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for ICQ, MSN, etc.) -- http://mail.python.org/mailman/listinfo

Re: Regexes: How to handle escaped characters

2007-05-17 Thread Torsten Bronger
Hallöchen! James Stroud writes: > Torsten Bronger wrote: > >> I need some help with finding matches in a string that has some >> characters which are marked as escaped (in a separate list of >> indices). Escaped means that they must not be part of any match. >> &g

Re: Regexes: How to handle escaped characters

2007-05-18 Thread Torsten Bronger
Hallöchen! John Machin writes: > On May 18, 6:00 am, Torsten Bronger <[EMAIL PROTECTED]> > wrote: > >> [...] >> >> Example string: u"Hollo", escaped positions: [4]. Thus, the >> second "o" is escaped and must not be found be the

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-18 Thread Torsten Bronger
.normalize("NFC", u"\u2126") > u'\u03a9' > > So, OHM SIGN compares equal to GREEK CAPITAL LETTER OMEGA. It can't > be confused with it - it is equal to it by the proposed language > semantics. So different unicode sequences in the source code can

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-18 Thread Torsten Bronger
l adults. If a maintainer is really concerned about such a thing, he should write a trivial program that ensures it. After all, there are some other coding guidelines too that could be enforced this way but aren't, for good reason. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetu

Re: Regexes: How to handle escaped characters

2007-05-18 Thread Torsten Bronger
Hallöchen! Charles Sanders writes: > Torsten Bronger wrote: > > [...] > >>>> Example string: u"Hollo", escaped positions: [4]. Thus, the >>>> second "o" is escaped and must not be found be the regexp >>>> searches. >&g

Setting default output encoding

2007-08-05 Thread Torsten Bronger
ot;myscript.py"], env = environment, stdout=subprocess.PIPE, stderr=subprocess.PIPE) for setting it to UTF-8, however, it didn't work. Any idea on how to achieve this? Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus

All names in the current module

2007-08-15 Thread Torsten Bronger
Hallöchen! How can I get a list with all classes defined in the current module? Thank you! Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for ICQ, MSN, etc

Re: ElementTree surprise

2007-08-15 Thread Torsten Bronger
be sensible to set it to "" for practical reasons. As far as I can see, there is no empty text node in XML, so no ambiguity would occur. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for ICQ, MSN, etc.) -- http://mail.python.org/mailman/listinfo/python-list

Co-developers wanted: document markup language

2007-08-23 Thread Torsten Bronger
, Torsten. Crosspost & Followup-To: comp.lang.python -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for ICQ, MSN, etc.) -- http://mail.python.org/mailman/listinfo/python-list

Re: Co-developers wanted: document markup language

2007-08-23 Thread Torsten Bronger
Hallöchen! Aahz writes: > In article <[EMAIL PROTECTED]>, > Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> Some LaTeX users in Aachen thought about a general-use markup >> language this spring. I wrote some code and a rough project >> description, how

Re: Co-developers wanted: document markup language

2007-08-23 Thread Torsten Bronger
Hallöchen! Aahz writes: > Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> Aahz writes: >> >>> Torsten Bronger <[EMAIL PROTECTED]> wrote: >>> >>>> Some LaTeX users in Aachen thought about a general-use markup >>>> langu

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
Hallöchen! Paul Rubin writes: > Torsten Bronger <[EMAIL PROTECTED]> writes: > >> The differences to LaTeX are explained comprehensively on the >> webpage, and actually LaTeX is the real competitor rather than >> reStructuredText. > > TeX/LateX have been aro

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
Hallöchen! Evan Klitzke writes: > On 8/23/07, Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> Some LaTeX users in Aachen thought about a general-use markup >> language this spring. I wrote some code and a rough project >> description, however, we could ne

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
are enough aspects about LaTeX that can be done >> better so that this project is worth being done. > > What about ODF ? (http://www.odfalliance.org/) Isn't it a good > competitor ? I'd be a nice further backend but I doubt that people want to enter XML

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
point for improving the situation with plain text document markup languages. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for ICQ, MSN, etc.) -- http://mail.python.org/mailman/listinfo/python-list

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
Hallöchen! David Boddie writes: > On Fri Aug 24 11:04:33 CEST 2007, Torsten Bronger wrote: > >> Paul Rubin writes: >> >>> TeX/LateX have been around forever and are well established >>> standards, as awful as they are. Why do we want ANOTHER markup >>

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
Hallöchen! Aahz writes: > Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> [...] >> >> reStructuredText, AsciiDoc, and some others focus on source code >> documentation, or on software documentation. In contrast to >> that, our markup should be suita

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
Hallöchen! Evan Klitzke writes: > On 8/23/07, Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> Some LaTeX users in Aachen thought about a general-use markup >> language this spring. I wrote some code and a rough project >> description, however, we could need

Re: Co-developers wanted: document markup language

2007-08-25 Thread Torsten Bronger
Hallöchen! Jeremy Sanders writes: > Torsten Bronger wrote: > >> I don't know exactly what you mean but the answer is probably no. >> For example, I want the author to state the title, keywords, etc >> of his document, however, he should not state that he wants the

my parser.py isn't imported

2007-08-26 Thread Torsten Bronger
wrong here? Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for ICQ, MSN, etc.) -- http://mail.python.org/mailman/listinfo/python-list

Re: my parser.py isn't imported

2007-08-26 Thread Torsten Bronger
Hallöchen! John Machin writes: > On Aug 27, 1:36 am, Torsten Bronger <[EMAIL PROTECTED]> > wrote: > >> I have a module parser.py in the same directory as the main >> module. In the main module, I import "parser". On Linux, this >> works as expected

Re: my parser.py isn't imported

2007-08-27 Thread Torsten Bronger
Hallöchen! John Machin writes: > Torsten Bronger wrote: > >> I have a module parser.py in the same directory as the main >> module. In the main module, I import "parser". On Linux, this >> works as expected, however on Windows, it imports the stdlib >> p

Wanted: safe codec for filenames

2007-09-05 Thread Torsten Bronger
oded, too, and the encoding must contain only lowercase Latin letters, numbers, underscores, and maybe a little bit more. The result should be more legible than base64, though. Has anybody created such a codec already? Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus

Re: Any syntactic cleanup likely for Py3? And what about doc standards?

2007-09-05 Thread Torsten Bronger
f that there are properties in this class. But anyway ... would these properties finally be virtual? Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for ICQ, MSN, etc.) -- http://mail.python.org/mailman/listinfo/python-list

Re: Wanted: safe codec for filenames

2007-09-05 Thread Torsten Bronger
Hallöchen! Torsten Bronger writes: > I'd like to map general unicode strings to safe filename. I tried > punycode but it is case-sensitive, which Windows is not. Thus, > "Hallo" and "hallo" are mapped to "Hallo-" and "hallo-", however, &g

Re: Any syntactic cleanup likely for Py3? And what about doc standards?

2007-09-05 Thread Torsten Bronger
otally agree. I like to use properties. However, Python already has properties. Their syntax is quite nice in my opinion, and rather explicit, too. Their only flaw is that they are not "virtual" (in C++ speak). In other words, you can't pass a "self" parameter to th

Re: Any syntactic cleanup likely for Py3? And what about doc standards?

2007-09-05 Thread Torsten Bronger
Hallöchen! Alan Isaac writes: > Torsten Bronger wrote: > > [...] > >> Their only flaw is that they are not "virtual" (in C++ speak). >> In other words, you can't pass a "self" parameter to them. > > http://www.kylev.com/2004/10/13/fun-wit

Re: Wanted: safe codec for filenames

2007-09-05 Thread Torsten Bronger
Hallöchen! Gabriel Genellina writes: > En Wed, 05 Sep 2007 19:20:45 -0300, Torsten Bronger > <[EMAIL PROTECTED]> escribi�: > >> Torsten Bronger writes: >> >>> I'd like to map general unicode strings to safe filename. I >>> tried punyc

Re: Any syntactic cleanup likely for Py3? And what about doc standards?

2007-09-05 Thread Torsten Bronger
gt;> http://www.kylev.com/2004/10/13/fun-with-python-properties/ > > > I'm not 100% sure I get what problem that piece of code is > supposed to solve, but if I have understood it, the obvious > solution is to use inheritance, not nasty tricks with lambdas. Yes, it is the right sol

Re: why should I learn python

2007-09-06 Thread Torsten Bronger
Hallöchen! Tom Brown writes: > [...] Python has been by far the easiest to develop in. Some > people might say it is not "real programming" because it is so > easy. I can't believe this. Have you really heard such a statement? Tschö, Torsten. -- Torsten Bronger,

Re: why should I learn python

2007-09-06 Thread Torsten Bronger
t of material about Python out there. You may start on Wikipedia, and you may look for "Python v. another-language" pages. They are often very informative. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED]

/dev/null as a file-like object, or logging to nothing

2007-09-08 Thread Torsten Bronger
-8<---cut here---end--->8--- However, this consumes memory. Is there a better way? Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.

Re: /dev/null as a file-like object, or logging to nothing

2007-09-08 Thread Torsten Bronger
Hallöchen! Marc 'BlackJack' Rintsch writes: > On Sat, 08 Sep 2007 18:52:57 +0200, Torsten Bronger wrote: > >> Is there a portable and simply way to direct file-like IO to >> simply nothing? I try to implement some sort of NullLogging by >> saying > > `os.

Re: /dev/null as a file-like object, or logging to nothing

2007-09-08 Thread Torsten Bronger
Hallöchen! Carsten Haese writes: > On Sat, 2007-09-08 at 18:52 +0200, Torsten Bronger wrote: > >> Is there a portable and simply way to direct file-like IO to >> simply nothing? [...] >> >> [...] > > This might work: > > class LogSink(object): &g

Why is __getslice__ still implemented?

2007-04-10 Thread Torsten Bronger
you still have to override __getslice__ when subclassing from a built-in type, unless I really don't understand the issue correctly. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://

Re: Why is __getslice__ still implemented?

2007-04-10 Thread Torsten Bronger
uot;credits" or "license" for more information. > py> class Bob(object): This should be Bob(unicode). > ... def __getitem__(self, *args): > ... print args > ... > py> b = Bob() > py> b[4:21:2] > (slice(4, 21, 2),) > py> b[5:18:21,2:9:2,8,1

Re: Why is __getslice__ still implemented?

2007-04-10 Thread Torsten Bronger
Hallöchen! Steven Bethard writes: > Torsten Bronger wrote: > >> [...] >> >> [...] It forces people to implement a deprecated function after >> all. I think the docs should say that you still have to override >> __getslice__ when subclassing from a bui

Re: What is the best way to do dynamic imports ?

2007-12-30 Thread Torsten Bronger
e" to doing it this way? > (memory use,processing ,etc) And have to I check if the modul is > already loaded? I use the imp module for this: try: file, pathname, description = imp.find_module(full_name) my_module = imp.load_module(full_name, file, pathname, description) finally: f

Sub-classing unicode: getting the unicode value

2007-12-30 Thread Torsten Bronger
self.__unicode = super(Excerpt, self).__unicode__() return self.__unicode Unfortunately, unicode objects don't have a __unicode__ method. However, unicode(super(Excerpt, self)) is also forbidden because super() allows attribute access only (why by the way?). How does my object get its own valu

Re: Sub-classing unicode: getting the unicode value

2007-12-30 Thread Torsten Bronger
Hallöchen! Gabriel Genellina writes: > On 30 dic, 17:25, Torsten Bronger <[EMAIL PROTECTED]> > wrote: > >> I sub-classed unicode in an own class called "Excerpt", and now I >> try to implement a __unicode__ method.  In this method, I want to >> get

Re: Sub-classing unicode: getting the unicode value

2007-12-30 Thread Torsten Bronger
Hallöchen! Gabriel Genellina writes: > On 30 dic, 19:08, Torsten Bronger <[EMAIL PROTECTED]> > wrote: > >> [...] >> >> But then it is not unicode but Excerpt which I don't want.  The >> idea is to buffer the unicode representation in order to gain

Re: Sub-classing unicode: getting the unicode value

2007-12-30 Thread Torsten Bronger
iel is probably right that no real conversion takes place. A mere attribute lookup may still be cheaper, but only very slightly. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.

Re: Sub-classing unicode: getting the unicode value

2007-12-30 Thread Torsten Bronger
Hallöchen! John Machin writes: > On Dec 31, 8:08 am, Torsten Bronger <[EMAIL PROTECTED]> > wrote: > >> [...] >> >> But then it is not unicode but Excerpt which I don't want. The >> idea is to buffer the unicode representation in order to gain

Re: Is there a string function to trim all non-ascii characters out of a string

2007-12-31 Thread Torsten Bronger
    sstr+=r >>     return sstr > > > Learn the ways of the generator expression you must. > Stupid me! How could I miss such a lovely feature in the language? Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL

Re: Tab indentions on different platforms?

2008-01-01 Thread Torsten Bronger
e SVN tree I'm looking at, nor can I incorporate other project's code into mine if the indentation method is not the same. Of course, there is no intrinsic benefit from spaces but it is the method that has won. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus

Re: Tab indentions on different platforms?

2008-01-01 Thread Torsten Bronger
hon projects using eight spaces for each indentation level. If all Python code used tabs, eveybody could use their own preferences, for both reading and writing code, and interoperability would be maintained nevertheless. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus

Re: Tab indentions on different platforms?

2008-01-01 Thread Torsten Bronger
Hallöchen! Ben Finney writes: > Torsten Bronger <[EMAIL PROTECTED]> writes: > >> [...] the width of a tab is nowhere defined. It really is a >> matter of the editor's settings. > > RFC 678 "Standard File Formats" > http://www.ietf.org/rfc/rfc678.t

Re: Tab indentions on different platforms?

2008-01-01 Thread Torsten Bronger
Hallöchen! Ben Finney writes: > Torsten Bronger <[EMAIL PROTECTED]> writes: > >> [...] the width of a tab is nowhere defined. It really is a >> matter of the editor's settings. > > RFC 678 "Standard File Formats" > http://www.ietf.org/rfc/rfc678.t

Re: Python or PowerShell ?

2008-01-08 Thread Torsten Bronger
ring-python-and-powershell-dba-scripting-/ This comparison is about a very narrow field; additionally, it is a field PowerShell was optimised for. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http:/

Re: Conventions for dummy name

2008-01-10 Thread Torsten Bronger
e not all returning values are interesing to me such as a, b, __ = function_that_returns_three_values(x, y) However, in loops, I prefer real names, even if the loop variable isn't used outside. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus

Re: Conventions for dummy name

2008-01-10 Thread Torsten Bronger
Hallöchen! [EMAIL PROTECTED] writes: > Torsten Bronger wrote: > >> [...] >> >> Right, that's because I've used "__" where not all returning >> values are interesing to me such as >> >> a, b, __ = function_that_returns_three_values(x,

Re: Is unicode.lower() locale-independent?

2008-01-12 Thread Torsten Bronger
's not part of the Unicode subsystem, but I was once irritated that the none-breaking space (codepoint xa0 I think) was included into string.whitespace. I cannot reproduce it on my current system anymore, but I was pretty sure it occured with a fr_FR.UTF-8 locale. Is this possible? And who is to

Re: Is unicode.lower() locale-independent?

2008-01-12 Thread Torsten Bronger
Hallöchen! John Machin writes: > On Jan 12, 11:26 pm, Torsten Bronger <[EMAIL PROTECTED]> > wrote: > >> [...] >> >> Slightly off-topic because it's not part of the Unicode >> subsystem, but I was once irritated that the none-breaking space

Re: ElementTree and namespaces in the header only

2008-01-15 Thread Torsten Bronger
on for a couple of years, and it tries to generate the "minimal" (well, sort of) XML file possible: It uses the prefixes given in the source XSLT file rather than generating something, and detects implicitly set namespaces, thus avoiding spitting them out again. Wouldn't this be an o

Re: no pass-values calling?

2008-01-16 Thread Torsten Bronger
>> change the existing list. > > Sounds strange. > In perl we can modify the variable's value like this way: > > $ perl -le ' >> $x=123; >> sub test { >> $x=456; >> } >> test; >> print $x ' > 456 But here, it is

Re: translating Python to Assembler

2008-01-24 Thread Torsten Bronger
ot;, yeah. Well, it is just-in-time-compiled command by command. :o) 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: py3k feature proposal: field auto-assignment in constructors

2008-01-27 Thread Torsten Bronger
rotocol, .bufsize, .timeout): >> pass > > I like :) > > However, you can probably cook up a decorator for this (not > certain, I'm not a decorator Guru), which is not that much worse. > > Still, I'd support that syntax (and the general idea.). Well,

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-27 Thread Torsten Bronger
Hallöchen! Dustan writes: > On Jan 27, 12:41 pm, Torsten Bronger <[EMAIL PROTECTED]> > wrote: > >> [...] >> >> Well, you save one or two lines per class. Not enough in my >> opinion. > > Are you referring to the alternate syntax or to the decorator

Re: py3k feature proposal: field auto-assignment in constructors

2008-01-28 Thread Torsten Bronger
Hallöchen! Steven D'Aprano writes: > On Mon, 28 Jan 2008 08:04:05 +0100, Torsten Bronger wrote: > >>> Are you referring to the alternate syntax or to the decorator? Either >>> way, you could be saving 4 or 5 or more lines, if you have enough >>> arguments.

Re: optional static typing for Python

2008-01-28 Thread Torsten Bronger
e because readability falls drastically. Moreover, there is a Fortran saying: "One person's constant is another person's variable." The same applies to types in Python. Pythons is one way, Ada another way; there is no silver bullet. Tschö, Torsten. -- Torsten Bronger, aquisg

Re: Python GUI toolkit

2008-02-03 Thread Torsten Bronger
our brain better. For example, I've never managed to understand this signal-slot idea of Qt, so I use wxPython. However, many love Qt exactly for this. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED]

Re: Python GUI toolkit

2008-02-03 Thread Torsten Bronger
Hallöchen! Grant Edwards writes: > On 2008-02-03, Torsten Bronger <[EMAIL PROTECTED]> wrote: >> Hallöchen! >> >> [EMAIL PROTECTED] writes: >> >>> [...] >>> >>> the only remaining are qt4 and wx, i would like to know if one >>>

<    1   2   3   4   >