Re: Fortran vs Python - Newbie Question

2007-03-27 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Mark Morss wrote: Well, the discussion was about Python vs. Fortran, and Pyrex, as I understand it, is a tool for linking C to Python. I think it's more than that. It's more a subset of Python with a little static typing. Ciao, Marc 'BlackJack' Rintsch --

Re: PDB does not allow jumping to first statement?

2007-03-27 Thread Chris Lasher
On Mar 27, 5:59 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I tried on GNU/Linux and Python versions 2.4 and 2.5 and get the same behavior. Best as I can tell, it looks like a bug in Python. pdb, pydb, rpdb2 all handle the jump command by changing the frame f_lineno value. When the

rpy: parsing arrays from python to R

2007-03-27 Thread Frank
Hi, I use rpy on linux to call R functions. Works fine up to the following problem: How to parse arrays (no vectors, that means 2-dimensional) to R without much effort? The following code solves the problem (in two different ways). However, it seems to me that there might be a way to do it more

Re: urllib timeout issues

2007-03-27 Thread Gabriel Genellina
En Tue, 27 Mar 2007 16:21:55 -0300, supercooper [EMAIL PROTECTED] escribió: I am downloading images using the script below. Sometimes it will go for 10 mins, sometimes 2 hours before timing out with the following error: urllib.urlretrieve(fullurl, localfile) IOError: [Errno socket

Re: Extending a class on runtime

2007-03-27 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Hi, Let's say you have a bunch of instatiated objects of the same class on your hands and you want to had some functionality to them. Then I'd just do it. I'm facing this situation while working with PyGTK and libglade to create a GUI. Libglade creates a whole

Re: urllib timeout issues

2007-03-27 Thread supercooper
On Mar 27, 3:13 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 27 Mar 2007 16:21:55 -0300, supercooper [EMAIL PROTECTED] escribió: I am downloading images using the script below. Sometimes it will go for 10 mins, sometimes 2 hours before timing out with the following error:

Re: How can I catch all exception in python?

2007-03-27 Thread Jeff McNeil
You could also use sys.excepthook if you're trying to handle uncaught exceptions. On 27 Mar 2007 11:45:54 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Mar 27, 9:15 pm, [EMAIL PROTECTED] wrote: Technically speaking, you can catch all errors as follows: try: # do something

Re: Auto execute python in USB flash disk

2007-03-27 Thread Shane Geiger
Is there a way to auto execute a python script after a user double clicks to open a folder on the USB drive? How can you capture that double click event on a specific folder? That would depend on what desktop / Operating System you're using. If it's Windows, you need a shell extension

plotting R graphics with rpy: figure crashes

2007-03-27 Thread Frank
Hi, I use rpy to plot functions and have the following problem. When I execute the following code line by line (start python and then execute line by line) the resulting figure looks as it should. However, when I put these lines in a script and execute the script the figure appears for half a

Re: Auto execute python in USB flash disk

2007-03-27 Thread Larry Bates
Brian Erhard wrote: I am still fairly new to python and wanted to attempt a home made password protection program. There are files that I carry on a USB flash drive that I would like to password protect. Essentially, I would like to password protect an entire directory of files. Is there a

Re: Auto execute python in USB flash disk

2007-03-27 Thread José Antonio Salazar Montenegro
I suspect he wants to do this just for the kicks. Just for completion, Truecrypt does precisely what you need. It has to be installed, but you could carry the installer unencrypted in the same USB drive. Larry Bates wrote: Brian Erhard wrote: I am still fairly new to python and

Re: plot dendrogram with python

2007-03-27 Thread Jon
does anyone know if there is a way to plot a dendrogram with python. Pylab or matplotlib do not provide such a function. This makes a datafile for gnuplot using output from pycluster. I'd be interested to see something like this added to pylab/matplotlib, although I don't have time myself. Not

Re: pattern search

2007-03-27 Thread Diez B. Roggisch
Paul McGuire schrieb: On Mar 27, 10:18 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: Fabian Braennstroem wrote: Hi, I wrote a small gtk file manager, which works pretty well. Until now, I am able to select different file (treeview entries) just by extension (done with 'endswith'). See the

Re: socket read timeout

2007-03-27 Thread hg
Steve Holden wrote: Jarek Zgoda wrote: hg napisa?(a): I am looking for the most efficient / cleanest way to implement a socket read with timeout (Windows mainly but would be great if the same code worked under *nix) Did you see http://www.timo-tasi.org/python/timeoutsocket.py ? Note

PyPy 1.0: JIT compilers for free and more

2007-03-27 Thread Carl Friedrich Bolz
== PyPy 1.0: JIT compilers for free and more == Welcome to the PyPy 1.0 release - a milestone integrating the results of four years of research, engineering, management and sprinting efforts, concluding the 28 months

Re: Please help!! SAXParseException: not well-formed (invalid token)

2007-03-27 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: I checked the file format (of the file containing the n-tilde - ñ) and it is indeed UTF-8! I'm baffled! Any ideas? Without you showing us your actual code and data - no. Because it works for me and a lot of other people. Diez --

Re: urllib timeout issues

2007-03-27 Thread Gabriel Genellina
En Tue, 27 Mar 2007 17:41:44 -0300, supercooper [EMAIL PROTECTED] escribió: On Mar 27, 3:13 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 27 Mar 2007 16:21:55 -0300, supercooper [EMAIL PROTECTED] escribió: I am downloading images using the script below. Sometimes it will go

Re: pattern search

2007-03-27 Thread Gabriel Genellina
En Tue, 27 Mar 2007 18:42:15 -0300, Diez B. Roggisch [EMAIL PROTECTED] escribió: Paul McGuire schrieb: On Mar 27, 10:18 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: Fabian Braennstroem wrote: while iter: value = model.get_value(iter, 1)

Python automatic testing: mocking an imported module?

2007-03-27 Thread Silfheed
Heyas So we have the following situation: we have a testee.py that we want to automatically test out and verifiy that it is worthy of being deployed. We want our tester.py to test the code for testee.py without changing the code for testee.py. testee.py has a module in it that we want to mock

Re: socket read timeout

2007-03-27 Thread Facundo Batista
hg wrote: Do you mean use select ? No, socket's timeout: import socket s = socket.socket() s.settimeout(5) ... Regards, -- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ -- http://mail.python.org/mailman/listinfo/python-list

Re: with timeout(...):

2007-03-27 Thread Paul Rubin
Nick Craig-Wood [EMAIL PROTECTED] writes: It could be made to work I'm sure by getting the interpreter to check for timeouts every few hundred bytecodes (like it does for thread switching). Is there some reason not to use sigalarm for this? --

Re: PyPy 1.0: JIT compilers for free and more

2007-03-27 Thread skip
Carl Welcome to the PyPy 1.0 release... ... Carl - A **Just-In-Time Compiler generator** able to **automatically** Carl enhance the low level versions of our Python interpreter, Carl leading to run-time machine code that runs algorithmic examples Carl at speeds

reusing generators

2007-03-27 Thread [EMAIL PROTECTED]
Hello, I have a two large files that I need to read in records from and compare in a pairwise fashion: Memory is an issue, so I want to use a generator to get each record one at a time. However, doing the comparisons with nested for loops, the inner generator will run out of items. How can I

Re: Auto execute python in USB flash disk

2007-03-27 Thread Ben Finney
Ene [EMAIL PROTECTED] writes: Install the free PortablePython from http://www.portablepython.com/ on your USB flash drive, and go from there. To be clear: In addition to being a zero-cost download, Portable Python is free software: Python® distribution included in Portable Python is

Re: reusing generators

2007-03-27 Thread Paul Rubin
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: Hello, I have a two large files that I need to read in records from and compare in a pairwise fashion: Memory is an issue, so I want to use a generator to get each record one at a time. However, doing the comparisons with nested for loops, the inner

Re: PyPy 1.0: JIT compilers for free and more

2007-03-27 Thread Luis M. González
Carl Friedrich Bolz wrote: == PyPy 1.0: JIT compilers for free and more == Welcome to the PyPy 1.0 release - a milestone integrating the results of four years of research, engineering, management and sprinting

looking for RSS generator

2007-03-27 Thread jd
I'm looking for sample code to generate an RSS feed. I can annotate my html code with comments/tags to mark the articles, all I need is an engine to process the pages and generate the rss file. If I was a python wiz I'm sure I could do this quickly but as a newbie, an assist here would certainly

Re: Fortran vs Python - Newbie Question

2007-03-27 Thread Beliavsky
On Mar 27, 6:32 am, [EMAIL PROTECTED] (Cameron Laird) wrote: In article [EMAIL PROTECTED],Beliavsky [EMAIL PROTECTED] wrote: . . . Your experience with Fortran is dated -- see below. I'll be more clear: Fortran

Re: Python automatic testing: mocking an imported module?

2007-03-27 Thread Chris Lasher
On Mar 27, 6:18 pm, Silfheed [EMAIL PROTECTED] wrote: Heyas So we have the following situation: we have a testee.py that we want to automatically test out and verifiy that it is worthy of being deployed. We want our tester.py to test the code for testee.py without changing the code for

PyDoc -g call to Alt-Installed Python

2007-03-27 Thread D.Hering
I have both python2.4 and 2.5 installed on a (k)ubuntu linux box. I'm trying to get the call to pydoc -g (pydoc server called from the system console) to recognize python2.5 rather than the system's default 2.4 release. I've tried several different things so far, to no avail. My console scripting

Re: socket read timeout

2007-03-27 Thread hg
Facundo Batista wrote: hg wrote: Do you mean use select ? No, socket's timeout: import socket s = socket.socket() s.settimeout(5) ... Regards, -- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ My issue with that is the effect on

Re: looking for RSS generator

2007-03-27 Thread alex23
I'm looking for sample code to generate an RSS feed. For this, I highly recommend PyRSS2Gen: http://www.dalkescientific.com/Python/PyRSS2Gen.html Very straightforward. I can annotate my html code with comments/tags to mark the articles, all I need is an engine to process the pages and

Re: Fortran vs Python - Newbie Question

2007-03-27 Thread Steven D'Aprano
On Tue, 27 Mar 2007 12:11:01 -0600, Erik Johnson wrote: But seriously... I'm not a language or architecture guru. Is there any real difference between a JVM and an interpreter? I mean, I have some general feel that bytecode is a lower-level, more direct and more efficient thing to be

Re: urllib timeout issues

2007-03-27 Thread Nick Vatamaniuc
On Mar 27, 4:41 pm, supercooper [EMAIL PROTECTED] wrote: On Mar 27, 3:13 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 27 Mar 2007 16:21:55 -0300, supercooper [EMAIL PROTECTED] escribió: I am downloading images using the script below. Sometimes it will go for 10 mins,

Re: PyPy 1.0: JIT compilers for free and more

2007-03-27 Thread Ben Finney
Carl Friedrich Bolz [EMAIL PROTECTED] writes: == PyPy 1.0: JIT compilers for free and more == Welcome to the PyPy 1.0 release - a milestone integrating the results of four years of research, engineering,

Re: Python automatic testing: mocking an imported module?

2007-03-27 Thread Ben Finney
Silfheed [EMAIL PROTECTED] writes: So we have the following situation: we have a testee.py that we want to automatically test out and verifiy that it is worthy of being deployed. This is sometimes called the module under test. I wish there was a more succinct name in common usage. We want

ANN: Gracie v0.2 -- a local-account OpenID provider

2007-03-27 Thread Ben Finney
Howdy all, I'm pleased to announce the creation of the Gracie project. What is Gracie? === Gracie is an OpenID server (a provider in OpenID terminology) that serves OpenID identities for the local system PAM accounts. It authenticates users with a username/password challenge. The

Re: __init__.py

2007-03-27 Thread Tina I
Jorgen Grahn wrote: On Mon, 26 Mar 2007 08:27:19 +0200, Tina I [EMAIL PROTECTED] wrote: Tina I wrote: When looking at other peoples code (to learn from it) I keep seeing an empty file named __init__.py. What's the purpose of this? Thanks Tina Duh! Never mind... found it. Kinda neat

Re: with timeout(...):

2007-03-27 Thread Klaas
On Mar 27, 3:28 pm, Paul Rubin http://[EMAIL PROTECTED] wrote: Nick Craig-Wood [EMAIL PROTECTED] writes: It could be made to work I'm sure by getting the interpreter to check for timeouts every few hundred bytecodes (like it does for thread switching). Is there some reason not to use

Can't use class variable with private nested class

2007-03-27 Thread tron . thomas
The following code will print a message only once: class PrintOnce: printOnce = True def __init__(self): if PrintOnce.printOnce: print 'Printing once.' PrintOnce.printOnce = False first = PrintOnce() second =

Re: Can't use class variable with private nested class

2007-03-27 Thread Alex Martelli
[EMAIL PROTECTED] wrote: ... class Outer: class Inner: printOnce = True def __init__(self): if Outer.Inner.printOnce: print 'Printing once.' Outer.Inner.printOnce = False

Re: with timeout(...):

2007-03-27 Thread Hendrik van Rooyen
Nick Craig-Wood [EMAIL PROTECTED] wrote: Hendrik van Rooyen [EMAIL PROTECTED] wrote: But would be useful to be able to do without messing with threads and GUI and imports. Could be hard to implement as the interpreter would have to be assured of getting control back

Re: Mastering Python

2007-03-27 Thread Hendrik van Rooyen
Bruno Desthuilliers [EMAIL PROTECTED] wrote: Dennis Lee Bieber a écrit : On Wed, 21 Mar 2007 21:40:51 +0100, Bruno Desthuilliers [EMAIL PROTECTED] declaimed the following in comp.lang.python: For future reference, and I hope you don't mind the lesson, I don't. the past tense of bind is

[ python-Bugs-1685773 ] tarfile file names under win32

2007-03-27 Thread SourceForge.net
Bugs item #1685773, was opened at 2007-03-22 08:12 Message generated for change (Comment added) made by indi4source You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1685773group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1495754 ] os.listdir(): inconsistent behavior with trailing spaces

2007-03-27 Thread SourceForge.net
Bugs item #1495754, was opened at 2006-05-26 23:28 Message generated for change (Comment added) made by jerrykhan You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1495754group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1668596 ] distutils chops the first character of filenames

2007-03-27 Thread SourceForge.net
Bugs item #1668596, was opened at 2007-02-25 17:15 Message generated for change (Comment added) made by draghuram You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1668596group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1689458 ] pdb unable to jump to first statement

2007-03-27 Thread SourceForge.net
Bugs item #1689458, was opened at 2007-03-27 16:07 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1689458group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1290505 ] strptime(): can't switch locales more than once

2007-03-27 Thread SourceForge.net
Bugs item #1290505, was opened at 2005-09-14 00:50 Message generated for change (Comment added) made by kovan You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1290505group_id=5470 Please note that this message will contain a full copy of the comment thread,

[ python-Bugs-1290505 ] strptime(): can't switch locales more than once

2007-03-27 Thread SourceForge.net
Bugs item #1290505, was opened at 2005-09-13 15:50 Message generated for change (Comment added) made by bcannon You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1290505group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-471432 ] __cdecl / __stdcall unspecified in *.h

2007-03-27 Thread SourceForge.net
Bugs item #471432, was opened at 2001-10-15 12:18 Message generated for change (Comment added) made by bcannon You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=471432group_id=5470 Please note that this message will contain a full copy of the comment thread,

[ python-Bugs-1688393 ] sock.recvfrom(-24) crashes

2007-03-27 Thread SourceForge.net
Bugs item #1688393, was opened at 2007-03-26 11:13 Message generated for change (Comment added) made by facundobatista You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1688393group_id=5470 Please note that this message will contain a full copy of the

[ python-Bugs-1689617 ] Intel icc build fails with optimizations -O2

2007-03-27 Thread SourceForge.net
Bugs item #1689617, was opened at 2007-03-28 04:26 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1689617group_id=5470 Please note that this message will contain a full copy of

<    1   2