Re: UnicodeDecodeError

2005-12-01 Thread ash
Thanks Jarek, doubling worked. I thought it was a problem with encoding but didnt think of escaping it. thanks a lot. Thanks for Fredrik too for taking the trouble. Regards, Ashoka -- http://mail.python.org/mailman/listinfo/python-list

Re: Ruby on Rails Job Site -- Is there a Python equivalent?

2005-12-01 Thread Ray
Adrian Holovaty wrote: > Here ya go: > > http://code.djangoproject.com/wiki/DevelopersForHire > > See the "Django-powered jobs" section. We could definitely advertise > this page more, as it's a bit hidden at the moment on the Django wiki. > > There are three Django jobs on that page now, and I kn

Re: New Ordered Dictionery to Criticise

2005-12-01 Thread Bengt Richter
On 1 Dec 2005 03:38:37 -0800, "Fuzzyman" <[EMAIL PROTECTED]> wrote: > >Fuzzyman wrote: >> Sorry for this hurried message - I've done a new implementation of out >> ordered dict. This comes out of the discussion on this newsgroup (see >> blog entry for link to archive of discussion). >> >> See the

Swig-Mingw-DistUtil Extension - Entry Point Not Found?

2005-12-01 Thread kpd
I am using distutils and mingw to create an extension from some C++ code for Python 2.4.1. It builds fine, but on import the following error comes up: python.exe - Entry Point Not Found The procedure entry point _ctype could not be locatid in the dynamic link library msvcr71.dll I am not using ct

Re: get current function name

2005-12-01 Thread Micah Elliott
On Dec 02, Joe Wong (Mango) wrote: > Is this possible for a function to obtain its own name ? > >eg. >def func1(): >print "my name is " + get_my_name() > >the result will show "my name is func1" This very question was discussed recently: http://groups.google.com/group/com

get current function name

2005-12-01 Thread Ezequiel, Justin
See module inspect -- http://mail.python.org/mailman/listinfo/python-list

Re: Making immutable instances

2005-12-01 Thread Mike Meyer
Ben Finney <[EMAIL PROTECTED]> writes: > Mike Meyer <[EMAIL PROTECTED]> wrote: >> Ben Finney <[EMAIL PROTECTED]> writes: >> > "Since the values of an enumeration are directly reflected in >> > the values and attributes, Enum instances are immutable to >> > preserve this relationship" >>

Re: Death to tuples!

2005-12-01 Thread bonono
Bengt Richter wrote: > >> > >> Because the empty list expression '[]' is evaluated when the > >> expression containing it is executed. > > > >Again you are just stating the specific choice python has made. > >Not why they made this choice. > Why are you interested in the answer to this question? ;

Re: Making immutable instances

2005-12-01 Thread Ben Finney
Mike Meyer <[EMAIL PROTECTED]> wrote: > Ben Finney <[EMAIL PROTECTED]> writes: > > "Since the values of an enumeration are directly reflected in > > the values and attributes, Enum instances are immutable to > > preserve this relationship" > > This justifies making the attributes immut

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-01 Thread Bengt Richter
On Wed, 30 Nov 2005 20:53:50 -0500, [EMAIL PROTECTED] wrote: >Please trim replies... ; ) > Not quite so far ;-) Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

Re: Death to tuples!

2005-12-01 Thread Bengt Richter
On 1 Dec 2005 09:24:30 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: >On 2005-11-30, Duncan Booth <[EMAIL PROTECTED]> wrote: >> Antoon Pardon wrote: >> The left one is equivalent to: __anon = [] def Foo(l): ... Foo(__anon) Foo(__anon) >>> >>> So, why sho

Re: python speed

2005-12-01 Thread casevh
DecInt's division algorithm is completely general also. But I would never claim that Python code is faster than assembler. I believe that careful implementation of a good algorithm is more important than the raw speed of the language or efficiency of the compiler. Python makes it easy to implement

Re: Making immutable instances

2005-12-01 Thread Mike Meyer
[EMAIL PROTECTED] writes: > Mike Meyer wrote: >> > By design, this is a "don't use" feature so it would be very hard to >> > find a "use case" ;-) >> But I can think of use cases for instances with no mutable attributes, >> which is another "don't use" case. If I can do that, those proposing >> tha

Re: Eclipse best/good or bad IDE for Python?

2005-12-01 Thread James
There is no answer for that question. All Python IDEs have their own strengths and weaknesses and different programmers expect different things from their IDEs. What's best for YOU depends on what features you need. PyDev, without question a "good" IDE. BEST is a subjective affair. I use Eclipse (

get current function name

2005-12-01 Thread Joe Wong (Mango)
Hello,    Is this possible for a function to obtain its own name ?   eg.   def func1():     print "my name is " + get_my_name()   the result will show "my name is func1"   Regards,   - Joe   -- http://mail.python.org/mailman/listinfo/python-list

Re: Eclipse best/good or bad IDE for Python?

2005-12-01 Thread elbertlev
Eclipse is very-very slow. 3G P4 looks like 8M 86. It might be good for Java, but not for Python. BUT THIS IS 1 OF 2 IDE'S WHICH ALLOWS DEBUGGING OF MULTITHREADED APPLICATIONS. I prefer Eric or PythonWin. -- http://mail.python.org/mailman/listinfo/python-list

Re: Eclipse best/good or bad IDE for Python?

2005-12-01 Thread elbertlev
Eclipse is very-very slow. 3G P4 looks like 8M 86. It might be good for Java, but not for Python. BUT THIS IS 1 OF 2 IDE'S WHICH ALLOWS DEBUGGING OF MULTITHREADED APPLICATIONS. I prefer Eric or PythonWin. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there no compression support for large sized strings in Python?

2005-12-01 Thread Alex Martelli
Claudio Grondi <[EMAIL PROTECTED]> wrote: ... > In this context I am very curious how many of such > 2 GByte strings is it possible to create within a > single Python process? VM (Virtual Memory) may make the issue difficult to answer precisely. With a Python build for 64-bit addressing (and r

Re: Making immutable instances

2005-12-01 Thread Alex Martelli
Mike Meyer <[EMAIL PROTECTED]> wrote: ... > This is a problem with OO in general, not with not having immutable > instances. You get the same problem if, instead of attaching > attributes to your instances, I subclass your class and add the > attribute in the subclass (which I can do even if bo

Re: Ruby on Rails Job Site -- Is there a Python equivalent?

2005-12-01 Thread Adrian Holovaty
Ray wrote: > I just found a job listing site for Ruby on Rails. > > http://jobs.rubynow.com/ > > I wonder if there's an equivalent one for Django? Here ya go: http://code.djangoproject.com/wiki/DevelopersForHire See the "Django-powered jobs" section. We could definitely advertise this page more,

Re: aligning a set of word substrings to sentence

2005-12-01 Thread Michael Spencer
Steven Bethard wrote: > I've got a list of word substrings (the "tokens") which I need to align > to a string of text (the "sentence"). The sentence is basically the > concatenation of the token list, with spaces sometimes inserted beetween > tokens. I need to determine the start and end offse

Re: CGI question

2005-12-01 Thread Istvan Albert
> I'm still wondering though, if there's some part of the python standard > modules that will convert those % escapes to ASCII or similar - and I believe that functionality is provided by the quote/unquote functions in the urllib module: http://www.python.org/doc/current/lib/module-urllib.html I

Re: Making immutable instances

2005-12-01 Thread bonono
Mike Meyer wrote: > > By design, this is a "don't use" feature so it would be very hard to > > find a "use case" ;-) > > But I can think of use cases for instances with no mutable attributes, > which is another "don't use" case. If I can do that, those proposing > that instances ought to be immuta

Re: Making immutable instances

2005-12-01 Thread Mike Meyer
Ben Finney <[EMAIL PROTECTED]> writes: > > "Since the values of an enumeration are directly reflected in the > values and attributes, Enum instances are immutable to preserve > this relationship" This justifies making the attributes immutable. But that's old hat - I had that use case l

Re: Making immutable instances

2005-12-01 Thread Mike Meyer
[EMAIL PROTECTED] writes: > Mike Meyer wrote: >> That's not a use case, that's a debugging aid. The same logic applies >> to adding type declarations, private/public/etc. declerations, and >> similar B&D language features. It's generally considered that it's not >> a good enough reason for adding t

Re: Making immutable instances

2005-12-01 Thread Ben Finney
Mike Meyer <[EMAIL PROTECTED]> wrote: > Ben Finney <[EMAIL PROTECTED]> writes: > > Mike Meyer <[EMAIL PROTECTED]> wrote: > >> Lots of people seem to want immutable instances. Nobody seems to > >> have a use case for them. > > Perhaps you missed my release announcement of the 'enum' package > > that

Re: CGI module does not parse data

2005-12-01 Thread Peter Hansen
amfr wrote: > I just read somewhere that the CGIHTTPServer module does not work on > mac (which I am currently using), is this true? It might help a lot if you could include a link to "somewhere", so we'd know what "does not work" meant... often it means one particular feature is not perfect, as

Re: URI http get

2005-12-01 Thread jepler
The "urllib2" module is designed for tasks like this. The tutorial shows how to use urllib2.urlopen() to fetch the contents of a URL using the http protocol. Jeff pgpdV8higv7SR.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are there no ordered dictionaries?

2005-12-01 Thread Bengt Richter
On 1 Dec 2005 01:48:56 -0800, "Fuzzyman" <[EMAIL PROTECTED]> wrote: > >Christoph Zwerschke wrote: >> > >Hello Christoph, > >> I think re-ordering will be a very rare use case anyway and slicing even >> more. As a use case, I think of something like mixing different >> configuration files and defau

Re: Why are there no ordered dictionaries?

2005-12-01 Thread Bengt Richter
On 1 Dec 2005 03:53:27 -0800, "Fuzzyman" <[EMAIL PROTECTED]> wrote: >Hmmm... it would be interesting to see if these tests can be used with >odict. I assume you are referring to the pytest tests I posted, though I would need some of the context you snipped to me more sure ;-) Anyway, with some ch

RE: Roboto est mort

2005-12-01 Thread maps
@ et oui cal moe -- http://mail.python.org/mailman/listinfo/python-list

Re: Eclipse best/good or bad IDE for Python?

2005-12-01 Thread Jorge Godoy
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > I'm trying to move beyond Emacs/Vim/Kate > and was wondering if Eclipse is better and if it is the *best* > IDE for Python. > > Should I leave Emacs and do Python coding in Eclipse? IMVVVHO, Eclipse is like a "graphical" Emacs. It uses a lot mor

Re: General question about Python design goals

2005-12-01 Thread Paul Rubin
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > fwiw, the tuple and class implementation were both checked into > CVS in october 1990. > > maybe he's talking about ABC? No I think I'm just plain mistaken. For some reason I thought classes came much later. It was way before my time so I defer to

Re: General question about Python design goals

2005-12-01 Thread Paul Rubin
Donn Cave <[EMAIL PROTECTED]> writes: > > There's a historical issue too: when tuples started first being > > used this way in Python, classes had not yet been introduced. > > When was that, old-timer? It was before my time, but I have the impression that classes arrived with 1.3 or somewhere aro

Re: Making immutable instances

2005-12-01 Thread bonono
Mike Meyer wrote: > That's not a use case, that's a debugging aid. The same logic applies > to adding type declarations, private/public/etc. declerations, and > similar B&D language features. It's generally considered that it's not > a good enough reason for adding those, so it doesn't really cons

Re: Instances behaviour

2005-12-01 Thread Mike Meyer
"Mr.Rech" <[EMAIL PROTECTED]> writes: > Suppose I have a bunch of classes that represent slightly (but > conceptually) different object. The instances of each class must behave > in very similar manner, so that I've created a common class ancestor > (let say A) that define a lot of special method (

Can Python by design handle adress space larger than 2 GByte?

2005-12-01 Thread Claudio Grondi
> the string type uses the ob_size field to hold the string length, and > ob_size is an integer: > > $ more Include/object.h > ... > int ob_size; /* Number of items in variable part */ If this is what you mean, #define PyObject_VAR_HEAD \ PyObject_HEAD \ int ob_size; /* Number of ite

Re: Instances behaviour

2005-12-01 Thread Inyeol Lee
On Thu, Dec 01, 2005 at 03:51:05PM -0800, Mr.Rech wrote: [...] > Suppose I have a bunch of classes that represent slightly (but > conceptually) different object. The instances of each class must behave > in very similar manner, so that I've created a common class ancestor > (let say A) that define

Re: Making immutable instances

2005-12-01 Thread Mike Meyer
Ben Finney <[EMAIL PROTECTED]> writes: > Mike Meyer <[EMAIL PROTECTED]> wrote: >> Lots of people seem to want immutable instances. Nobody seems to >> have a use case for them. > Perhaps you missed my release announcement of the 'enum' package that > explains why Enum instances are immutable. Yes,

Eclipse best/good or bad IDE for Python?

2005-12-01 Thread [EMAIL PROTECTED]
I'm trying to move beyond Emacs/Vim/Kate and was wondering if Eclipse is better and if it is the *best* IDE for Python. Should I leave Emacs and do Python coding in Eclipse? Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: mailing list removal

2005-12-01 Thread Robert Kern
Xray wrote: > I would like to be removed from the Python mailing list..can someone > instruct me on how to do this? Look on the bottom of this page: http://mail.python.org/mailman/listinfo/python-list -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the

Re: Making immutable instances

2005-12-01 Thread Mike Meyer
Paul Rubin writes: > Mike Meyer <[EMAIL PROTECTED]> writes: >> Lots of people seem to want immutable instances. Nobody seems to have >> a use case for them. > What is the use case for immutable strings? Why shouldn't strings be > mutable like they are in Scheme? I don't

Re: Automate webpage refresh

2005-12-01 Thread DarkBlue
Thanks for replies . dcop , hmmm I had not thought of this . D.B. -- http://mail.python.org/mailman/listinfo/python-list

Ruby on Rails Job Site -- Is there a Python equivalent?

2005-12-01 Thread Ray
I just found a job listing site for Ruby on Rails. http://jobs.rubynow.com/ I wonder if there's an equivalent one for Django? For some reason a lot of people seem to know about RoR, but when I ask them about Django, they go like, "huh?" -- http://mail.python.org/mailman/listinfo/python-list

Re: aligning a set of word substrings to sentence

2005-12-01 Thread Steven Bethard
Paul McGuire wrote: > "Steven Bethard" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>I've got a list of word substrings (the "tokens") which I need to align >>to a string of text (the "sentence"). The sentence is basically the >>concatenation of the token list, with spaces som

Re: how to run an external program...

2005-12-01 Thread calad . sigilon
ash wrote: > hi, > i want to know is there a way to run/control an external program form > within a python program? > thanks in advance for any Have you tried os.system()? -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI question

2005-12-01 Thread Dan Stromberg
On Tue, 29 Nov 2005 12:53:26 -0800, Istvan Albert wrote: > See urlparse: > > http://www.python.org/doc/current/lib/module-urlparse.html This looks like precisely what I need for part of what I need to do. I'm stoked that it knows how to take apart the "?" stuff. I'm still wondering though, if

Re: best way to discover this process's current memory usage, cross-platform?

2005-12-01 Thread MrJean1
Did you try the function I posted on Nov 15? It returns the high water mark, like sbrk(0) and works for RH Linux (which is dlmalloc, AFAIK). /Jean Brouwers PS) Here is that code again (for RH Linux only!) size_t hiwm (void) { /* info.arena - number of bytes allocated * info.hblkhd -

Re: Compiling Guppy-PE extension modules

2005-12-01 Thread Claudio Grondi
> I have made a new version now, 0.1.1 . > It compiles cleanly with gcc -pedantic . but the problem with sets.c remains: C:\VisualC++NET2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /G7 /GX /DNDEBUG -IE:\Python24\include -IE:\Python24\PC /Tcsrc/sets/sets.c /Fobuild\temp.win32-2.4\Re lease\src/sets/s

Instances behaviour

2005-12-01 Thread Mr.Rech
Hi all, I've been using Python for 3 years, but I've rarely used its OOP features (I'm a physicist, sorry). Now, after having read a lot about Python OOP capabilities, I'm trying to get advantage of this (for me) new paradigm. As a result I've a lot of somewhat philosophical questions. I will start

Re: Death to tuples!

2005-12-01 Thread Mike Meyer
Antoon Pardon <[EMAIL PROTECTED]> writes: > On 2005-12-01, Mike Meyer <[EMAIL PROTECTED]> wrote: >> Antoon Pardon <[EMAIL PROTECTED]> writes: >>> I know what happens, I would like to know, why they made this choice. >>> One could argue that the expression for the default argument belongs >>> to the

URI http get

2005-12-01 Thread [EMAIL PROTECTED]
I have a website and by accessing it from the browser, for example: "http://www..com:/status";, the web page will display "ok" only if the URI is up. And it will return "website could not be found" alert if the URI is down. In Python, is there a way to retrieve "ok" programmatically and de

Re: Making immutable instances

2005-12-01 Thread Ben Finney
Mike Meyer <[EMAIL PROTECTED]> wrote: > Lots of people seem to want immutable instances. Nobody seems to > have a use case for them. Perhaps you missed my release announcement of the 'enum' package that explains why Enum instances are immutable. -- \"Hanging one scoundrel, it appears, d

Re: CGI module does not parse data

2005-12-01 Thread amfr
I just read somewhere that the CGIHTTPServer module does not work on mac (which I am currently using), is this true? -- http://mail.python.org/mailman/listinfo/python-list

Re: BaseHTTPServer module

2005-12-01 Thread Peter Hansen
amfr wrote: > I looked at the doumentation and is says rfile is: > "Contains an input stream, positioned at the start of the optional > input data." > How do i get the input out of it? As with any "input stream" (file-like object) in Python, you call file methods like .read() or maybe .readline()

Re: Retrieve input

2005-12-01 Thread Peter Hansen
amfr wrote: > Thanks, but when I try to read the stream using read(), the script just > keeps on going and does not stop. When i press ctrl + c, the script > shows thsi (top of error taken off): > File "modules/runpython.py", line 88, in runModule > sys.stdin = self.rfile.read() > File > "/

Re: super() and multiple inheritance

2005-12-01 Thread Carl Banks
hermy wrote: > Thanx, I think I got it (please correct me if I'm wrong): > o super(C,self) determines the next class in the inheritance hierarchy > according to > method resolution order, and simply calls the specified method on it > (in this case > __init__ with the specified argument list. > o

Need help on designing a project

2005-12-01 Thread Mardy
Hi all, I'm starting to think the way I've implemented my program (http://www.mardy.it/eligante) is all wrong. Basically, what I want is a web application, which might run as CGI scripts in apache (and this is working) or even as a standalone application, in which case it would use it's own inter

Re: CGI module does not parse data

2005-12-01 Thread amfr
I have included some of the content of that file, I am writing this as an extension to my ebserver which is based on BaseHTTPServer. This part of the code was taken directly from the CGIHTTPServer file, nothing changed -- http://mail.python.org/mailman/listinfo/python-list

Re: General question about Python design goals

2005-12-01 Thread Mike Meyer
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: Seriously. Why doesn't this have to be phrased as "for x in list((1, 2, 3))", just like you have to write list((1, 2, 3)).count(1), etc.? >>> because anything that supports [] can be iterated over. >> That's false. Anything t

mailing list removal

2005-12-01 Thread Xray
I would like to be removed from the Python mailing list..can someone instruct me on how to do this? Yahoo! Personals Let fate take it's course directly to your email. See who's waiting for you Yahoo! Personals-- http://mail.python.org/mailman/listinfo/python-list

Re: python speed

2005-12-01 Thread Isaac Gouy
Fredrik Lundh wrote: > Isaac Gouy wrote: > > >> and yes, the proposition matches my experiences. java heads prefer to do > >> everything in java, while us pythoneers happily mix and match whenever we > >> can... (which is why guoy's "benchmarks" says so little about Python; if > >> you > >> can

Re: aligning a set of word substrings to sentence

2005-12-01 Thread Paul McGuire
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've got a list of word substrings (the "tokens") which I need to align > to a string of text (the "sentence"). The sentence is basically the > concatenation of the token list, with spaces sometimes inserted beetween >

Re: CGI module does not parse data

2005-12-01 Thread Fredrik Lundh
"amfr" wrot3e: > I am writing a webserver, and I want it to be able to run python > scripts. But when I set sys.stdin to self.rfile (using the > BaseHTTPServer class, self.rfile is a input stream containing the > request), the cgi module does not parse the data. > Example script: > import cgi > f

CGI module does not parse data

2005-12-01 Thread amfr
I am writing a webserver, and I want it to be able to run python scripts. But when I set sys.stdin to self.rfile (using the BaseHTTPServer class, self.rfile is a input stream containing the request), the cgi module does not parse the data. Example script: import cgi form = cgi.FieldStorage() print

Re: UnicodeDecodeError

2005-12-01 Thread Jarek Zgoda
ash napisał(a): > If you dont mind, I have another question for you. I use wxPython for > GUI development. When i use a string containing "&" character as a > label for statictext, the "&" does'nt appear.It is replaced by a short > _. I have tried different encodings but have no success. what shou

Re: Tkinter menu

2005-12-01 Thread Fredrik Lundh
<[EMAIL PROTECTED]> wrote: > I'm writing a small GUI program in Python/Tkinter (my first Python > program). I want to make a menu which lists the names of a number of > text files that my program uses/generates. When I select one of the > files from the menu, I would like a new window to open up

Re: Compiling Guppy-PE extension modules

2005-12-01 Thread Sverker Nilsson
"Claudio Grondi" <[EMAIL PROTECTED]> wrote: > Beside the problem with the multiline strings in sets.c I was getting also: > > src\sets\sets.c(70) : error C2099: initializer is not a constant > src\sets\sets.c(71) : error C2099: initializer is not a constant > src\sets\sets.c(71) : warning C4028: f

Re: Retrieve input

2005-12-01 Thread amfr
Thanks, but when I try to read the stream using read(), the script just keeps on going and does not stop. When i press ctrl + c, the script shows thsi (top of error taken off): File "modules/runpython.py", line 88, in runModule sys.stdin = self.rfile.read() File "/System/Library/Frameworks/

Re: how to run an external program...

2005-12-01 Thread ash
Thanks for Philippe, Larry and Fredrik for the help. the subprocess module did the trick. -- http://mail.python.org/mailman/listinfo/python-list

Re: General question about Python design goals

2005-12-01 Thread Fredrik Lundh
Donn Cave wrote: > Paul Rubin wrote: > > > There's a historical issue too: when tuples started first being > > used this way in Python, classes had not yet been introduced. > > When was that, old-timer? According to Misc/HISTORY, > Python was first posted to alt.sources at version 0.9.0, > Febru

Tkinter menu

2005-12-01 Thread [EMAIL PROTECTED]
Hi, I'm writing a small GUI program in Python/Tkinter (my first Python program). I want to make a menu which lists the names of a number of text files that my program uses/generates. When I select one of the files from the menu, I would like a new window to open up a scroll box containing the fi

Re: Retrieve input

2005-12-01 Thread Fredrik Lundh
"amfr" wrote: > A little while ago, someone told me that for the BaseHTTPServer module, > the whole request would be stored in self.rfile. > I looked at the doumentation and is says rfile is: > "Contains an input stream, positioned at the start of the optional > input data." > How do i get the inp

Re: Newbie: global variables inside class

2005-12-01 Thread Fredrik Lundh
"tjas ni" <[EMAIL PROTECTED]> wrote: > I just got a simple question which I did not find (I bet it's there > somewhere) in the documentation: > How can I make a variable access-able globally inside a class? > > Like I've got a variable in function 1 which I want to access in function 2. > Both fu

Re: UnicodeDecodeError

2005-12-01 Thread Fredrik Lundh
"ash" wrote: > If you dont mind, I have another question for you. I use wxPython for > GUI development. When i use a string containing "&" character as a > label for statictext, the "&" does'nt appear.It is replaced by a short > _. I have tried different encodings but have no success. what should

Retrieve input

2005-12-01 Thread amfr
A little while ago, someone told me that for the BaseHTTPServer module, the whole request would be stored in self.rfile. I looked at the doumentation and is says rfile is: "Contains an input stream, positioned at the start of the optional input data." How do i get the input out of it? -- http://

Re: aligning a set of word substrings to sentence

2005-12-01 Thread Steven Bethard
Fredrik Lundh wrote: > Steven Bethard wrote: >> I feel like there should be a simpler solution (maybe with the re >> module?) but I can't figure one out. Any suggestions? > > using the finditer pattern I just posted in another thread: > > tokens = ['She', "'s", 'gon', 'na', 'write', 'a', 'book',

Newbie: global variables inside class

2005-12-01 Thread tjas ni
Hi there I just got a simple question which I did not find (I bet it's there somewhere) in the documentation: How can I make a variable access-able globally inside a class? Like I've got a variable in function 1 which I want to access in function 2. Both functions in same class... Thanks for any

Re: how to run an external program...

2005-12-01 Thread Fredrik Lundh
Larry Bates wrote: > In addition to what Philippe suggested, take a look at the > subprocess module as well (if you are on Python 2.4 or > greater). footnote: the subprocess module is available for 2.2 and 2.3 as well. a pure-python version (for unix and compatibles) can be found here: http:

Re: General question about Python design goals

2005-12-01 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: > There's a historical issue too: when tuples started first being > used this way in Python, classes had not yet been introduced. When was that, old-timer? According to Misc/HISTORY, Python was first posted to alt.sour

Re: Is there no compression support for large sized strings in Python?

2005-12-01 Thread Claudio Grondi
"Harald Karner" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Claudio Grondi wrote: > > Anyone on a big Linux machine able to do e.g. : > > \>python -c "print len('m' * 2500*1024*1024)" > > or even more without a memory error? > > I tried on a Sun with 16GB Ram (Python 2.3.

Re: BaseHTTPServer module

2005-12-01 Thread amfr
I looked at the doumentation and is says rfile is: "Contains an input stream, positioned at the start of the optional input data." How do i get the input out of it? -- http://mail.python.org/mailman/listinfo/python-list

Re: Automate webpage refresh

2005-12-01 Thread Mike Meyer
DarkBlue <[EMAIL PROTECTED]> writes: > I am trying to write a script (python2.3) which will be used > with linux konqueror to retrive 2 webpages alternatively every 2 minutes. > > My question is how can I send alternative args (the url) > to the same invocation of konqueror which I started with >

Re: General question about Python design goals

2005-12-01 Thread Paul Rubin
Donn Cave <[EMAIL PROTECTED]> writes: > Right. After devoting a lengthy post to the defense of > tuples as a structured type, I have to admit that they're > not a very good one ... > Another theme that occasionally comes up in advice from the > learned has been "use a class". There's a historic

Re: Python as Guido Intended

2005-12-01 Thread Mike Meyer
Antoon Pardon <[EMAIL PROTECTED]> writes: >> We don't talk much about how you produce buffer >> overfows in Python, but people have asked for that as well. Adding >> ways to write hard-to-read code is frowned upon. And so on. > Do you mean people have asked for the possibility that

Re: super() and multiple inheritance

2005-12-01 Thread hermy
Carl Banks schreef: > hermy wrote: > > Hi, > > I'm trying to figure out how to pass constructor arguments to my > > superclasses in a multiple inheritance situation. > > > > As I understand it, using super() is the preferred way to call > > the next method in method-resolution-order. When I have

Re: how to run an external program...

2005-12-01 Thread Larry Bates
In addition to what Philippe suggested, take a look at the subprocess module as well (if you are on Python 2.4 or greater). -Larry Bates ash wrote: > hi, > i want to know is there a way to run/control an external program form > within a python program? > thanks in advance for any support. > --

Re: wxPython - processes

2005-12-01 Thread ccahoon
Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: python speed

2005-12-01 Thread Fredrik Lundh
Isaac Gouy wrote: >> and yes, the proposition matches my experiences. java heads prefer to do >> everything in java, while us pythoneers happily mix and match whenever we >> can... (which is why guoy's "benchmarks" says so little about Python; if you >> cannot use smart algorithms and extensions

Re: General question about Python design goals

2005-12-01 Thread Fredrik Lundh
Mike Meyer wrote: >>> Seriously. Why doesn't this have to be phrased as "for x in list((1, >>> 2, 3))", just like you have to write list((1, 2, 3)).count(1), etc.? >> because anything that supports [] can be iterated over. > > That's false. Anything that has __getitem__ supports []. To be > iterat

Re: something wrong in wx

2005-12-01 Thread malv
Sorry to be of no help and to raise another question. How did you manage to get fann going under python? I can install fann 1.2.0 allright but something doesn't go with the python setup. (I run Python 2.4.1 under linux 2.6.13) When trying to run a small example in python I always get error messages

Re: General question about Python design goals

2005-12-01 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> wrote: ... > So why the $*@& (please excuse my Perl) does "for x in 1, 2, 3" work? > > Seriously. Why doesn't this have to be phrased as "for x in list((1, > 2, 3))", just like you have to write list((1, 2, 3)).count(1), etc.? How co

Re: python speed

2005-12-01 Thread Isaac Gouy
Fredrik Lundh wrote: > Cameron Laird wrote: > > >>You are missing the main idea: Java is by design a general purpose > >>programming language. That's why all "GMPYs" and alike are written in > >>Java - now wrappers to C-libraries. Python, by design, is glue > > . > > I don't understand the sentenc

Re: [OT] mmm-mode, python-mode and doctest-mode?

2005-12-01 Thread bruno at modulix
John J. Lee wrote: > bruno at modulix <[EMAIL PROTECTED]> writes: > > >>John J Lee wrote: >> >>>Is it possible to get doctest-mode to work with mmm-mode and python-mode >>>nicely so that docstrings containing doctests are editable in doctest-mode? >> (snip) >> >>Seems like comp.emacs could be a g

RE: Making immutable instances

2005-12-01 Thread Delaney, Timothy (Tim)
Rick Wotnaz wrote: > Good netiquette might also suggest quoting what you're replying to, > wouldn't you think? Damn - I trimmed [EMAIL PROTECTED] instead of python-list from the To: list. I stuffed up. This one intentionally sent to python-list. Tim Delaney -- http://mail.python.org/mailman/l

Re: python speed

2005-12-01 Thread Fredrik Lundh
Cameron Laird wrote: >>You are missing the main idea: Java is by design a general purpose >>programming language. That's why all "GMPYs" and alike are written in >>Java - now wrappers to C-libraries. Python, by design, is glue > . > I don't understand the sentence, "That's why all 'GMPYs' and alik

Re: General question about Python design goals

2005-12-01 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Rocco Moretti <[EMAIL PROTECTED]> wrote: > People who argue that "frozen list" is not needed because we already > have the tuple type, while simultaneously arguing that tuples shouldn't > grow list methods because they are conceptually different from lists > wil

Re: HTML parsing/scraping & python

2005-12-01 Thread Mike Meyer
"Fuzzyman" <[EMAIL PROTECTED]> writes: > The standard library module for fetching HTML is urllib2. Does urllib2 replace everything in urllib? I thought there was some urllib functionality that urllib2 didn't do. > There is a project called mechanize, built by John Lee on top of > urllib2 and othe

Re: python speed

2005-12-01 Thread Mike Meyer
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> If you wire everything down, you can always hand-code assembler that >> will be faster than HLL code > but that doesn't mean that your hand-coded assembler will always be faster > than an HLL implementation that addresses the same p

Re: General question about Python design goals

2005-12-01 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > > Steve Holden <[EMAIL PROTECTED]> wrote: > >... > > > Presumably because it's necessary to extract the individual values > > > (though os.stat results recently became addressable by attribu

  1   2   3   >