Twisted 2.5.0 released

2007-01-11 Thread Christopher Armstrong
Get Twisted: http://twistedmatrix.com/ Twisted is an event-based framework for internet applications which works on Python 2.3.x, 2.4.x, and 2.5.x. Twisted 2.5.0 is a major feature release, with several interesting new developments and a great number of bug fixes. Some of the highlights follow.

PyCon reminder: register now!

2007-01-11 Thread A.M. Kuchling
Remember, Monday January 15th is the last day for early-bird registration for PyCon 2007 (February 23-25, in Addison Texas). For registration, go to http://us.pycon.org/TX2007/Registration. If you're interested in the tutorials you should register as soon as possible. One tutorial is nearing

Re: Print message with Colors

2007-01-11 Thread Laurent Pointal
prk a écrit : Hi Folks, Is there any procesure for print messages with colors. Yes, see: http://www.google.fr/search?q=python+print+color http://groups.google.fr/groups?as_q=python+print+colornum=100as_ugroup=comp.lang.python See also ANSI escape sequences for the more general subject of

Re: Newbie - converting csv files to arrays in NumPy - Matlab vs. Numpy comparison

2007-01-11 Thread John Machin
sturlamolden wrote: oyekomova wrote: Thanks for your help. I compared the following code in NumPy with the csvread in Matlab for a very large csv file. Matlab read the file in 577 seconds. On the other hand, this code below kept running for over 2 hours. Can this program be made more

Re: Read from database, write to another database, simultaneously

2007-01-11 Thread Laurent Pointal
Bjoern Schliessmann a écrit : Sean Davis wrote: The author of one of the python database clients mentioned that using one thread to retrieve the data from the oracle database and another to insert the data into postgresql with something like a pipe between the two threads might make sense,

Antwort: Re: SubProcess _make_inheritable

2007-01-11 Thread Roland Puntaier
Thanks for pointing me to the tracker. I've seen there is already an entry for this: [ 1603907 ] subprocess: error redirecting i/o from non-console process Roland Gabriel Genellina [EMAIL PROTECTED] schrieb am 11.01.2007 05:24:03: At Wednesday 10/1/2007 13:10, Roland Puntaier wrote:

RE: dynamic library loading, missing symbols

2007-01-11 Thread Ames Andreas
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] g] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, January 10, 2007 8:52 PM Subject: Re: dynamic library loading, missing symbols I suppose this means that any subsequent libraries dlopened will not see any of

Re: The Python Papers: Submit your Quotes

2007-01-11 Thread cyberco
Like silence in music, whitespace is where Python Power shows The odd thing is that Python results in what I call YoYo-code. After writing some code I always discover a shorter, more elegant and more readable way of doing the same thing in Python. The same happens after adding more functionality.

Re: Need startup suggestions for writing a MSA viewer GUI in python

2007-01-11 Thread Joel Hedlund
This will probably be a major, but not humongous project. wxPython, pyGTk, and pyQt all have the architecture and basics you'll need, it will probably be about the same amount of work to create in all of them. Pick the one that best suites your licensing and platform needs. Thanks for the

Re: maximum number of threads

2007-01-11 Thread William Heymann
On Wednesday 10 January 2007 7:11 am, Felipe Almeida Lessa wrote: --- $ python test.py 50 100 150 200 250 300 350 Exception raised: can't start new thread Biggest number of threads: 382 --- The test.py script is attached. So you know I tried this on ubuntu edgy 64bit edition on a

Re: Using Excel With Python

2007-01-11 Thread david brochu jr
Try using ExcelApp.Close(). This should kill the entire application (it might prompt for a Save). -- http://mail.python.org/mailman/listinfo/python-list

Seattle Python Interest Group Thursday at 7:00 PM

2007-01-11 Thread jamesthiele . usenet
Seattle Python Interest Group Meeting Thursday, Jan 11th at 7:00 PM Bar underneath the Third Place Books in Ravenna. http://www.ravennathirdplace.com/ NE 65th St 20th Ave NE -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to protect a piece of critical code?

2007-01-11 Thread robert
Hendrik van Rooyen wrote: robert [EMAIL PROTECTED] wrote: List .append() and .pop() will be atomic in any Python though its not mentioned explicitely - otherwise it would be time to leave Python. There is also Queue.Queue - though it has unneccessary overhead for most purposes. am aware

os.popen() not executing command on windows xp

2007-01-11 Thread nic
On my system (WinXP) typing the following line into command prompt(cmd.exe) successfully scans the file test1.txt: c:\Program Files\Grisoft\AVG Free\avgscan.exe c:\program files\temp1\test1.txt Yet the python script: import os a = os.popen('c:\Program Files\Grisoft\AVG Free\avgscan.exe c:\program

Re: os.popen() not executing command on windows xp

2007-01-11 Thread Gabriel Genellina
At Thursday 11/1/2007 06:42, nic wrote: a = os.popen('c:\Program Files\Grisoft\AVG Free\avgscan.exe c:\program files\temp1\test1.txt') Your string contains backquotes, and they have to be escaped. Either use a raw string: os.popen(r'c:\Program...) or double all backquotes:

Re: os.popen() not executing command on windows xp

2007-01-11 Thread Justin Ezequiel
import os a = os.popen('c:\Program Files\Grisoft\AVG Free\avgscan.exe c:\program files\temp1\test1.txt') print a.read() use raw strings e.g., instead of 'c:...\avgscan...' use r'c:...\avgscan...' http://www.ferg.org/projects/python_gotchas.html#contents_item_2 --

Re: Parallel Python

2007-01-11 Thread robert
sturlamolden wrote: Nick Maclaren wrote: I wonder if too much emphasis is put on thread programming these days. Threads may be nice for programming web servers and the like, but not for numerical computing. Reading books about thread programming, one can easily get the impression that it is

Re: Parallel Python

2007-01-11 Thread robert
Nick Maclaren wrote: In article [EMAIL PROTECTED], Paul Rubin http://[EMAIL PROTECTED] writes: | | Yes, I know that it is a bit Irish for the best way to use a shared | memory system to be to not share memory, but that's how it is. | | But I thought serious MPI implementations use shared

Re: maximum number of threads

2007-01-11 Thread Cecil Westerhof
Felipe Almeida Lessa wrote: $ python test.py 50 100 150 200 250 300 350 Exception raised: can't start new thread I tried your script on a PII 300 MHz and only 150 MB. I broke it of when it reached more as 1,25 million. ;-} -- http://mail.python.org/mailman/listinfo/python-list

Re: Parallel Python

2007-01-11 Thread Sergei Organov
[EMAIL PROTECTED] (Nick Maclaren) writes: In article [EMAIL PROTECTED], Sergei Organov [EMAIL PROTECTED] writes: | | Do you mean that POSIX threads are inherently designed and implemented | to stay idle most of the time?! If so, I'm afraid those guys that | designed POSIX threads won't

Re: Maths error

2007-01-11 Thread Nick Maclaren
In article [EMAIL PROTECTED], Tim Peters [EMAIL PROTECTED] writes: | | Sure. Possibly even most. Short of writing a long gentle tutorial, | can that be improved? Alas, most people wouldn't read that either 0.5 | wink. Yes. Improved wording would be only slightly longer, and it is never

dot operations

2007-01-11 Thread [EMAIL PROTECTED]
Hi, Frequently I get to do like this: a = (1, 2, 3, 4) # some dummy values b = (4, 3, 2, 1) import operator c = map(operator.add, a, b) I am finding the last line not very readable especially when I combine couple of such operations into one line. Is it possible to overload operators, so that, I

Re: Parallel Python

2007-01-11 Thread Nick Maclaren
In article [EMAIL PROTECTED], Sergei Organov [EMAIL PROTECTED] writes: | | OK, then I don't think the POSIX threads were perpetrated to be idle | most of time. Perhaps I was being unclear. I should have added In the case where there are more threads per system than CPUs per system. The

Re: dot operations

2007-01-11 Thread robert
[EMAIL PROTECTED] wrote: Hi, Frequently I get to do like this: a = (1, 2, 3, 4) # some dummy values b = (4, 3, 2, 1) import operator c = map(operator.add, a, b) I am finding the last line not very readable especially when I combine couple of such operations into one line. Is it possible

Re: Parallel Python

2007-01-11 Thread Nick Maclaren
In article [EMAIL PROTECTED], robert [EMAIL PROTECTED] writes: | | Most threads on this planet are not used for number crunching jobs, | but for organization of execution. That is true, and it is effectively what POSIX and Microsoft threads are suitable for. With reservations, even there. |

Re: Joining threads but allowing signals to main thread?

2007-01-11 Thread Lloyd Zusman
Gabriel Genellina [EMAIL PROTECTED] writes: At Thursday 11/1/2007 03:43, Lloyd Zusman wrote: while threading.activeCount() 1: time.sleep(0.001) sys.exit(0) Is there any way to allow my program to respond to signals without having to busy-wait in the main thread? Don't worry

sleep in asyncore

2007-01-11 Thread billie
Hi all. I'm writing an authentication server by using asyncore / asynchat modules. I'd like to implement a basic brute-force protection by freezing / sleeping the current client session for a period of time (e.g. 2 seconds) when the user sends a wrong password. Does someone knows a trick to do

Re: creating simple Python scripting interfaces via C++

2007-01-11 Thread Ben Sizer
Ok, my first attempt at this creates proxy objects in Python, and stores a pointer to the C++ instance in the Python object. I cast that pointer to an int and pass it as a single parameter to the object's __init__ function. static PyObject* Actor_init(PyObject *self, PyObject *args) {

Re: Execute binary code

2007-01-11 Thread Jorgen Grahn
On Wed, 10 Jan 2007 10:31:50 -0600, Chris Mellon [EMAIL PROTECTED] wrote: On 10 Jan 2007 08:12:41 -0800, sturlamolden [EMAIL PROTECTED] wrote: Chris Mellon wrote: This works fine if the binary data is pure asm, but the impresssion the OP gave is that it's a compiled binary, which you can't

Re: Parallel Python

2007-01-11 Thread sturlamolden
robert wrote: Thus communicated data is serialized - not directly used as with threads or with custom shared memory techniques like POSH object sharing. Correct, and that is precisely why MPI code is a lot easier to write and debug than thread code. The OP used a similar technique in his

Ref count oddness with embedded Python... memory leak?

2007-01-11 Thread Ben Sizer
Here's my test-case: #include python.h int main(int argc, char *argv[]) { Py_Initialize(); Py_Finalize(); Py_Initialize(); Py_Finalize(); Py_Initialize(); Py_Finalize(); Py_Initialize(); Py_Finalize(); Py_Initialize(); Py_Finalize(); return 1; }

Type casting a base class to a derived one?

2007-01-11 Thread Frederic Rentsch
Hi all, If I derive a class from another one because I need a few extra features, is there a way to promote the base class to the derived one without having to make copies of all attributes? class Derived (Base): def __init__ (self, base_object): # ( copy all attributes ) ...

Re: Read from database, write to another database, simultaneously

2007-01-11 Thread Sean Davis
On Jan 10, 9:27 pm, johnf [EMAIL PROTECTED] wrote: Bjoern Schliessmann wrote: Sean Davis wrote: The author of one of the python database clients mentioned that using one thread to retrieve the data from the oracle database and another to insert the data into postgresql with something

Re: Type casting a base class to a derived one?

2007-01-11 Thread bearophileHUGS
Frederic Rentsch: If I derive a class from another one because I need a few extra features, is there a way to promote the base class to the derived one without having to make copies of all attributes? class Derived (Base): def __init__ (self, base_object): # ( copy all

Re: Type casting a base class to a derived one?

2007-01-11 Thread Peter Otten
Frederic Rentsch wrote: If I derive a class from another one because I need a few extra features, is there a way to promote the base class to the derived one without having to make copies of all attributes? class Derived (Base): def __init__ (self, base_object): # ( copy all

Re: Read from database, write to another database, simultaneously

2007-01-11 Thread Sean Davis
On Jan 11, 3:20 am, Laurent Pointal [EMAIL PROTECTED] wrote: Bjoern Schliessmann a écrit : Sean Davis wrote: The author of one of the python database clients mentioned that using one thread to retrieve the data from the oracle database and another to insert the data into postgresql

Reloading the already imported module

2007-01-11 Thread anil . pundoor
hi all, i have following code if condition from SIPT.xml_param_mapping import MESSAGE_PARAMETER_MAPPING else: from SIPT.msg_param_mapping import MESSAGE_PARAMETER_MAPPING

Re: Parallel Python

2007-01-11 Thread Sergei Organov
[EMAIL PROTECTED] (Nick Maclaren) writes: [...] I mean precisely the first. The C99 standard uses a bizarre consistency model, which requires serial execution, and its consistency is defined in terms of only volatile objects and external I/O. Any form of memory access, signalling or

Re: creating simple Python scripting interfaces via C++

2007-01-11 Thread David Boddie
Ben Sizer wrote: And is there anywhere else more appropriate that I should be asking this question, given the lack of responses to this and my other embedding topic so far? You could try asking on the C++ SIG mailing list at python.org: http://mail.python.org/mailman/listinfo/c++-sig David

Re: sleep in asyncore

2007-01-11 Thread Fredrik Lundh
billie [EMAIL PROTECTED] wrote: I'm writing an authentication server by using asyncore / asynchat modules. I'd like to implement a basic brute-force protection by freezing / sleeping the current client session for a period of time (e.g. 2 seconds) when the user sends a wrong password. Does

Re: dot operations

2007-01-11 Thread Paddy
[EMAIL PROTECTED] wrote: Hi, Frequently I get to do like this: a = (1, 2, 3, 4) # some dummy values b = (4, 3, 2, 1) import operator c = map(operator.add, a, b) I am finding the last line not very readable especially when I combine couple of such operations into one line. Is it possible

Re: what is the idiom for copy lots of params into self?

2007-01-11 Thread Fredrik Lundh
Emin [EMAIL PROTECTED] wrote: What made me ask the question in my original post was not so much that I had to loop over the names I wanted to save, but whether it's okay to mess with self.__dict__ or if there is another way I should be assigning to self. http://effbot.org/pyref/setattr

Re: globals accros modules

2007-01-11 Thread alf
Gabriel Genellina wrote: Change a=1 to amodule.a=1 I have multiple command line programs creating 'a' and amodule using it. Plus some import sequence dependency. So it would not work. Currently the solution in amodule is: import __main__ print __main__.a If you find yourself doing tricks

Re: Print message with Colors

2007-01-11 Thread Neil Cerutti
On 2007-01-11, Laurent Pointal [EMAIL PROTECTED] wrote: prk a écrit : Hi Folks, Is there any procesure for print messages with colors. Yes, see: http://www.google.fr/search?q=python+print+color http://groups.google.fr/groups?as_q=python+print+colornum=100as_ugroup=comp.lang.python See

Re: Internet Survey

2007-01-11 Thread jmfbahciv
In article [EMAIL PROTECTED], krw [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... In article [EMAIL PROTECTED], Lefty Bigfoot [EMAIL PROTECTED] wrote: On Wed, 10 Jan 2007 08:28:33 -0600, [EMAIL PROTECTED] wrote (in article [EMAIL PROTECTED]): In

Re: Internet Survey

2007-01-11 Thread jmfbahciv
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: On 10-Jan-2007, krw [EMAIL PROTECTED] wrote: ...and HexaPussy just wouldn't be right. SexagesimalPussy (base 60) has kind of a nice ring to it. That would cause kiddies to look up the word. But 360 would have the correct ring. /BAH --

Re: Type casting a base class to a derived one?

2007-01-11 Thread Neil Cerutti
On 2007-01-11, Frederic Rentsch [EMAIL PROTECTED] wrote: If I derive a class from another one because I need a few extra features, is there a way to promote the base class to the derived one without having to make copies of all attributes? class Derived (Base): def __init__ (self,

Re: dot operations

2007-01-11 Thread [EMAIL PROTECTED]
Paddy wrote: [EMAIL PROTECTED] wrote: Hi, Frequently I get to do like this: a = (1, 2, 3, 4) # some dummy values b = (4, 3, 2, 1) import operator c = map(operator.add, a, b) I am finding the last line not very readable especially when I combine couple of such operations into

Re: Read from database, write to another database, simultaneously

2007-01-11 Thread Istvan Albert
Sean Davis wrote: at the same time that the data is coming in? So, I am actually looking for a solution to this problem that doesn't require an intermediate file and allows simultaneous reading and writing, with the caveat that the data cannot all be read into memory simultaneously, so will

Progress count in terminal (Mac OS X)

2007-01-11 Thread Tommy Grav
I have a program that does a lot of iterations and would like to follow its progress by having it print out the current iteration number as it progresses. How do I do this so that it appears like a counter that increases in the same place in the terminal window? I am using python2.5 on a Mac OSX

Re: Reloading the already imported module

2007-01-11 Thread Paul McGuire
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hi all, i have following code if condition from SIPT.xml_param_mapping import MESSAGE_PARAMETER_MAPPING else: from SIPT.msg_param_mapping import MESSAGE_PARAMETER_MAPPING parameter_list =

Re: Parallel Python

2007-01-11 Thread robert
sturlamolden wrote: robert wrote: Thus communicated data is serialized - not directly used as with threads or with custom shared memory techniques like POSH object sharing. Correct, and that is precisely why MPI code is a lot easier to write and debug than thread code. The OP used a

What about this?

2007-01-11 Thread new
www.magicoz.com amazing -- http://mail.python.org/mailman/listinfo/python-list

Re: Need startup suggestions for writing a MSA viewer GUI in python

2007-01-11 Thread Istvan Albert
Joel Hedlund wrote: ideas from you people to get me going in the right direction. Despite my GUI n00b-ness I need to get it good and usable with an intuitive look and feel. UI design requires a different skillset than programming. It can be a very frustrating and thankless task as well. It

Re: Progress count in terminal (Mac OS X)

2007-01-11 Thread Fredrik Lundh
Tommy Grav [EMAIL PROTECTED]: I have a program that does a lot of iterations and would like to follow its progress by having it print out the current iteration number as it progresses. How do I do this so that it appears like a counter that increases in the same place in the terminal window?

Re: Type casting a base class to a derived one?

2007-01-11 Thread Paul McGuire
Peter Otten [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Frederic Rentsch wrote: If I derive a class from another one because I need a few extra features, is there a way to promote the base class to the derived one without having to make copies of all attributes? class

Re: Type casting a base class to a derived one?

2007-01-11 Thread Chris Mellon
On 11 Jan 2007 15:01:48 +0100, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-01-11, Frederic Rentsch [EMAIL PROTECTED] wrote: If I derive a class from another one because I need a few extra features, is there a way to promote the base class to the derived one without having to make copies

__init__ vs __new__

2007-01-11 Thread Daniel Klein
I've have a program that is using both of the methods below (in different classes of course) for initializing the class. The example below shows a class with the 2 methods with one commented out. class JsubroutineParameters(list): Represents a list of arguments for external subroutine calls.

Re: how to clean sys.path

2007-01-11 Thread siggi
Tim Roberts wrote: when I do sys.path in IDLE (winXP), i get a horrendously long list of paths, paths I may have used during a lot of trials and errors. How can I clean up sys.path? I mean, trim it of unnecessary paths? What do mean by used during a lot of trials and errors? sys.path is

Re: IDLE Python and Environment Variables

2007-01-11 Thread Tristan
Thanks Gabriel. What kind of environment variables? Those used by Python itself, like PYTHONPATH? Or your own variables, like FOO_LOCATION=C:\My\Projects\Lib\Foo I need to add to PYTHONPATH and other enviroment variables asked, for example, by DJANGO or other python products. It appears that

Re: Newbie - converting csv files to arrays in NumPy - Matlab vs. Numpy comparison

2007-01-11 Thread Istvan Albert
oyekomova wrote: csvread in Matlab for a very large csv file. Matlab read the file in 577 seconds. On the other hand, this code below kept running for over 2 hours. Can this program be made more efficient? FYI There must be something wrong with your setup/program. I work with large csv files

Re: globals accros modules

2007-01-11 Thread stef
Change a=1 to amodule.a=1 If you find yourself doing tricks with the module globals, think about redesigning your application. Of course I completely agree with you. But ... if you're moving from MatLab to Python, and want to show your collegaes, with how little effort they can reuse all

Re: Universal Feed Parser - How do I keep attributes?

2007-01-11 Thread Max Erickson
Gabriel Genellina [EMAIL PROTECTED] wrote: At Wednesday 10/1/2007 14:38, [EMAIL PROTECTED] wrote: d = feedparser.parse('http://weather.yahooapis.com/forecastrss?p= 94089') d.feed.yweather_location u'' You have to feed it the *contents* of the page, not its URL. The online

Re: Progress count in terminal (Mac OS X)

2007-01-11 Thread Tommy Grav
This certainly does work when running the interpreter interactively, but when inserted into a script it seems to buffer the print statement and not write it out to the terminal. How can I force the print statement to not buffer the output? Cheers Tommy On Jan 11, 2007, at 9:22 AM, Fredrik

os.mkfifo

2007-01-11 Thread Gigs_
is os.mkfifo available on windows xp thx -- http://mail.python.org/mailman/listinfo/python-list

Re: Read from database, write to another database, simultaneously

2007-01-11 Thread Paul Boddie
Sean Davis wrote: As for the specifics, Oracle data is going to be coming in as a DB-API 2 cursor in manageable chunks (and at a relatively slow pace). On the postgres loading side, I wanted to use the pscycopg2 copy_from function, which expects an open file-like object (that has read and

Learning Python book, new edition?

2007-01-11 Thread Demel, Jeff
Does anyone know if there's a plan in the works for a new edition of Learning Python? The current edition (2nd) is a few years old and looks like it only covers Python 2.3. Anyone on the list have Lutz's ear? -Jeff This email is intended only for the individual or entity to which it is

ValueError from dict - some detail would be helpful

2007-01-11 Thread metaperl
File /sw/lib/python2.5/csv.py, line 120, in _dict_to_list raise ValueError, dict contains fields not in fieldnames --- it would be nice if it said what field it was I know that I can do a set difference on the two myself, but since it know what wasn't there.. why not report it and save me

Newbie question: SMTP - SQL Server

2007-01-11 Thread jrpfinch
I have an externally-written piece of software that spits out emails using SMTP (a few hundred per hour) and I would like to dump the content of them in an MS SQL Server database. I have barely used Python before but it looks as if it could do the job. I have no experience with mail agents. My

Re: __init__ vs __new__

2007-01-11 Thread Neil Cerutti
On 2007-01-11, Daniel Klein [EMAIL PROTECTED] wrote: I've have a program that is using both of the methods below (in different classes of course) for initializing the class. The example below shows a class with the 2 methods with one commented out. class JsubroutineParameters(list):

Re: Python 2.5 install on Gentoo Linux: failed dmb and _tkinter

2007-01-11 Thread Sorin Schwimmer
Did you add /usr/local/lib to /etc/ld.so.conf? It's there Sorin Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com --

What happened to SPE?

2007-01-11 Thread Paulo Pinto
Hi, does anyone know what happened to SPE? It seems that the address http://pythonide.stani.be is no longer valid. :( Thanks in advance, Paulo -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question: SMTP - SQL Server

2007-01-11 Thread hg
jrpfinch wrote: I have an externally-written piece of software that spits out emails using SMTP (a few hundred per hour) and I would like to dump the content of them in an MS SQL Server database. I have barely used Python before but it looks as if it could do the job. I have no experience

Problem with byte-compiled code

2007-01-11 Thread eXt
Hi, I have built some modules in C++to extend python. At first everything worked but then I began splitting my python code into several modules. The application begins in main.py and then imports my other modules. The first time I run the application it works, but when python imports the byte

Re: Need startup suggestions for writing a MSA viewer GUI in python

2007-01-11 Thread Joel Hedlund
UI design requires a different skillset than programming. It can be a very frustrating and thankless task as well. It is incomparably easier to see the flaws in existing interfaces than correcting them (or even creating the said interface). Make sure to start with something simple, and learn

Re: What happened to SPE?

2007-01-11 Thread Neil Cerutti
On 2007-01-11, Paulo Pinto [EMAIL PROTECTED] wrote: does anyone know what happened to SPE? It seems that the address http://pythonide.stani.be is no longer valid. :( SPE lost its web host, and last I heard is looking for a new home. For now you can get it here:

Re: Progress count in terminal (Mac OS X)

2007-01-11 Thread reed
for i in range(100): sys.stdout.write( \r + count , i,) sys.stdout.flush() print # done maybe Tommy Grav wrote: This certainly does work when running the interpreter interactively, but when inserted into a script it seems to buffer the print

Re: Newbie question: SMTP - SQL Server

2007-01-11 Thread jrpfinch
Thank you. I have just realised I completely misunderstand how SMTP servers work. From what I can tell, when you run the cookbook script it listens locally on port 8025. You then have to configure a Linux (in my case) account with a username and password so my external piece of software (on

Re: dot operations

2007-01-11 Thread Steven W. Orr
On Thursday, Jan 11th 2007 at 11:41 +0100, quoth robert: =[EMAIL PROTECTED] wrote: = Hi, = Frequently I get to do like this: = a = (1, 2, 3, 4) # some dummy values = b = (4, 3, 2, 1) = import operator = c = map(operator.add, a, b) = = I am finding the last line not very readable especially when

Re: What happened to SPE?

2007-01-11 Thread Dick Moores
At 07:43 AM 1/11/2007, Paulo Pinto wrote: does anyone know what happened to SPE? It seems that the address http://pythonide.stani.be is no longer valid. :( I'd suggest subscribing to the Python-spe-users list, https://lists.berlios.de/mailman/listinfo/python-spe-users, or reading the archive

Re: os.mkfifo

2007-01-11 Thread Jerry Hill
On 1/11/07, Gigs_ [EMAIL PROTECTED] wrote: is os.mkfifo available on windows xp http://docs.python.org/lib/os-file-dir.html#l2h-2683 -- Jerry -- http://mail.python.org/mailman/listinfo/python-list

Portable Python - free portable development environment !

2007-01-11 Thread perica . zivkovic
Hi there, I would like to announce the *first* beta release of the Portable Python 1.0 beta. From today Portable Python website is also online and you can find it on the location www.PortablePython.com. About: Portable Python is a Python programming language preconfigured to run directly from a

Re: Newbie question: SMTP - SQL Server

2007-01-11 Thread Steve Holden
jrpfinch wrote: Thank you. I have just realised I completely misunderstand how SMTP servers work. From what I can tell, when you run the cookbook script it listens locally on port 8025. You then have to configure a Linux (in my case) account with a username and password so my external

Re: Progress count in terminal (Mac OS X)

2007-01-11 Thread James Thiele
if you invoke python with the -u option the output of print is unbuffered. On Jan 11, 7:04 am, Tommy Grav [EMAIL PROTECTED] wrote: This certainly does work when running the interpreter interactively, but when inserted into a script it seems to buffer the print statement and not write it out to

Re: Parallel Python

2007-01-11 Thread Nick Maclaren
In article [EMAIL PROTECTED], robert [EMAIL PROTECTED] writes: | | Thus there are different levels of parallelization: | | 1 file/database based; multiple batch jobs | 2 Message Passing, IPC, RPC, ... | 3 Object Sharing | 4 Sharing of global data space (Threads) | 5 Local parallelism / Vector

Re: globals accros modules

2007-01-11 Thread Bruno Desthuilliers
stef a écrit : Change a=1 to amodule.a=1 If you find yourself doing tricks with the module globals, think about redesigning your application. Of course I completely agree with you. But ... if you're moving from MatLab to Python, and want to show your collegaes, with how little

Re: os.popen() not executing command on windows xp

2007-01-11 Thread nic
Justin Ezequiel wrote: import os a = os.popen('c:\Program Files\Grisoft\AVG Free\avgscan.exe c:\program files\temp1\test1.txt') print a.read() use raw strings e.g., instead of 'c:...\avgscan...' use r'c:...\avgscan...'

Re: Learning Python book, new edition?

2007-01-11 Thread Bjoern Schliessmann
Demel, Jeff wrote: Does anyone know if there's a plan in the works for a new edition of Learning Python? The current edition (2nd) is a few years old and looks like it only covers Python 2.3. IIRC, differences to 2.4 are in it, too. This email is intended only for the individual or entity

COM compatibility

2007-01-11 Thread Tmack
I'm not a programmer! I work for a software company. We have a SDK that customers can use to customize the app. The requirement to use the SDK is: XYZ App has been designed in such a way that all the business objects used in the application are automatically exposed through a thin COM wrapper

Re: What about this?

2007-01-11 Thread Bjoern Schliessmann
new wrote: www.magicoz.com amazing Yeah, it *is* really amazing that someone dares to spam for such an unprofessional homepage. Even too stupid to include a doctype ... Björn -- BOFH excuse #61: not approved by the FCC -- http://mail.python.org/mailman/listinfo/python-list

Fixed keys() mapping

2007-01-11 Thread George Sakkis
I wrote an 'fkdict' dict-like class for mappings with a fixed set of keys but I'm wondering if there's a simpler way to go about it. First off, the main motivation for it is to save memory in case of many dicts with the same keys, for example when reading from a csv.DictReader or constructing

Re: what is the idiom for copy lots of params into self?

2007-01-11 Thread Bjoern Schliessmann
Emin wrote: Thanks for your suggestions. One issue with using *args or **kw is that I might no want to copy all the arguments to __init__ into self. Try prepending something like allowedParms = (spam, eggs, yum) args = dict([key,val for key,val in args.elements() if key in allowedParms])

Re: Read from database, write to another database, simultaneously

2007-01-11 Thread Bjoern Schliessmann
Laurent Pointal wrote: Not so sure, there is low CPU in the Python script, Yes. but there may be CPU+disk activity on the database sides [with cache management and other optimizations on disk access]. That's it. So data queues up on the database side and you won't get much value from faked

Re: COM compatibility

2007-01-11 Thread Diez B. Roggisch
Tmack wrote: I'm not a programmer! I work for a software company. We have a SDK that customers can use to customize the app. The requirement to use the SDK is: XYZ App has been designed in such a way that all the business objects used in the application are automatically exposed through

Re: Read from database, write to another database, simultaneously

2007-01-11 Thread Bjoern Schliessmann
Sean Davis wrote: I solved this problem by creating a temporary file as an intermediary, but why wait for Oracle to finish dumping data when I can potentially be loading into postgres at the same time that the data is coming in? So, I am actually looking for a solution to this problem that

Re: Parallel Python

2007-01-11 Thread Konrad Hinsen
On Jan 8, 2007, at 11:33, Duncan Booth wrote: The 'parallel python' site seems very sparse on the details of how it is implemented but it looks like all it is doing is spawning some subprocesses and using some simple ipc to pass details of the calls and results. I can't tell from

RE: Learning Python book, new edition?

2007-01-11 Thread Demel, Jeff
Demel, Jeff wrote: Does anyone know if there's a plan in the works for a new edition of Learning Python? The current edition (2nd) is a few years old and looks like it only covers Python 2.3. Björn replied: IIRC, differences to 2.4 are in it, too. Interesting. The description I read said

Frequency spectrum with fft of a real valued array...?

2007-01-11 Thread Holger
Dear all, I need to do a FFT on an array of 20k real values. Origin of the sampled data is a sinus wave with light harmonics. The goal is an frequency spectrum with the magnitudes of the first 50. harmonics. I addressed python like: test_arr = src_data_dict[ channel ][0:19599]

Re: Frequency spectrum with fft of a real valued array...?

2007-01-11 Thread Robert Kern
Holger wrote: What does it mean to me? How do I get to the wanted frequenca spectrum??? It's packed in the conventional FFT format. Here is a function in numpy (the successor to Numeric, which I assume that you are using) that generates the corresponding frequencies in the same packed format:

Re: Python - C# interoperability

2007-01-11 Thread Larry Bates
mc wrote: Is there an easy way to compile a Python class (or set of classes) into a .DLL that a C# program can call? Or otherwise to use an existing library of Python classes from a C# program as seamlessly as possible? You can write COM objects that can be called from C# (or basically ANY

  1   2   3   >