BUG trace realtime

2005-12-29 Thread malv
How would you approach the following? In a multithreaded realtime data acquisition system (all python v2.4), after hours of running without a snag, without warning python hangs at once without leaving any error message or error traceback at all. After the incident, the OS itself (linux) appears to

Warning instaling python-2.3.5 on FreeBSD 5.3

2005-12-29 Thread spanov
i've got problem installing python-2.3.5 from sources on FreeBSD 5.3 [EMAIL PROTECTED] ./configure conf_log configure: WARNING: curses.h: present but cannot be compiled configure: WARNING: curses.h: check for missing prerequisite headers? configure: WARNING: curses.h: see the Autoconf

Re: Draw over video

2005-12-29 Thread Zarathustra
THank you, very interesting!! Merry Xmas and Happy new year!!! -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-29 Thread Ilias Lazaridis
Martin P. Hellwig wrote: Ilias Lazaridis wrote: cut The only thing that holds you theoretically back is acknowledged authority by the participating group _and_ yourself and of course the resource for restricted information. what do you mean by resource for restricted information?

Re: python coding contest

2005-12-29 Thread Simon Hengel
A funny thing happened to me. The http://www.pycontest.net/ site was down for some minutes because : A problem occurred in a Python script. it seems, that 'some clever cheat' has crashed it. That was me, i broke things while tweaking some stuff. Sorry for the

Re: python coding contest

2005-12-29 Thread Marius Gedminas
I cannot not reach the contest site at since all this morning. :-( -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-29 Thread Marius Gedminas
I cannot reach the contest site at since all this morning. :-( -- http://mail.python.org/mailman/listinfo/python-list

Re: build curiosities of svn head (on WinXP)

2005-12-29 Thread Fredrik Lundh
Fredrik Lundh wrote: David Murmann wrote: so this is where the problem has to be, but i am still not sure what to do about this. is this a problem with my configuration, with my build or with python? it's a python bug, and it has been introduced relatively recently. iirc, there has

Re: [EVALUATION] - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-29 Thread Martin P. Hellwig
Ilias Lazaridis wrote: cut I'm suspecting that we have different definitions (or at least the implications of that) of used terms. I think it's important to first define these definition in a form acceptable to both of us. In the link you gave, the title was Efficiency Management. Now I believe

split text file with x0Dx0A

2005-12-29 Thread ownowl
Hello beginer under python, I have a problem to get lines in a text file. lines have inside the \n (x0A) char, and le readline method split the line at this char too (not only at x0Dx0A). for resume, I want to split a file to lines with only those chars : x0Dx0A A idea ? thank's Olivier --

Re: split text file with x0Dx0A

2005-12-29 Thread Fredrik Lundh
ownowl wrote: beginer under python, I have a problem to get lines in a text file. lines have inside the \n (x0A) char, and le readline method split the line at this char too (not only at x0Dx0A). that's not a very clever design, at least if you plan to read the files from C or compatible

Re: Warning instaling python-2.3.5 on FreeBSD 5.3

2005-12-29 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: i've got problem installing python-2.3.5 from sources on FreeBSD 5.3 [EMAIL PROTECTED] ./configure conf_log configure: WARNING: curses.h: present but cannot be compiled configure: WARNING: curses.h: check for missing prerequisite headers? configure: WARNING:

Re: Newbie needs help extracting data from XML

2005-12-29 Thread Alan Kennedy
[Rodney] Im a Python newbie and am trying to get the data out of a series of XML files. As Paul McGuire already noted, it's unusual to extract information from a SOAP message this way: it is more usual to use a SOAP toolkit to do the job for you. But, assuming that you know what you're

Guido working on Pypy?

2005-12-29 Thread Luis M. González
This article is in Dutch: http://www.computable.nl/nieuws.htm?id=1039941WT.mc_id=rss According to this blog entry, it says that Guido has been hired by Google to work on Pypy: http://zephyrfalcon.org/weblog2/arch_e10_00870.html Is there anyone who can confirm this information? Luis --

Re: [EVALUATION] - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-29 Thread Ilias Lazaridis
Martin P. Hellwig wrote: Ilias Lazaridis wrote: cut I'm suspecting that we have different definitions (or at least the implications of that) of used terms. I think it's important to first define these definition in a form acceptable to both of us. In the link you gave, the title was

Re: Newbie needs help extracting data from XML

2005-12-29 Thread Fredrik Lundh
Alan Kennedy wrote There are other ways to do it, e.g. using ElementTree, but I'll leave it to others to suggest the best way to do that. using ElementTree with SOAP is discussed here: http://effbot.org/zone/elementsoap-1.htm /F -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-29 Thread Claudio Grondi
Simon Hengel wrote: Hello, we are hosting a python coding contest an we even managed to provide a price for the winner... http://pycontest.net/ The contest is coincidentally held during the 22c3 and we will be present there.

Re: run line or selection

2005-12-29 Thread Fuzzyman
SPE has that - see http://www.stani.be/python/spe/blog/ It's a *very* nice Python IDE, and has recently had some pretty cool features added. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: some suggestions about GUI toolkits?

2005-12-29 Thread Fuzzyman
wxGlade is built into SPE the Python IDE. http://www.stani.be/python/spe/blog/ I personally use Wax - http://sf.net/projects/waxgui This is another layer *on top* of wxPython, but makes it much nicer to program with. For *small* GUIs you're probably better using Tkinter, which can be made to

Re: python coding contest

2005-12-29 Thread Simon Hengel
It seems, that the site had some trouble to stay online and especially to provide the ranking today. There was a problem with our server, sorry for that. Have fun, Simon Hengel -- http://mail.python.org/mailman/listinfo/python-list

Re: BUG trace realtime

2005-12-29 Thread Peter Hansen
malv wrote: How would you approach the following? In a multithreaded realtime data acquisition system (all python v2.4), after hours of running without a snag, without warning python hangs at once without leaving any error message or error traceback at all. After the incident, the OS itself

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-29 Thread Ilias Lazaridis
Anton Vredegoor wrote: Robert Kern wrote: I have a friend who works at Google. He has no backstabbing history at all. Stop insulting my friends. Your friends work for people who would never hire me. My resume sucks, but I'm not a bad person or a mediocre programmer. They sold out. For

Re: some suggestions about GUI toolkits?

2005-12-29 Thread iclinux
thanks all, There're so many GUI toolkits that make newbie(like me) feel confused. If there's a much up-to-date evaluation about that, things may become easier. Now, I'm trying PythonCard(http://pythoncard.sourceforge.net/). and hope everything goes well: ) --

Graphviz/dot language formatter

2005-12-29 Thread samhng
Hi, I am new to Graphviz/dot language, the source .dot files are chaos so I am looking for source formatter for the .dot files, any ideas? -- http://mail.python.org/mailman/listinfo/python-list

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-29 Thread Michael Schneider
Congratulations to Guide, Mike Harald Armin Massa wrote: Guido at Google: a message in THE public forum c.l.p. A confirmation by Martellibot, that Guido is IN FACT sitting 15m distant from him; and everybody in Python knows where Martellibot has his desk. Can it get more official than

Re: split text file with x0Dx0A

2005-12-29 Thread ownowl
Fredrik Lundh a écrit : ownowl wrote: beginer under python, I have a problem to get lines in a text file. lines have inside the \n (x0A) char, and le readline method split the line at this char too (not only at x0Dx0A). that's not a very clever design, at least if you plan to read the

Re: [EVALUATION] - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-29 Thread Martin P. Hellwig
Ilias Lazaridis wrote: Martin P. Hellwig wrote: Ilias Lazaridis wrote: cut I'm suspecting that we have different definitions (or at least the implications of that) of used terms. I think it's important to first define these definition in a form acceptable to both of us. In the link you

Re: Graphviz/dot language formatter

2005-12-29 Thread Paul McGuire
[EMAIL PROTECTED] wrote: Hi, I am new to Graphviz/dot language, the source .dot files are chaos so I am looking for source formatter for the .dot files, any ideas? Pydot is a pyparsing-based parser at http://dkbza.org/pydot.html. This may give you a jump on source formatting. -- Paul --

Re: [EVALUATION] - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-29 Thread Ilias Lazaridis
Martin P. Hellwig wrote: Ilias Lazaridis wrote: Martin P. Hellwig wrote: Ilias Lazaridis wrote: cut I'm suspecting that we have different definitions (or at least the implications of that) of used terms. I think it's important to first define these definition in a form acceptable to both

Re: Python as a Server vs Running Under Apache

2005-12-29 Thread Matt Helm
[EMAIL PROTECTED] writes: Running under Apache is nice if you need other apache services like proxying, mod_rewrite, some of the accelerated static file serving plugins, etc. Not needed, this is web services only. That is, Apache is needed, but only to handle the PHP consumers of the web

Re: How do I redirect output to a file and to the console screen?

2005-12-29 Thread 28tommy
Thank U. -- http://mail.python.org/mailman/listinfo/python-list

how to tell the version of tk shipped with Python

2005-12-29 Thread pipehappy
I am a newbie to the Python and wonder how I can know version of tk bound with Python Can some one tell me? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Passing cgi parameters to script...

2005-12-29 Thread sophie_newbie
Is there any way that I can pass cgi parameters to my script locally, before i upload it to the webserver, so that i can debug it. Normally I would pass parameters like this: www.webserver.com/script.cgi?TERM1=helloFIELD1=TTLTERM2=goodbyFIELD2=GOVT The problem is that I get errors that do not

Re: how to tell the version of tk shipped with Python

2005-12-29 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: I am a newbie to the Python and wonder how I can know version of tk bound with Python Can some one tell me? import Tkinter print Tkinter.TclVersion 8.4 /F -- http://mail.python.org/mailman/listinfo/python-list

Modifying values in a list

2005-12-29 Thread tron . thomas
The following code: numbers = [1, 2, 3] for value in numbers: value *= 2 print numbers results in the following output: [1, 2, 3] The intent of the code was to produce this output: [2, 4, 6] What is the reason for the output produced? What code should be used to obtain the desired

Re: Simple question on Parameters...

2005-12-29 Thread Fredrik Lundh
Hans Nowak wrote: You don't have to use fillColor[0], you can use tuple unpacking to name the elements of the tuple. E.g. def renderABezierPath(self, path, closePath=True, outlineColor=(1.0, 1.0, 1.0, 1.0), fillColor=(0.0, 0.0, 0.0, 0.25)): r, g, b, a = outlineColor fr, fg, fb,

Re: Modifying values in a list

2005-12-29 Thread Björn Lindström
[EMAIL PROTECTED] writes: The following code: numbers = [1, 2, 3] for value in numbers: value *= 2 print numbers results in the following output: [1, 2, 3] The intent of the code was to produce this output: [2, 4, 6] What is the reason for the output produced? What code

Re: Passing cgi parameters to script...

2005-12-29 Thread Diez B. Roggisch
sophie_newbie wrote: Is there any way that I can pass cgi parameters to my script locally, before i upload it to the webserver, so that i can debug it. Normally I would pass parameters like this: www.webserver.com/script.cgi?TERM1=helloFIELD1=TTLTERM2=goodbyFIELD2=GOVT The problem is

Re: Modifying values in a list

2005-12-29 Thread Brian van den Broek
[EMAIL PROTECTED] said unto the world upon 29/12/05 10:43 AM: The following code: numbers = [1, 2, 3] for value in numbers: value *= 2 print numbers results in the following output: [1, 2, 3] The intent of the code was to produce this output: [2, 4, 6] What is the reason

Re: Modifying values in a list

2005-12-29 Thread Carsten Haese
On Thu, 2005-12-29 at 11:43, [EMAIL PROTECTED] wrote: The following code: numbers = [1, 2, 3] for value in numbers: value *= 2 print numbers results in the following output: [1, 2, 3] The intent of the code was to produce this output: [2, 4, 6] What is the reason for the

Re: Modifying values in a list

2005-12-29 Thread Tim Williams (gmail)
On 29 Dec 2005 08:43:17 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:The following code:numbers = [1, 2, 3]for value in numbers: value *= 2print numbers Above, you are modifying value, not the item in the list numbers = [1, 2, 3] for x in range(len(numbers)): ... numbers[x] =

Re: Passing cgi parameters to script...

2005-12-29 Thread Mike Meyer
sophie_newbie [EMAIL PROTECTED] writes: Is there any way that I can pass cgi parameters to my script locally, before i upload it to the webserver, so that i can debug it. Normally I would pass parameters like this: www.webserver.com/script.cgi?TERM1=helloFIELD1=TTLTERM2=goodbyFIELD2=GOVT

Re: Is this a refrence issue?

2005-12-29 Thread Scott David Daniels
KraftDiner wrote: I have a list and want to make a copy of it and add an element to the end of the new list, but keep the original intact Nobody has mentioned the obvious yet: tmp = myList + [something] --Scott David Daniels [EMAIL PROTECTED] --

Extending Python with C++

2005-12-29 Thread jeremito
I am learning how to extend Pythong with C++. I have will be writing some code in C++ and want/need Python to interact with it. I am not having success following the online documentation from http://docs.python.org/ext/ext.html. I have also looked briefly at some of the demos in the source code

Re: BUG trace realtime

2005-12-29 Thread malv
Hi Peter, Thank you for your extensive reply. In the meantime, I solved the problem. I had started out to trace the path of the randomly arriving external data through the different threaded processing stages. After one of those 'hangs', with some luck, I was able to spot the cause of the trouble:

Re: Extending Python with C++

2005-12-29 Thread Fredrik Lundh
jeremito [EMAIL PROTECTED] wrote: I have one specific question. The documentation online states: If the main program (the Python interpreter) is compiled and linked by the C compiler, global or static objects with constructors cannot be used. This is not a problem if the main program is

Re: Humane programmer interfaces

2005-12-29 Thread colinwb
Apologies if I'm misunderstanding some points in kpd's post, but: http://www.rubycentral.com/ref/ref_c_array.html [ ] arr[anInteger] - anObject or nil arr[start, length] - aSubArray or nil arr[aRange] - aSubArray or nil Element Reference Returns the element at index anInteger, or returns a

Re: Extending Python with C++

2005-12-29 Thread Brian van den Broek
jeremito said unto the world upon 29/12/05 11:39 AM: I am learning how to extend Pythong with C++. I have will be writing some code in C++ and want/need Python to interact with it. I am not having success following the online documentation from http://docs.python.org/ext/ext.html. I have

Re: Extending Python with C++

2005-12-29 Thread jeremito
Oops, sorry. My question is, how can I know if my Python interpreter was lined by C++? The non-specific questions are, of course, does anyone have any hints or suggestions? Good websites to visit? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: BUG trace realtime

2005-12-29 Thread Peter Hansen
malv wrote: After one of those 'hangs', with some luck, I was able to spot the cause of the trouble: a piece of old code that wasn't supposed to be out there! Really dumb. FYI, to my surprise, Python really quit. No more CPU time, no message, nothing. I can't recall having seen this before.

Re: getting the status codes from the ftplib module

2005-12-29 Thread John J. Lee
Alvin A. Delagon [EMAIL PROTECTED] writes: I'm writing a simple python code that will upload files onto a ftp server. Everything's fine and working great except that the script I wrote don't know is an upload is successful or not. Is there a way to obtain the ftp status codes with this

rss parsing: sax or dom

2005-12-29 Thread Sakcee
hi I am trying to parse rss2 feeds in python, should I use sax and define handler and then functions for each tag or should I go for dom approach. thanks for any comments -- http://mail.python.org/mailman/listinfo/python-list

Re: how to tell the version of tk shipped with Python

2005-12-29 Thread Cameron Laird
In article [EMAIL PROTECTED], Fredrik Lundh [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I am a newbie to the Python and wonder how I can know version of tk bound with Python Can some one tell me? import Tkinter print Tkinter.TclVersion 8.4 /F ... and, if you need more detail,

Re: rss parsing: sax or dom

2005-12-29 Thread Jarek Zgoda
Sakcee napisał(a): I am trying to parse rss2 feeds in python, should I use sax and define handler and then functions for each tag or should I go for dom approach. You should use feedparser. -- Jarek Zgoda http://jpa.berlios.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Modifying values in a list

2005-12-29 Thread Paul McGuire
As others have already posted, changing the value of 'value' has nothing to do with the list variable 'numbers'. To modify the list in place, you need to access its members by index. The following code does this: numbers = [1,2,3] for i in range(len(numbers)): numbers[i] *= 2 print numbers

Re: tutorials on xslt

2005-12-29 Thread gene tani
Iyer, Prasad C wrote: Hi, Is there any tutorial available for python-xslt processing. Yes, but instead of giving you a fish: use google groups Searth this group button, sort the numerous results by date, you'll get what you need -- http://mail.python.org/mailman/listinfo/python-list

Re: Extending Python with C++

2005-12-29 Thread Martin v. Löwis
jeremito wrote: Oops, sorry. My question is, how can I know if my Python interpreter was lined by C++? Ah. This documentation fragment is somewhat wrong: it depends on the target operating system and compiler whether you have to link main with a C++ compiler. For many modern systems, this

Distributions, RE-verb and the like

2005-12-29 Thread bearophileHUGS
Psyco is finished now, and it works on the x86, for Win, the new macs, many linux boxes, etc, and it's quite useful, so maybe it can be added to the standard Python distribution. PyChecker (and the other similar ones that work differently) is very useful too, and it's pure Python, so maybe it too

Application Portability?

2005-12-29 Thread greg . kujawa
I have a CRM application that I've written in Ruby that currently runs on Win32 clients as well as Linux ARM clients (Sharp Zaurus PDA's). The application uses Qt for its GUI presentation and XMLRPC calls to push/pull contact data back and forth. It suits my purposes, but I am looking to port it

Re: help with lists and writing to file in correct order

2005-12-29 Thread homepricemaps
hey kent thanks for your help. so i ended up using a loop but find that i end up getting the same set of results every time. the code is here: for incident in bs('tr'): data2 = [] for incident in bs('h2', {'id' : 'dealName'}): product2 = for

Re: BUG trace realtime

2005-12-29 Thread malv
What happened in fact was that a graphics plotting function for monitoring got called twice frorm a different thread, due to an 'old' instruction inadvertently left. Due to the quasi random nature of the incoming data streams, this happened rather very sparingly. As the plotting itself involves

Re: help with lists and writing to file in correct order

2005-12-29 Thread Mike Meyer
[EMAIL PROTECTED] writes: hey kent thanks for your help. so i ended up using a loop but find that i end up getting the same set of results every time. the code is here: for incident in bs('tr'): data2 = [] for incident in bs('h2', {'id' : 'dealName'}):

Question about the 'code' module

2005-12-29 Thread Thomas Heller
I'm using the code module to implement an interactive interpreter console in a GUI application, the interpreter running in a separate thread. To provide clean shutdown of the application, I have to make sure that objects used in the interpreter thread are deleted when the thread ends. I delete

Strange behaviour with eval() and globals() copy

2005-12-29 Thread Geert Jansen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm experiencing a weird problem with eval(), providing it a copy of the globals() dictionary. The following code works: snip s = def func(level): if level 2: func(level+1) func(0) c = compile(s, 'string', 'exec') g = globals()

KixForm, a (little) GUI for Python + PyWin32 ?

2005-12-29 Thread Do Re Mi chel La Si Do
Hi! I had found (since only 2 hours) that KixForm can to do used by Python + PyWin32 At the end of the message, a very small example It's an Active-X, in one file (.DLL), and one help-file (.CHM) It is limited, but simple Download here :

Re: csv.Sniffer: wrong detection of the end of line delimiter

2005-12-29 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Steve Holden wrote: Laurent Laporte wrote: I'm using cvs standard module under Python 2.3 / 2.4 to read a CSV file. The file is opened in binary mode, so I keep the end of line terminator. It's not advisable to open a file like a CSV, intended for use as text, in

Re: Application Portability?

2005-12-29 Thread UrsusMaximus
You might look at http://www.awaretek.com/pymo.html which shows links to Python versions for both PALM and Win CE as well as Sharp Zaurus and other mobile platforms; however, the only mobile platform I have personally used python on is the Zaurus, which works very smoothly, not problems at all.

Detecting problems in a forked process

2005-12-29 Thread James Colannino
Hey everyone. I'm writing a small application in Python that uses os.fork() to create a separate process in which another application is run in the background. The problem is that I need to know whether or not that separate application managed to start and return from within the parent

Re: using NamedTemporaryFile on windows

2005-12-29 Thread Lee Harr
On 2005-12-29, Peter Hansen [EMAIL PROTECTED] wrote: Lee Harr wrote: Is there any other reason to use a named tempfile other than to be able to open it again? As it says, if you *don't close* the file, you can open it again if you are on a platform which supports that. Ok. I just started

Re: using NamedTemporaryFile on windows

2005-12-29 Thread Chris Lambacher
On Thu, Dec 29, 2005 at 12:40:34AM -0500, Peter Hansen wrote: What I don't understand is why you _can't_ reopen the NamedTemporaryFile under Windows when you can reopen the file created by mkstemp (and the files created by TemporaryFile are created by mkstemp in the first place). Basically

Re: Extending Python with C++

2005-12-29 Thread Brian van den Broek
Brian van den Broek said unto the world upon 29/12/05 12:03 PM: jeremito said unto the world upon 29/12/05 11:39 AM: I am learning how to extend Pythong with C++. I have will be writing some code in C++ and want/need Python to interact with it. I am not having success following the online

Re: Distributions, RE-verb and the like

2005-12-29 Thread Paul McGuire
Bearophile - Well, I fear this may end up being another of those easier to reinvent wheels. All of your issues with RE's are the same ones I had with lex/yacc (and re's too) when I wrote pyparsing. Any chance for convergence here? (BTW, there is nothing inherently wrong with reinventing

Re: Question about the 'code' module

2005-12-29 Thread Fernando Perez
Thomas Heller wrote: I'm using the code module to implement an interactive interpreter console in a GUI application, the interpreter running in a separate thread. To provide clean shutdown of the application, I have to make sure that objects used in the interpreter thread are deleted when

Re: Detecting problems in a forked process

2005-12-29 Thread Jim Segrave
In article [EMAIL PROTECTED], James Colannino [EMAIL PROTECTED] wrote: Hey everyone. I'm writing a small application in Python that uses os.fork() to create a separate process in which another application is run in the background. The problem is that I need to know whether or not that

Re: Distributions, RE-verb and the like

2005-12-29 Thread Paul McGuire
Oh, the pyparsing rendition of your initial pat expression would be something like: import pyparsing as pp pat = pp.Combine( pp.oneOf($ 0x 0X) + pp.Word(pp.hexnums,max=8) ) Combine is needed to ensure that the leading $, 0x, or 0X is immediately followed by 1-8 (and no more than 8) hex digits.

Re: Humane programmer interfaces

2005-12-29 Thread Andrew Durdin
On 29 Dec 2005 09:50:57 -0800, colinwb [EMAIL PROTECTED] wrote: puts ck.first, ck[0], '*', ck.last, ck[-1] One of the points at issue (minimalism/monotony) relates to TOOWTDI, which has implications for language/module design and for code readability. Ruby supports negative indices in the same

Re: Guido working on Pypy?

2005-12-29 Thread Andrew Durdin
On 29 Dec 2005 04:12:53 -0800, Luis M. González [EMAIL PROTECTED] wrote: According to this blog entry, it says that Guido has been hired by Google to work on Pypy: http://zephyrfalcon.org/weblog2/arch_e10_00870.html Is there anyone who can confirm this information? Luis Or deny it:

Re: python coding contest

2005-12-29 Thread Christian Tismer
Duncan Booth wrote: Christian Tismer wrote: And then help me to setup a different contest about content -- chris Count me in. Great! Let's find a problem small enough to solve in reasonably time and large enough to exploit Python qualities. sincerely -- chris (below 130) -- Christian

reading files into dicts

2005-12-29 Thread rbt
What's a good way to write a dictionary out to a file so that it can be easily read back into a dict later? I've used realines() to read text files into lists... how can I do the same thing with dicts? Here's some sample output that I'd like to write to file and then read back into a dict:

Re: reading files into dicts

2005-12-29 Thread Tim Williams (gmail)
On 30/12/05, rbt [EMAIL PROTECTED] wrote: What's a good way to write a dictionary out to a file so that it can beeasily read back into a dict later? I've used realines() to read textfiles into lists... how can I do the same thing with dicts? Here's some sample output that I'd like to write to file

Re: reading files into dicts

2005-12-29 Thread Giovanni Bajo
rbt wrote: What's a good way to write a dictionary out to a file so that it can be easily read back into a dict later? I've used realines() to read text files into lists... how can I do the same thing with dicts? Here's some sample output that I'd like to write to file and then read back

Re: reading files into dicts

2005-12-29 Thread Tim Williams (gmail)
On 30/12/05, Giovanni Bajo [EMAIL PROTECTED] wrote: d = {'.\\sync_pics.py': 1135900993, '.\\file_history.txt': 1135900994, '.\\New Text Document.txt': 1135900552} file(foo, w).write(repr(d)) data = "" data{'.sync_pics.py': 1135900993, '.file_history.txt': 1135900994,'.New Text

Re: python coding contest

2005-12-29 Thread Andrew Durdin
On 12/28/05, Shane Hathaway [EMAIL PROTECTED] wrote: I just found a 125 character solution. It's actually faster and more readable than the 133 character solution (though it's still obscure.) Having spent a good deal of time and effort, and not getting below 144 characters, I am now very eager

Re: help with lists and writing to file in correct order

2005-12-29 Thread homepricemaps
hey mike-the sample code was very useful. have 2 questions when i use what you wrote which is listed below i get told unboundlocalerror: local variable 'product' referenced before assignment. if i however chnage row to incident in for incident in bs('tr'): i then get mytuples printed out nicely

Re: reading files into dicts

2005-12-29 Thread limodou
2005/12/30, rbt [EMAIL PROTECTED]: What's a good way to write a dictionary out to a file so that it can be easily read back into a dict later? I've used realines() to read text files into lists... how can I do the same thing with dicts? Here's some sample output that I'd like to write to file

Re: Newbie needs help extracting data from XML

2005-12-29 Thread Rodney
Thanks for the help This was a SOAP Webservice message. I used httplib instead of SOAPpy or ZSI because SOAPpy cann't do arrays of complex type and ZSI was confusing. Thanks again Rodney [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Im a Python newbie and am trying to

Newbie - SOAP return message with embedded ZIP file

2005-12-29 Thread Rodney
Hi again, thanks for the help with figuring out how to parse a SOAP return message. I know have a return message that has an embedded ZIP file in it. Can anyone help me figure out how to extract this file from the SOAP return message. The message looks as following: '\x0c

Re: reading files into dicts

2005-12-29 Thread Gary Herron
rbt wrote: What's a good way to write a dictionary out to a file so that it can be easily read back into a dict later? I've used realines() to read text files into lists... how can I do the same thing with dicts? Here's some sample output that I'd like to write to file and then read back into

Re: reading files into dicts

2005-12-29 Thread Tim Williams (gmail)
A further thought, if you write the data to a file in the correct format, you can use import and reload to access the data later instead of repr. On 12/29/05, Tim Williams (gmail) [EMAIL PROTECTED] wrote: On 30/12/05, Giovanni Bajo [EMAIL PROTECTED] wrote: d = {'.\\sync_pics.py':

Re: reading files into dicts

2005-12-29 Thread Tim Williams (gmail)
Apologies for the top post, it was my first attempt at using gmail's pda-enabled web interface. There is no option to bottom post. Apart from the mistake in my previous reply, when I meant to suggest using import instead of eval() not repr(). I also omitted an example. So here goes -but I don't

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-29 Thread Chris Smith
John == John J Lee [EMAIL PROTECTED] writes: John Guido may or may not realise it, but he seems to have been John managing people (in some sense of 'managing', anyway) quite John successfully over the past decade or so. John John Just you shush! If he hears you, he'll return

Re: reading files into dicts

2005-12-29 Thread rbt
Gary Herron wrote: rbt wrote: What's a good way to write a dictionary out to a file so that it can be easily read back into a dict later? I've used realines() to read text files into lists... how can I do the same thing with dicts? Here's some sample output that I'd like to write to file

fetching webpage

2005-12-29 Thread yookyung
I am trying to crawl webpages in citeseer domain (a collection of research papers mostly in computer science). I have used the following code snippet. # import urllib sock = urllib.urlopen(http://citeseer.ist.psu.edu;) webcontent = sock.read().split('\n') sock.close() print webcontent

Best library for basic stats

2005-12-29 Thread MKoool
Is there any decent library for basic stats? I am just looking for the basics, like quartiles, median, standard deviation, mean, min, max, regression, etc. I was going to use SciPy, but I use Python 2.4, and it seems to be supported primarily for 2.3... What other statistical packages have any

Re: pyfltk2 tutorial

2005-12-29 Thread drobinow
Siraj Kutlusan wrote: I want to use pyfltk2 because of its simplicity but there seem to be no tutorials done for it. Could anyone give me a link to one please? I think pyfltk is even simpler. There's a tutorial included at the URL below http://junk.mikeasoft.com/pyfltkmanual.pdf --

Re: fetching webpage

2005-12-29 Thread charlespina
I went to the URL you posted, and it looks like that error is the content you should be recieving. Try refreshing your browser cache, you could be loading a cached page. Charles yookyung wrote: I am trying to crawl webpages in citeseer domain (a collection of research papers mostly in computer

Re: Extending Python with C++

2005-12-29 Thread jeremito
Unfortunately, I need to know a bit more than just the concept 'extern C'. I am really slow at this. Can anyone point me towards some examples or a tutorial (other than the one from python.org, I didn't understand that one)? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows and python execution

2005-12-29 Thread Thorsten Kampe
* Mark Carter (2005-12-26 23:06 +0100) I had installed python 2.4 in the standard way, so py files were already associated with python when you double-clicked them from Explorer. Using my set meant that if I wanted to use py files from the command line, I could just type out the script name

Is len() restricted to (positive) 32-bit values?

2005-12-29 Thread Josh Taylor
I have a class that wraps a large file and tries to make it look like a string w.r.t. slicing. Here, large file means on the order of hundreds of GB. All the slicing/indexing stuff through __getitem__() works fine, but len() is quite broken. It seems to be converting the value returned by

Re: Is len() restricted to (positive) 32-bit values?

2005-12-29 Thread Jean-Paul Calderone
On 29 Dec 2005 19:14:36 -0800, Josh Taylor [EMAIL PROTECTED] wrote: I have a class that wraps a large file and tries to make it look like a string w.r.t. slicing. Here, large file means on the order of hundreds of GB. All the slicing/indexing stuff through __getitem__() works fine, but len() is

  1   2   >