Re: an intriguing wifi http server mystery...please help

2005-12-01 Thread jojoba
Just a guess: could it be that your server is doing reverse-dns lookups? (i.e. it does socket.gethostbyaddr to get names by ip addresses, perhaps for logging or whatnot) This call is expensive. Sometimes this call takes ages to complete, if you have a broken DNS config. Interesting... But

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

2005-12-01 Thread Harald Karner
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.2) seems like 2GB is the limit for string size: python -c print len('m' * 2048*1024*1024)

Re: Death to tuples!

2005-12-01 Thread Fuzzyman
Mike Meyer 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 code for the function and thus should be executed at call time. Not at definion

[newbie] super() and multiple inheritance

2005-12-01 Thread hermy
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 parameterless __init__ methods, this works as expected.

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

2005-12-01 Thread Fredrik Lundh
Harald Karner wrote: I tried on a Sun with 16GB Ram (Python 2.3.2) seems like 2GB is the limit for string size: python -c print len('m' * 2048*1024*1024) Traceback (most recent call last): File string, line 1, in ? OverflowError: repeated string is too long python -c print len('m' *

Re: General question about Python design goals

2005-12-01 Thread Rocco Moretti
Fredrik Lundh wrote: Rick Wotnaz wrote: I'm sure Antoon wouldn't object if lists were to be allowed as dictionary keys, which would eliminate the multiple castings for that situation. I wouldn't, either. so what algorithm do you suggest for the new dictionary im- plementation?

Re: A bug in struct module on the 64-bit platform?

2005-12-01 Thread Fredrik Lundh
Neal Norwitz wrote: I have a user who complained about how struct module computes C struct data size on Itanium2 based 64-bit machine. I wouldn't be surprised, but I don't understand the problem. struct.calcsize('idi') 16 struct.calcsize('idid') 24 struct.calcsize('did')

Re: Making immutable instances

2005-12-01 Thread Mike Meyer
[EMAIL PROTECTED] writes: Mike Meyer wrote: [EMAIL PROTECTED] writes: Quoting the frequently used term Practicality beats purity. If I have a practical problem/needs now and it solves it, why not use it ? In other words, you have a use case. Cool. Please tell us what it is - at least if

Re: A bug in struct module on the 64-bit platform?

2005-12-01 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: This is the case on my linux/x86_64 machine: $ python -c 'import struct; print struct.calcsize(idi)' 20 I don't know much about 'itanium', but i'd be surprised if they chose 4-byte alignment for doubles. oops. missed your reply.

Re: General question about Python design goals

2005-12-01 Thread Fredrik Lundh
Rocco Moretti wrote: I'm sure Antoon wouldn't object if lists were to be allowed as dictionary keys, which would eliminate the multiple castings for that situation. I wouldn't, either. so what algorithm do you suggest for the new dictionary im- plementation? devil's_advocate One option is to

Regular Expression question

2005-12-01 Thread Michelle McCall
I have a script that needs to scan every line of a file for numerous strings. There are groups of strings for each area of data we are looking for. Looping through each of these list of strings separately for each line has slowed execution to a crawl. Can I create ONE regular expression from a

Re: Regular Expression question

2005-12-01 Thread Fredrik Lundh
Michelle McCall wrote: I have a script that needs to scan every line of a file for numerous strings. There are groups of strings for each area of data we are looking for. Looping through each of these list of strings separately for each line has slowed execution to a crawl. Can I create ONE

Re: General question about Python design goals

2005-12-01 Thread Rocco Moretti
Fredrik Lundh wrote: Rocco Moretti wrote: I'm sure Antoon wouldn't object if lists were to be allowed as dictionary keys, which would eliminate the multiple castings for that situation. I wouldn't, either. so what algorithm do you suggest for the new dictionary im- plementation?

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

2005-12-01 Thread mickie . liu
RalfGB wrote: Alex Martelli schrieb: MrJean1 [EMAIL PROTECTED] wrote: This may work on MacOS X. An initial, simple test does yield credible values. Definitely looks promising, thanks for the pointer. However, I am not a MacOS X expert. It is unclear which field of the

Re: [newbie] super() and multiple inheritance

2005-12-01 Thread Steven Bethard
hermy wrote: As I understand it, using super() is the preferred way to call the next method in method-resolution-order. When I have parameterless __init__ methods, this works as expected. However, how do you solve the following simple multiple inheritance situation in python ? class

Re: super() and multiple inheritance

2005-12-01 Thread Carl Banks
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 parameterless __init__ methods, this

Re: Making immutable instances

2005-12-01 Thread Paul Rubin
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? Generally if I know I don't plan to mutate something, I'd want

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

2005-12-01 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: mallinfo is available on most UNIX-like systems(Linux, Solaris, QNX, etc.) and is also included in the dlmalloc library (which works on win32). There is a small C extension module at http://hathawaymix.org/Software/Sketches/ which should give access to mallinfo()

aligning a set of word substrings to sentence

2005-12-01 Thread Steven Bethard
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 offsets of each token in the

Re: python speed

2005-12-01 Thread Isaac Gouy
[EMAIL PROTECTED] wrote: Isaac Gouy wrote: Which stated Python is doing the heavy lifting with GMPY which is a compiled C program with a Python wrapper - but didn't seem to compare that to GMPY with a Java wrapper? You are missing the main idea: Java is by design a general purpose

Re: python speed

2005-12-01 Thread Isaac Gouy
[EMAIL PROTECTED] wrote: Isaac Gouy wrote: Peter Hansen wrote: Isaac Gouy wrote: Peter Hansen wrote: Judging by the other posts in this thread, the gauntlet is down: Python is faster than Java. Let those who believe otherwise prove their point with facts, and without

Re: aligning a set of word substrings to sentence

2005-12-01 Thread Fredrik Lundh
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', '?'] text = '''\ She's gonna write

Re: Python CGI

2005-12-01 Thread jbrewer
Thanks guys. I didn't realize that hidden form fields were so easy to use. Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Death to tuples!

2005-12-01 Thread Antoon Pardon
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 code for the function and thus should be executed at call

Re: General question about Python design goals

2005-12-01 Thread Antoon Pardon
On 2005-12-01, Steve Holden [EMAIL PROTECTED] wrote: Antoon Pardon wrote: On 2005-12-01, Fredrik Lundh [EMAIL PROTECTED] wrote: Mike Meyer wrote: So why the $*@ (please excuse my Perl) does for x in 1, 2, 3 work? because the syntax says so: http://docs.python.org/ref/for.html

Re: ANN: Louie-1.0b2 - Signal dispatching mechanism

2005-12-01 Thread Pat
Thomas Heller wrote: What is the difference between PyDispatcher and Louie? (I'm still using a hacked version of the original cookbook recipe...) Not too much at this point, but the general differences are listed on this page: http://louie.berlios.de/changes.html Matt and I plan to

how to run an external program...

2005-12-01 Thread ash
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. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to run an external program...

2005-12-01 Thread Philippe C. Martin
hi, What do you need by control ? look at os.system/execv/popen ...; Regards, Philippe On Thu, 01 Dec 2005 11:57:03 -0800, 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: python speed

2005-12-01 Thread Cameron Laird
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Isaac Gouy wrote: Which stated Python is doing the heavy lifting with GMPY which is a compiled C program with a Python wrapper - but didn't seem to compare that to GMPY with a Java wrapper? You are missing the main idea: Java is by

Re: General question about Python design goals

2005-12-01 Thread Mike Meyer
Fredrik Lundh [EMAIL PROTECTED] writes: Mike Meyer wrote: So why the $*@ (please excuse my Perl) does for x in 1, 2, 3 work? because the syntax says so: http://docs.python.org/ref/for.html In other words, Because that's the way we do things. Seriously. Why doesn't this have to be

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 attribute name as well

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 problem:

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 other

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 will be

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 alike ... Are

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 --

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 good place for this

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 sentence, That's why

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 could list(t)

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

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 iterated over, it

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 where

Re: wxPython - processes

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

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: 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: 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 a buffer overflow would

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 historical issue

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 def

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: 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.2) seems like

Re: General question about Python design goals

2005-12-01 Thread Donn Cave
In article [EMAIL PROTECTED], Paul Rubin http://[EMAIL PROTECTED] 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

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:

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

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', '?']

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? --

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 i do so

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 functions

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 input out of

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

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, February 1991.

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: 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

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: formal

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 a

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 should i do

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()

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 form =

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 tokens. I

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 cannot use smart

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: 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 that has __getitem__

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

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

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 since

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: 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() and

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: 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, does

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 detect

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 code for the

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

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

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: 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: 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: 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 sometimes inserted

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: 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

Re: Making immutable instances

2005-12-01 Thread Mike Meyer
Paul Rubin http://[EMAIL PROTECTED] 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 know. Why

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

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: 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, I did. I

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 a

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 items in

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 (such as

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 BD language features. It's generally considered that it's not a good enough reason for adding those, so it doesn't really

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 around

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 your

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 more memory,

RE: Roboto est mort

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

<    1   2   3   >