XML Parsing

2007-03-27 Thread [EMAIL PROTECTED]
I want to parse this XML file: filename Hello filename2 Hello2 This XML will be in a file called filecreate.xml As you might have guessed, I want to create files from this XML file contents, so how can I do this? What modules should I use? What options do I have? Where can I find

Re: Python automatic testing: mocking an imported module?

2007-03-27 Thread Peter Otten
Silfheed wrote: > 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 > tha

Re: Fortran vs Python - Newbie Question

2007-03-27 Thread Alex Gibson
"Beliavsky" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mar 26, 10:16 am, [EMAIL PROTECTED] (Cameron Laird) wrote: >> In article >> <[EMAIL PROTECTED]>,[EMAIL PROTECTED] >> <[EMAIL PROTECTED]> wrote: > >> >Is there a mac version?? >> >Thanks >> >Chris >> >> Yes. >> >> Sever

Re: wxPython, Syntax highlighting

2007-03-27 Thread Justin Ezequiel
On Mar 28, 2:56 pm, "Eric von Horst" <[EMAIL PROTECTED]> wrote: > I am looking for wx widget that has the ability to show text, edit the > text (like a TextCtrl) but also does syntax highlighting (if the text > is e.g. XML or HTML). > I have been looking in the latest wxPython version but I could

Re: PyDoc -g call to Alt-Installed Python

2007-03-27 Thread Peter Otten
D.Hering wrote: > 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

Re: Fortran vs Python - Newbie Question

2007-03-27 Thread Tim Roberts
Steven D'Aprano <[EMAIL PROTECTED]> wrote: >On Mon, 26 Mar 2007 06:40:49 -0700, kyosohma wrote: > >> Fortran also appears to be a compiled language, whereas Python is an >> interpreted language. > >Sheesh. Do Java developers go around telling everybody that Java is an >interpreted language? I don'

wxPython, Syntax highlighting

2007-03-27 Thread Eric von Horst
Hi, I am looking for wx widget that has the ability to show text, edit the text (like a TextCtrl) but also does syntax highlighting (if the text is e.g. XML or HTML). I have been looking in the latest wxPython version but I could not really find anything. Any suggestions? (I need this because my

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 pa

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

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

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

Re: with timeout(...):

2007-03-27 Thread Klaas
On Mar 27, 3:28 pm, Paul Rubin 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

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

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

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

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

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

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

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 c

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 certainl

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 sprint

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

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

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 restar

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 t

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? -- http://mail.python.org/mailman/listinfo/pytho

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

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 in

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,

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

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 -- http://mail.python.org/mailman/lis

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 p

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

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

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

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 seco

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

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

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 w

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 soc

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

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

urllib timeout issues

2007-03-27 Thread supercooper
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: Traceback (most recent call last): File "ftp_20070326_Downloads_cooperc_FetchLibreMapProjectDRGs.py", line 108, i n ? urllib.urlretrieve(fullurl, lo

Re: 16bit RGB with Image module

2007-03-27 Thread Will McGugan
Jason B wrote: > Well I kept screwing around and funny thing, this works: > > import sys, Image > > if len(sys.argv) == 2: > print "\nReading: "+sys.argv[1] > image_file = open(sys.argv[1], "rb") > pixel_data = image_file.read() > > im = Image.fromstring("RGB", (326, 325), pixel_data, "ra

Re: pattern search

2007-03-27 Thread Paul McGuire
On Mar 27, 3:13 pm, Fabian Braennstroem <[EMAIL PROTECTED]> wrote: > Hi to all, > > Wojciech Mu?a schrieb am 03/27/2007 03:34 PM: > > > Fabian Braennstroem wrote: > >> Now, I would like to improve it by searching for different 'real' > >> patterns just like using 'ls' in bash. E.g. the entry > >> '

Re: pattern search

2007-03-27 Thread Paul McGuire
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 little

Extending a class on runtime

2007-03-27 Thread rdaunoravicius
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. I'm facing this situation while working with PyGTK and libglade to create a GUI. Libglade creates a whole object tree representing the GUI out of an XML file, and

Re: Numeric Soup

2007-03-27 Thread Erik Johnson
"Robert Kern" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > http://www.scipy.org/History_of_SciPy > > numpy is the current array package and supercedes Numeric and numarray. scipy > provides a bunch of computational routines (linear algebra, optimization, > statistics, signal proc

Re: How can I catch all exception in python?

2007-03-27 Thread irstas
On Mar 27, 9:15 pm, [EMAIL PROTECTED] wrote: > Technically speaking, you can catch all errors as follows: > > try: ># do something > except Exception, e: >print e That won't catch exceptions/errors that don't derive from Exception class. For example a string won't be caught: try: raise

Re: Help in Placing Object in Memory

2007-03-27 Thread Harry George
"Clement" <[EMAIL PROTECTED]> writes: > I am newbie to Python.. i want to know something.. > > can i place an object in disk instead of placing in Main Memory...? > > If possible, can you please explain with some scripts...? > > can two python script share a common object? > F

Re: 16bit RGB with Image module

2007-03-27 Thread Jason B
Well I kept screwing around and funny thing, this works: import sys, Image if len(sys.argv) == 2: print "\nReading: "+sys.argv[1] image_file = open(sys.argv[1], "rb") pixel_data = image_file.read() im = Image.fromstring("RGB", (326, 325), pixel_data, "raw", "BGR;16") im.show() Although I

Re: How can I catch all exception in python?

2007-03-27 Thread Gabriel Genellina
En Tue, 27 Mar 2007 15:09:18 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > I read the document here about exception handling in python: > > http://www.diveintopython.org/file_handling/index.html > > Can you please tell me how can I catch all exception in python? > like this in Java: >

16bit RGB with Image module

2007-03-27 Thread Jason B
Hi all, I'm still new to all of this, but I'm trying to do something here that *seems* like it should be pretty simple. All I want to do is take an array of pixel data from a file (no header data or anything, just pixel data) in RGB565 format and save it off to a bitmap file - or display it, i

Re: How can I catch all exception in python?

2007-03-27 Thread kyosohma
On Mar 27, 1:09 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I read the document here about exception handling in python: > > http://www.diveintopython.org/file_handling/index.html > > Can you please tell me how can I catch all exception in python? > like this in Java: > try { > > > }

Re: Fortran vs Python - Newbie Question

2007-03-27 Thread Erik Johnson
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Sheesh. Do Java developers go around telling everybody that Java is an > interpreted language? I don't think so. > > What do you think the "c" in ".pyc" files stands for? "Cheese"? On the contrary... Sun is very care

Re: Fortran vs Python - Newbie Question

2007-03-27 Thread Mark Morss
On Mar 27, 12:55 pm, Jaap Spies <[EMAIL PROTECTED]> wrote: > Mark Morss wrote: > > > Maybe somebody reading this will be able to convince me to look again > > at Numpy/Scipy, but for the time being I will continue to do my > > serious numerical computation in Fortran. > > What I am missing in this

Re: pattern search

2007-03-27 Thread Fabian Braennstroem
Hi to all, Wojciech Mu?a schrieb am 03/27/2007 03:34 PM: > Fabian Braennstroem wrote: >> Now, I would like to improve it by searching for different 'real' >> patterns just like using 'ls' in bash. E.g. the entry >> 'car*.pdf' should select all pdf files with a beginning 'car'. >> Does anyone have

How can I catch all exception in python?

2007-03-27 Thread [EMAIL PROTECTED]
I read the document here about exception handling in python: http://www.diveintopython.org/file_handling/index.html Can you please tell me how can I catch all exception in python? like this in Java: try { } catch (Throwable t) { ... } -- http://mail.python.org/mailman/listinfo/python-lis

Re: Help in Placing Object in Memory

2007-03-27 Thread [EMAIL PROTECTED]
On Mar 27, 10:33 am, "Clement" <[EMAIL PROTECTED]> wrote: > I am newbie to Python.. i want to know something.. > > can i place an object in disk instead of placing in Main Memory...? > > If possible, can you please explain with some scripts...? > > can two python script share a common o

Handling exception thrown by Boost.Python c-extension in Python code

2007-03-27 Thread MarkE
I'm just getting started on Boost Python and may have missed this obvious looking problem somewhere. Given a c-extension "testext" written using Boost Python containing a base class "Base", a derived class "Derived", and a function "doSomething" which expects a "Derived" parameter, if I pass it a

Re: Auto execute python in USB flash disk

2007-03-27 Thread Tim Golden
Brian Erhard wrote: > 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

Re: Numeric Soup

2007-03-27 Thread Robert Kern
Ene wrote: > As it stands Matplotlib does not > support numpy (thus my suggestion to install two of the three - my > choice: numarray + numpy) matplotlib certainly supports numpy. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible

Re: Numeric Soup

2007-03-27 Thread Ene
On Mar 27, 9:49 am, "Erik Johnson" <[EMAIL PROTECTED]> wrote: > I am just starting to explore doing some scientific type data analysis > using Python, and am a little confused by the different incarnations of > modules (e.g., try Google("Python numeric"). > > There is SciPy, NumPy, NumArray

Re: Auto execute python in USB flash disk

2007-03-27 Thread kyosohma
On Mar 27, 11:56 am, "Brian Erhard" <[EMAIL PROTECTED]> 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 prot

Re: Auto execute python in USB flash disk

2007-03-27 Thread Ene
On Mar 27, 9:56 am, "Brian Erhard" <[EMAIL PROTECTED]> 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 prote

Re: Numeric Soup

2007-03-27 Thread Robert Kern
Erik Johnson wrote: > I am just starting to explore doing some scientific type data analysis > using Python, and am a little confused by the different incarnations of > modules (e.g., try Google("Python numeric"). > > There is SciPy, NumPy, NumArray, Numeric... I know some of these are >

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

2007-03-27 Thread jvictor118
I checked the file format (of the file containing the n-tilde - ñ) and it is indeed UTF-8! I'm baffled! Any ideas? Thanks, Jason On Mar 27, 11:16 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I've been using the xml.sax.handler module to do event-driven parsing

Auto execute python in USB flash disk

2007-03-27 Thread Brian Erhard
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 way to auto execute a pyt

Re: Fortran vs Python - Newbie Question

2007-03-27 Thread Jaap Spies
Mark Morss wrote: > > Maybe somebody reading this will be able to convince me to look again > at Numpy/Scipy, but for the time being I will continue to do my > serious numerical computation in Fortran. > What I am missing in this discussion is a link to Pyrex to speed up Python: Pyrex is almost

Re: Help in Placing Object in Memory

2007-03-27 Thread Bruno Desthuilliers
Clement a écrit : > I am newbie to Python.. To Python only, or to both Python and programming in general ? > i want to know something.. > > can i place an object in disk instead of placing in Main Memory...? You can store it on disk (cf pickles and friends), but to actually use it

Re: enumerating processes

2007-03-27 Thread Shane Geiger
I believe you are looking for os.getpid() I apologize for providing that bit of incorrect info. It looks to me as if Python 1.5 had os.process which might have done what you wanted (although perhaps not in an OS-independent way). I wonder why there isn't an OS-independent way to do that in

Numeric Soup

2007-03-27 Thread Erik Johnson
I am just starting to explore doing some scientific type data analysis using Python, and am a little confused by the different incarnations of modules (e.g., try Google("Python numeric"). There is SciPy, NumPy, NumArray, Numeric... I know some of these are related and some are separate,

Re: shutil.copy Problem

2007-03-27 Thread John Nagle
Facundo Batista wrote: > David Nicolson wrote: > > >>Thanks, but it's definitely not the print. In original the code the >>print statements are replaced by a call to a log method. >> >>Besides, the exception would be different if it was thrown outside of >>the try block. > > > The best you

Re: Zip file writing progress (callback proc)

2007-03-27 Thread Larry Bates
durumdara wrote: > Hi! > > I want to check my zip file writings. > I need some callback procedure to show a progress bar. > Can I do that? > I don't want to modify the PyLib module to extend it, because if I get > another py, the changes are lost. > This happening too if I copy the zip module to m

Re: exit to interpreter?

2007-03-27 Thread jay graves
On Mar 23, 12:52 pm, belinda thom <[EMAIL PROTECTED]> wrote: > be processed up the call stack. My problem is this. I'd also like it > to handle a special string (e.g. 'quit'), in which case control > should return to the Python command line as opposed to returning the > string up the call stack. M

Re: Help in Placing Object in Memory

2007-03-27 Thread Erik Johnson
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What do you mean by that? They can both load a pickled object, yes. But they > can't share it as a at-runtime object, where changes in one script are > immediately are known to the other. > > To do such a thing, look

Re: Help in Placing Object in Memory

2007-03-27 Thread Michael L Torrie
On Tue, 2007-03-27 at 16:49 +0200, Diez B. Roggisch wrote: > > can two python script share a common object? > > What do you mean by that? They can both load a pickled object, yes. But they > can't share it as a at-runtime object, where changes in one script are > immediately are known to the o

Re: pattern search

2007-03-27 Thread Wojciech Muła
Fabian Braennstroem wrote: > Now, I would like to improve it by searching for different 'real' > patterns just like using 'ls' in bash. E.g. the entry > 'car*.pdf' should select all pdf files with a beginning 'car'. > Does anyone have an idea, how to do it? Use module glob. -- http://mail.python.

Re: SPE question

2007-03-27 Thread SPE - Stani's Python Editor
On 27 Mrz., 14:01, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I believe that just deleting the folders should work No, never delete the folder if you used the windows installer (*.exe)! Go to your control panel>Add/Remove Programs and there should be an entry "python*-spe*" with an unins

Re: pattern search

2007-03-27 Thread Diez B. Roggisch
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 little part below: > > self.pathlist1=[ ] > self.

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

2007-03-27 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I've been using the xml.sax.handler module to do event-driven parsing > of XML files in this python application I'm working on. However, I > keep having really pesky invalid token exceptions. Initially, I was > only getting them on control characters, and a little "sed -

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

2007-03-27 Thread kyosohma
On Mar 27, 9:59 am, [EMAIL PROTECTED] wrote: > I've been using the xml.sax.handler module to do event-driven parsing > of XML files in this python application I'm working on. However, I > keep having really pesky invalid token exceptions. Initially, I was > only getting them on control characters,

Re: exit to interpreter?

2007-03-27 Thread Steven W. Orr
On Friday, Mar 23rd 2007 at 10:52 -0700, quoth belinda thom: =>I'm writing a function that polls the user for keyboard input, =>looping until it has determined that the user has entered a valid =>string of characters, in which case it returns that string so it can =>be processed up the call

Re: about second parameter of signal handler func.

2007-03-27 Thread Gabriel Genellina
En Tue, 27 Mar 2007 02:34:48 -0300, Bjoern Schliessmann <[EMAIL PROTECTED]> escribió: >> In C, a signal handler function has only one parameter, that is >> signal number. But in Python(import signal), a signal handler >> function has two parameters, the first is signal number, the >> second is "

pattern search

2007-03-27 Thread Fabian Braennstroem
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 little part below: self.pathlist1=[ ] self.patternlist=[ ] while iter:

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

2007-03-27 Thread jvictor118
I've been using the xml.sax.handler module to do event-driven parsing of XML files in this python application I'm working on. However, I keep having really pesky invalid token exceptions. Initially, I was only getting them on control characters, and a little "sed -e 's/ [^[:print:]]/ /g' $1;" took

Re: Help in Placing Object in Memory

2007-03-27 Thread Diez B. Roggisch
Clement wrote: > I am newbie to Python.. i want to know something.. > > can i place an object in disk instead of placing in Main Memory...? > If possible, can you please explain with some scripts...? See the module pickle and it's examples. > can two python script share a common ob

Re: socket read timeout

2007-03-27 Thread skip
>> 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) Jarek> Did you see http://www.timo-tasi.org/python/timeoutsocket.py ? Also socket objects have timeout attrib

Help in Placing Object in Memory

2007-03-27 Thread Clement
I am newbie to Python.. i want to know something.. can i place an object in disk instead of placing in Main Memory...? If possible, can you please explain with some scripts...? can two python script share a common object? -- http://mail.python.org/mailman/listinfo/python-list

Re: Fortran vs Python - Newbie Question

2007-03-27 Thread Mark Morss
On Mar 26, 12:59 pm, "Erik Johnson" <[EMAIL PROTECTED]> wrote: > <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > OK... > > I've been told that Both Fortran and Python are easy to read, and are > > quite useful in creating scientific apps for the number crunching, but > > then

Re: Use threads or Tkinter event loop?

2007-03-27 Thread kyosohma
On Mar 27, 9:07 am, Kevin Walzer <[EMAIL PROTECTED]> wrote: > Kevin Walzer wrote: > > I'm trying to decide whether I need threads in my Tkinter application or > > not. My app is a front end to a command-line tool; it feeds commands to > > the command-line program, then reads its output and displays

Type allocation in extensions

2007-03-27 Thread Nicholas Milkovits
Hi everyone, I've been reading through the documentation on extending and embedding python and the C API and I have a question about how allocation occurs of one type from another type. For example lets so I make to C module foo.c and bar.c and each has a python type. If I want to define a method

  1   2   >