ANN: matplotlib-0.98.3 - plotting for python

2008-08-06 Thread [EMAIL PROTECTED]
matplotlib is a 2D plotting library for python for use in scripts, applications, interactive shell work or web application servers. matplotlib 0.98.3 is a major release but stable release which brings many new features detailed below. Homepage: http://matplotlib.sourceforge.net/ Downloads:

Re: How to troubleshoot hanging script?

2008-08-06 Thread Alexandru Palade
Hi, Just a thought, I'm not sure it's the best way. You can start an alarm just before the line you *think* it's wrong and cancel it after that. If it's activated then you probably have pinpointed the location. Have a look at the signals module http://docs.python.org/lib/module-signal.html, the

Re: How to troubleshoot hanging script?

2008-08-06 Thread Bruno Desthuilliers
kj a écrit : Hi! I have a Pythonoob question. I have a script that hangs indefinitely at random times; the only thing to do at this point is to kill it. I'm looking for suggestions on how to troubleshoot and debug the problem. I'm not even sure of where exactly the script is hanging, though

Re: URLs and ampersands

2008-08-06 Thread Duncan Booth
Matthew Woodcraft [EMAIL PROTECTED] wrote: Gabriel Genellina wrote: Steven D'Aprano wrote: I have searched for, but been unable to find, standard library functions that escapes or unescapes URLs. Are there any such functions? Yes: cgi.escape/unescape, and

Re: very large dictionary

2008-08-06 Thread Bruno Desthuilliers
Simon Strobl a écrit : (snip) I would prefer to be able to use the same type of scripts with data of all sizes, though. Since computers have a limited RAM, this is to remain a wish. You can't obviously expect to deal with terabytes of data like you do with a 1kb text file. --

Re: Python-URL! - weekly Python news and links (Jul 28)

2008-08-06 Thread Bruno Desthuilliers
Gabriel Genellina a écrit : En Tue, 05 Aug 2008 06:28:33 -0300, Bruno Desthuilliers [EMAIL PROTECTED] escribió: Gabriel Genellina a écrit : QOTW: Python's goals are to maximize opportunities for good programming, which is quite different. - Bruno Desthuilliers, contrasting Python with Java

Re: Tkinter Entry widgets 'font' property (API ?) changed in Python 2.5.2 ?

2008-08-06 Thread Eric Brunel
On Wed, 06 Aug 2008 06:01:59 +0200, Atul [EMAIL PROTECTED] wrote: Hi, The snippet : entryFontDescr = Entry()[font] print self.entryFontDescr On Windows XP it displays {MS Sans Serif} 8 On Suse Linux 10.2 it used to display TkTextFont 10 I upgraded to OpenSuse 11 and now it shows

Re: very large dictionary

2008-08-06 Thread Jake Anderson
Bruno Desthuilliers wrote: Simon Strobl a écrit : (snip) I would prefer to be able to use the same type of scripts with data of all sizes, though. Since computers have a limited RAM, this is to remain a wish. You can't obviously expect to deal with terabytes of data like you do with a 1kb

python script help

2008-08-06 Thread Heather Cole
Hello all, not sure if anyone will get this, I did register, but haven't yet received a confimation. I am a 100% newbie when it comes to python script, but I think what I want to do is relatively straight forward. I have a table with many species and coordinate points, for each species, I

Re: Locking around

2008-08-06 Thread Ulrich Eckhardt
Nikolaus Rath wrote: I need to synchronize the access to a couple of hundred-thousand files[1]. It seems to me that creating one lock object for each of the files is a waste of resources, but I cannot use a global lock for all of them either (since the locked operations go over the network,

Re: Why doesn't import work?

2008-08-06 Thread alex23
On Aug 5, 8:34 am, ssecorp [EMAIL PROTECTED] wrote: I have in Lib/site-packages a module named pdfminer. when I do import pdfminer it complains: so I apparently can't import a directory pdfminer. In the directory pdfminer there are 3 other directoriees and inside them python-files. Are the 3

Re: Trying to fix Invalid CSV File

2008-08-06 Thread Roel Schroeven
Ryan Rosario schreef: Next time I am going to be much more careful. Tab delimited is probably better for my purpose, but I can definitely see there being issues with invisible tab characters and other weirdness. No matter which delimiter you use, there will always be data that includes that

Re: Print statement isn't showing up?

2008-08-06 Thread Lie
On Aug 6, 2:28 am, Timothy Grant [EMAIL PROTECTED] wrote: On Tue, Aug 5, 2008 at 9:09 AM, Robert Dailey [EMAIL PROTECTED] wrote: Hi, I have the following code: def ReplaceExternalWithCopy( localDir, remoteDir ):     print Removing external local directory:, localDir     rmdirs(

Re: Locking around

2008-08-06 Thread Nikolaus Rath
Ulrich Eckhardt [EMAIL PROTECTED] writes: Nikolaus Rath wrote: I need to synchronize the access to a couple of hundred-thousand files[1]. It seems to me that creating one lock object for each of the files is a waste of resources, but I cannot use a global lock for all of them either (since

soap call through firewall

2008-08-06 Thread Edwin . Madari
hi, any hints/pointers appreciated if you have succeeded in making a soap call through a firewall. other than this http://www.ibm.com/developerworks/xml/library/x-tipfire.html cannot find much. thanks in advance Edwin The information contained in this message and any attachment may be

SOAPpy how to

2008-08-06 Thread Edwin . Madari
unable to get past local proxy server with SOAPpy client. In the code below using 'thproxy' or 'httpproxy' variable for http_proxy fails. from SOAPpy import WSDL proxyuser='..' proxypass='.. httpproxy=a.b.c.com:1234 theproxy='http://'+proxyuser+':'+proxypass+'@'+httpproxy

Re: Locking around

2008-08-06 Thread Nikolaus Rath
Nikolaus Rath [EMAIL PROTECTED] writes: This should work, at least the idea is not flawed. However, I'd say there are too many locks involved. Rather, you just need a simple flag and the global lock. Further, you need a condition/event that tells waiting threads that you released some of the

Re: Locking around

2008-08-06 Thread Carl Banks
On Aug 4, 9:30 am, Nikolaus Rath [EMAIL PROTECTED] wrote: Hello, I need to synchronize the access to a couple of hundred-thousand files[1]. It seems to me that creating one lock object for each of the files is a waste of resources, but I cannot use a global lock for all of them either (since

Re: Locking around

2008-08-06 Thread Carl Banks
On Aug 6, 6:34 am, Nikolaus Rath [EMAIL PROTECTED] wrote: Nikolaus Rath [EMAIL PROTECTED] writes: This should work, at least the idea is not flawed. However, I'd say there are too many locks involved. Rather, you just need a simple flag and the global lock. Further, you need a

Help with mechanize

2008-08-06 Thread Neal Becker
I'm trying to use mechanize to read for a M$ mail server. I can get past the login page OK using: import mechanize b = mechanize.Browser() b.open ('https://mail.hughes.com/owa/auth/logon.aspx?url=https://mail.hughes.com/OWA/reason=0') b.select_form(nr=0) b['username']='myname'

Accessing tree nodes from the cgi

2008-08-06 Thread Noorhan Abbas
Hello, I wonder if anyone knows how to sort out this problem for me! I have a Yhaoo tree view control created using javascript and I don't know how to get the node selected from within my python cgi?  Anyone can help please? Nora

Re: Help with mechanize

2008-08-06 Thread Wojtek Walczak
Dnia Wed, 06 Aug 2008 07:16:37 -0400, Neal Becker napisa�(a): I'm trying to use mechanize to read for a M$ mail server. I can get past the login page OK using: ... Now it seems if I read b.links() I can see links to my mail. My question is, how do I now actually get the contents of this

Re: sys.ps1 with formatting (linux)

2008-08-06 Thread Hugo
Hi all, My apologies for resurrecting an old thread, but I couldn't find the answer on the list and others might still have the same problem. On Mon Jul 23 22:33:22 CEST 2007, Jon Dobson wrote (reformatted): I'm trying to set sys.ps1 and sys.ps2 with some formatting using:

enhancing decorator signatures

2008-08-06 Thread Diez B. Roggisch
Hi, I'm using Michele S's decorator-module to create decorators with matching signatures, for better error-catching. However, I now want to enrich the signature of a generic wrapper so that the new function will accept more parameters (keyword only). These additional parameters are consumed by

ANN: matplotlib-0.98.3 - plotting for python

2008-08-06 Thread [EMAIL PROTECTED]
matplotlib is a 2D plotting library for python for use in scripts, applications, interactive shell work or web application servers. matplotlib 0.98.3 is a major but stable release which brings many new features detailed below. Homepage: http://matplotlib.sourceforge.net/ Downloads:

Re: Limits of Metaprogramming

2008-08-06 Thread Wilson
On Aug 4, 9:23 pm, castironpi [EMAIL PROTECTED] wrote: On Aug 4, 1:57 pm, Wilson [EMAIL PROTECTED] wrote: On Aug 4, 6:49 pm, castironpi [EMAIL PROTECTED] wrote: Two, if all your methods will have uniform signatures and closures, you can store class methods as only their co_code objects:

Re: Locking around

2008-08-06 Thread Nikolaus Rath
Carl Banks [EMAIL PROTECTED] writes: Freaky... I just posted nearly this exact solution. I have a couple comments. First, the call to acquire should come before the try block. If the acquire were to fail, you wouldn't want to release the lock on cleanup. Second, you need to change

Find class of an instance?

2008-08-06 Thread Neal Becker
Sounds simple, but how, given an instance, do I find the class? -- http://mail.python.org/mailman/listinfo/python-list

Re: Find class of an instance?

2008-08-06 Thread Heiko Wundram
Am Mittwoch, den 06.08.2008, 08:44 -0400 schrieb Neal Becker: Sounds simple, but how, given an instance, do I find the class? inst.__class__ For example: Python 2.5.2 (r252:60911, Aug 5 2008, 03:26:50) [GCC 4.3.1] on linux2 Type help, copyright, credits or license for more information. x =

Best practise implementation for equal by value objects

2008-08-06 Thread Slaunger
Hi, I am new here and relatively new to Python, so be gentle: Is there a recommended generic implementation of __repr__ for objects equal by value to assure that eval(repr(x)) == x independet of which module the call is made from? Example: class Age: def __init__(self, an_age):

How to create python codecs?

2008-08-06 Thread yrogirg
Actually, I need utf-8 to utf-8 encoding which would change the text to another keyboard layout (e.g. from english to russian ghbdtn - привет) and would not affect other symbols. I`m totally new to python and to more or less advanced programming. I couldn`t find the answer to the question

Re: Is there a faster way to do this?

2008-08-06 Thread Boris Borcic
Is your product ID always the 3rd and last item on the line ? Else your output won't separate IDs. And how does output = open(output_file,'w') for x in set(line.split(',')[2] for line in open(input_file)) : output.write(x) output.close() behave ? [EMAIL PROTECTED] wrote: I have a csv

Re: Locking around

2008-08-06 Thread MRAB
On Aug 6, 1:33 pm, Nikolaus Rath [EMAIL PROTECTED] wrote: Carl Banks [EMAIL PROTECTED] writes: Freaky... I just posted nearly this exact solution. I have a couple comments.  First, the call to acquire should come before the try block.  If the acquire were to fail, you wouldn't want to

More like a shell command.

2008-08-06 Thread Bill
Is there anyway I can extend python to accept a command which looks more like shell syntax than a function call. I want to be able to do this: if blah : MyCommand Arg1 Arg2 as opposed to this: if blah : MyCommand(Arg1,Arg2) or this: if blah : x(MyCommand

Re: Find class of an instance?

2008-08-06 Thread Hugo
Neal Becker schreef: Sounds simple, but how, given an instance, do I find the class? I always do that with .__class__, not sure whether it is the best way: class A: ... pass ... a = A() a.__class__ class __main__.A at 0xb7f01fbc a.__class__ == A True --

Re: ANN: matplotlib-0.98.3 - plotting for python

2008-08-06 Thread bearophileHUGS
jdh2358: delaunay triangularization [and more amazing things] I'm impressed, it's growing very well, congratulations, I use it now and then. I know people in University that use Python only/mostly because of matplotlib. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Dictionary to tree format (hopefully simple)

2008-08-06 Thread Adam Powell
Thanks very much for this, very concise! -- http://mail.python.org/mailman/listinfo/python-list

Re: Find class of an instance?

2008-08-06 Thread [EMAIL PROTECTED]
On 6 août, 15:52, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: Heiko Wundram a écrit : Am Mittwoch, den 06.08.2008, 08:44 -0400 schrieb Neal Becker: Sounds simple, but how, given an instance, do I find the class? inst.__class__ Works for new-style classes only. The generic way to

Has anyone used the Python-MMS libraries recently ? feedback / consultancy required

2008-08-06 Thread Ade Bamigboye
Hi We would like to talk with anyone who has recently used the Python-MMS libraries with the aim of creating a prototype SMIL to MMS tool. Regards Ade CareTeamR - monitoring, managing, supporting patients Wireless Matters Limited Tel : +44 844 736 5330 Mobile : +44 7768 356150

Re: More like a shell command.

2008-08-06 Thread Mike Driscoll
On Aug 6, 9:38 am, Bill [EMAIL PROTECTED] wrote: Is there anyway I can extend python to accept a command which looks more like shell syntax than a function call. I want to be able to do this:     if blah :         MyCommand  Arg1  Arg2 as opposed to this:     if blah :        

Re: More like a shell command.

2008-08-06 Thread Miki
Hello, Is there anyway I can extend python to accept a command which looks more like shell syntax than a function call. I want to be able to do this:     if blah :         MyCommand  Arg1  Arg2 as opposed to this:     if blah :         MyCommand(Arg1,Arg2) or this:     if blah :  

Re: More like a shell command.

2008-08-06 Thread Richie Hindle
[Bill] Is there anyway I can extend python to accept a command which looks more like shell syntax than a function call. I want to be able to do this: if blah : MyCommand Arg1 Arg2 As a general rule, if Python gives you a syntax error then you can't achieve what you want

Re: Psycho question

2008-08-06 Thread David C. Ullrich
In article [EMAIL PROTECTED], Erik Max Francis [EMAIL PROTECTED] wrote: David C. Ullrich wrote: Just heard about Psycho. I've often wondered why someone doesn't make something that does exactly what Psycho does - keen. Silly question: It's correct, is it not, that Psycho doesn't

Re: More like a shell command.

2008-08-06 Thread Thor
Maybe this module would work fine: http://docs.python.org/lib/module-cmd.html -- Angel -- http://mail.python.org/mailman/listinfo/python-list

Re: Locking around

2008-08-06 Thread Tobiah
On Mon, 04 Aug 2008 15:30:51 +0200, Nikolaus Rath wrote: Hello, I need to synchronize the access to a couple of hundred-thousand files[1]. It seems to me that creating one lock object for each of the files is a waste of resources, but I cannot use a global lock for all of them either

Re: regex question

2008-08-06 Thread Tobiah
On Tue, 05 Aug 2008 15:55:46 +0100, Fred Mangusta wrote: Chris wrote: Doesn't work for his use case as he wants to keep periods marking the end of a sentence. Doesn't it? The period has to be surrounded by digits in the example solution, so wouldn't periods followed by a space (end of

Re: enhancing decorator signatures

2008-08-06 Thread castironpi
On Aug 6, 7:16 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: Hi, I'm using Michele S's decorator-module to create decorators with matching signatures, for better error-catching. However, I now want to enrich the signature of a generic wrapper so that the new function will accept more

Re: More like a shell command.

2008-08-06 Thread castironpi
On Aug 6, 9:38 am, Bill [EMAIL PROTECTED] wrote: Is there anyway I can extend python to accept a command which looks more like shell syntax than a function call. I want to be able to do this:     if blah :         MyCommand  Arg1  Arg2 as opposed to this:     if blah :        

Re: Limits of Metaprogramming

2008-08-06 Thread castironpi
On Aug 6, 7:24 am, Wilson [EMAIL PROTECTED] wrote: On Aug 4, 9:23 pm, castironpi [EMAIL PROTECTED] wrote: On Aug 4, 1:57 pm, Wilson [EMAIL PROTECTED] wrote: On Aug 4, 6:49 pm, castironpi [EMAIL PROTECTED] wrote: Two, if all your methods will have uniform signatures and closures,

Re: Psycho question

2008-08-06 Thread bearophileHUGS
David C. Ullrich: Thanks. If I can get it installed and it works as advertised this means I can finally (eventually) finish the process of dumping MS Windows: the only reason I need it right now is for the small number of Delphi programs I have for which straight Python is really not

Using an DTD not specified in XML file for validation

2008-08-06 Thread Brian Quinlan
Hey, I'm trying to figure out how I can validate an XML file using a DTD that isn't specified in the XML file. My code so far is: from xml import sax from xml.sax import sax2exts parser = sax2exts.XMLValParserFactory.make_parser() parser.setContentHandler(handler)

Monitor and compare two log files in real time

2008-08-06 Thread m
I have a script I would like to write but I am not sure of where to start / approach. Perhaps someone could help direct me in the right direction. Any advice is appreciated. I would like to write a python script that monitors two log files. If a certain string, lets say string1 shows up in

Re: Any tips on Python web development on Mac OS

2008-08-06 Thread Bruno Desthuilliers
Tim Greening-Jackson a écrit : Bruno Desthuilliers wrote: Tim Greening-Jackson a écrit : (snip) Depends on what your site is doing. There are all *sorts* of things I would like it to do, but am not dogmatic about any of them. For example, having various people being able to login to it

Re: looking for IDE advice or workflow tips

2008-08-06 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : I'm a novice developer at best and often work with the R statistical programming language. I use an editor called TINN-R which allows me to write a script, then highlight a few lines and send them to the interpreter. I am using pythonwin and it lacks this funtionality

RE: Monitor and compare two log files in real time

2008-08-06 Thread Reedick, Andrew
-Original Message- From: [EMAIL PROTECTED] [mailto:python- [EMAIL PROTECTED] On Behalf Of m Sent: Wednesday, August 06, 2008 1:25 PM To: python-list@python.org Subject: Monitor and compare two log files in real time I have a script I would like to write but I am not sure of

Re: Monitor and compare two log files in real time

2008-08-06 Thread Shawn Milochik
Can you be more specific? That will also help you write your requirements, which will lead to your pseudo code and then your code. Do you want to search for a a pre-defined string (or set of strings), or just look for anything matching a pattern to appear in the first file? Related question: Can

Re: Locking around

2008-08-06 Thread Nikolaus Rath
Tobiah [EMAIL PROTECTED] writes: On Mon, 04 Aug 2008 15:30:51 +0200, Nikolaus Rath wrote: Hello, I need to synchronize the access to a couple of hundred-thousand files[1]. It seems to me that creating one lock object for each of the files is a waste of resources, but I cannot use a global

Re: Find class of an instance?

2008-08-06 Thread Nikolaus Rath
Neal Becker [EMAIL PROTECTED] writes: Sounds simple, but how, given an instance, do I find the class? It does not only sound simple. When 'inst' is your instance, then inst.__class__ or type(inst) is the class. Best, -Nikolaus -- »It is not worth an intelligent man's time to

virtual IPs

2008-08-06 Thread leo davis
Good Day! I have set up virtual IPs on my Ubuntu client machine assigned IPs 192.168.12.3 - eth0 192.168.12.4 - eth0:1 192.168.12.5 - eth0:2 192.168.12.6 - eth0:3 I have written python code to send multiple HTTP requests to my web server to load test it.When I check the logs on the apache

Calculate sha1 hash of a binary file

2008-08-06 Thread LaundroMat
Hi - I'm trying to calculate unique hash values for binary files, independent of their location and filename, and I was wondering whether I'm going in the right direction. Basically, the hash values are calculated thusly: f = open('binaryfile.bin') import hashlib h = hashlib.sha1()

Re: Best practise implementation for equal by value objects

2008-08-06 Thread Terry Reedy
Slaunger wrote: Hi, I am new here and relatively new to Python, so be gentle: Is there a recommended generic implementation of __repr__ for objects equal by value to assure that eval(repr(x)) == x independet of which module the call is made from? The CPython implementation gives up on that

Re: SMTP via GMAIL

2008-08-06 Thread mmm
On Aug 5, 12:18 am, Tim Roberts [EMAIL PROTECTED] wrote: But when using smtp.gmail.com as the server I learned that any @gmail.com address in the  Cc: text block would receive mail even if I changed the code to have the RECEIVERS list to ignore the CC addresses or not include the gmail

Run program from within Python

2008-08-06 Thread frankrentef
Greetings all... Newbie to Python... need help with opening a file from within Python... see the following code. import popen2 stdout, stdin = popen2.popen2('c:\test\OpenProgram.exe 1 1') keygen = stdout.read() print The keygen value is: %s % keygen from the command line if I execute

Re: Best practise implementation for equal by value objects

2008-08-06 Thread John Krukoff
On Wed, 2008-08-06 at 05:50 -0700, Slaunger wrote: Hi, I am new here and relatively new to Python, so be gentle: Is there a recommended generic implementation of __repr__ for objects equal by value to assure that eval(repr(x)) == x independet of which module the call is made from?

Re: Calculate sha1 hash of a binary file

2008-08-06 Thread Tim Golden
LaundroMat wrote: Hi - I'm trying to calculate unique hash values for binary files, independent of their location and filename, and I was wondering whether I'm going in the right direction. Basically, the hash values are calculated thusly: f = open('binaryfile.bin') import hashlib h =

Parsing of a file

2008-08-06 Thread Tommy Grav
I have a file with the format Field f29227: Ra=20:23:46.54 Dec=+67:30:00.0 MJD=53370.06797690 Frames 5 Set 1 Field f31448: Ra=20:24:58.13 Dec=+79:39:43.9 MJD=53370.06811620 Frames 5 Set 2 Field f31226: Ra=20:24:45.50 Dec=+78:26:45.2 MJD=53370.06823860 Frames 5 Set 3 Field f31004:

Re: Psycho question

2008-08-06 Thread David C. Ullrich
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: David C. Ullrich: Thanks. If I can get it installed and it works as advertised this means I can finally (eventually) finish the process of dumping MS Windows: the only reason I need it right now is for the small number of Delphi

Books to begin learning Python

2008-08-06 Thread Edward Cormier
Which computer books are the best to begin learning Python 2.5 with? I've heard that Learning Python 3rd Edition is a good choice - can anyone give any more advice on this? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Run program from within Python

2008-08-06 Thread Mike Driscoll
On Aug 6, 2:42 pm, frankrentef [EMAIL PROTECTED] wrote: Greetings all... Newbie to Python... need help with opening a file from within Python... see the following code. import popen2 stdout, stdin = popen2.popen2('c:\test\OpenProgram.exe 1 1') keygen = stdout.read() print The keygen value

Re: Parsing of a file

2008-08-06 Thread Mike Driscoll
On Aug 6, 1:55 pm, Tommy Grav [EMAIL PROTECTED] wrote: I have a file with the format Field f29227: Ra=20:23:46.54 Dec=+67:30:00.0 MJD=53370.06797690 Frames   5 Set 1 Field f31448: Ra=20:24:58.13 Dec=+79:39:43.9 MJD=53370.06811620 Frames   5 Set 2 Field f31226: Ra=20:24:45.50 Dec=+78:26:45.2

Re: Books to begin learning Python

2008-08-06 Thread Mike Driscoll
On Aug 6, 2:56 pm, Edward Cormier [EMAIL PROTECTED] wrote: Which computer books are the best to begin learning Python 2.5 with? I've heard that Learning Python 3rd Edition is a good choice - can anyone give any more advice on this? Thanks. There's lots of good books to read, including a few

Re: Parsing of a file

2008-08-06 Thread Shawn Milochik
I would like to parse this file by extracting the field id, ra, dec and mjd for each line. It is not, however, certain that the width of each value of the field id, ra, dec or mjd is the same in each line. Is there a way to do this such that even if there was a line Regular expressions will

Re: Run program from within Python

2008-08-06 Thread giltay
On Aug 6, 3:42 pm, frankrentef [EMAIL PROTECTED] wrote: stdout, stdin = popen2.popen2('c:\test\OpenProgram.exe 1 1') What Mike said about subprocess. Also, in regular Python strings, \t means a tab character. You need to replace \ with \\ in the programme path ('c:\\test\\OpenProgram.exe 1 1')

Re: Run program from within Python

2008-08-06 Thread frankrentef
THNX for the links... lotta reading for the newbie! -- http://mail.python.org/mailman/listinfo/python-list

Re: Psycho question

2008-08-06 Thread David C. Ullrich
In article [EMAIL PROTECTED], David C. Ullrich [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: David C. Ullrich: Thanks. If I can get it installed and it works as advertised this means I can finally (eventually) finish the process of dumping MS

Re: Parsing of a file

2008-08-06 Thread Stefan Behnel
Shawn Milochik wrote: I would like to parse this file by extracting the field id, ra, dec and mjd for each line. It is not, however, certain that the width of each value of the field id, ra, dec or mjd is the same in each line. Is there a way to do this such that even if there was a line

Re: Psycho question

2008-08-06 Thread Erik Max Francis
David C. Ullrich wrote: Thanks. I would have guessed that I'd want low-level style code; that's the sort of thing I have in mind. In fact the only thing that seems likely to come up right now is looping through an array of bytes, modifying them. The plan is to use the array module first to

Re: Parsing of a file

2008-08-06 Thread John Machin
On Aug 7, 6:02 am, Mike Driscoll [EMAIL PROTECTED] wrote: On Aug 6, 1:55 pm, Tommy Grav [EMAIL PROTECTED] wrote: I have a file with the format Field f29227: Ra=20:23:46.54 Dec=+67:30:00.0 MJD=53370.06797690 Frames 5 Set 1 Field f31448: Ra=20:24:58.13 Dec=+79:39:43.9 MJD=53370.06811620

Re: Parsing of a file

2008-08-06 Thread bearophileHUGS
Using something like PyParsing is probably better, but if you don't want to use it you may use something like this: raw_data = Field f29227: Ra=20:23:46.54 Dec=+67:30:00.0 MJD=53370.06797690 Frames 5 Set 1 Field f31448: Ra=20:24:58.13 Dec=+79:39:43.9 MJD=53370.06811620 Frames 5 Set 2 Field

Re: Psycho question

2008-08-06 Thread bearophileHUGS
Erik Max Francis: If len(bytes) is large, you might want to use `xrange`, too. `range` creates a list which is not really what you need. That's right for Python, but Psyco uses normal loops in both cases, you can time this code in the two situations: def foo1(n): count = 0 for i in

Re: Parsing of a file

2008-08-06 Thread John Machin
On Aug 7, 7:06 am, John Machin [EMAIL PROTECTED] wrote: On Aug 7, 6:02 am, Mike Driscoll [EMAIL PROTECTED] wrote: On Aug 6, 1:55 pm, Tommy Grav [EMAIL PROTECTED] wrote: I have a file with the format Field f29227: Ra=20:23:46.54 Dec=+67:30:00.0 MJD=53370.06797690 Frames 5 Set 1

cross-compilation

2008-08-06 Thread Roumen Petrov
Hi list members, It seems to me that this is discussed many times in the past but without progress. As I understand in general there is no objections and preferred cross-compilation has to be based on distutils (scons was rejected). So I would like to cross-compile from linux(build system)

random numbers according to user defined distribution ??

2008-08-06 Thread Alex
Hi everybody, I wonder if it is possible in python to produce random numbers according to a user defined distribution? Unfortunately the random module does not contain the distribution I need :-( Many thanks axel -- http://mail.python.org/mailman/listinfo/python-list

Re: random numbers according to user defined distribution ??

2008-08-06 Thread Dominic van Berkel
On Thursday 07 August 2008 00:02, Alex [EMAIL PROTECTED] wrote: Hi everybody, I wonder if it is possible in python to produce random numbers according to a user defined distribution? Unfortunately the random module does not contain the distribution I need :-( Many thanks axel I'm

Re: pyprocessing/multiprocessing for x64?

2008-08-06 Thread pigmartian
Interesting, I see Christian's responses to Benjamin, but not Benjamin's posts themselves. Anyways, the question remains: will multiprocessing be supported for the x64 platform when it's released in 2.6? pigmartian wrote: I recently learned (from I response on this newsgroup to an earlier

python equivalent for this perl soap client

2008-08-06 Thread Edwin . Madari
use SOAP::Lite; use Data::Dumper; $ENV{HTTP_proxy} = my_proxy_server_not_soap_proxy_server; $ENV{HTTP_proxy_user} = ; #set correct value $ENV{HTTP_proxy_pass} = ; #set correct value my $soap = SOAP::Lite -service('file:./local_file_copy_of_wsdl.wsdl'); my $som = $soap-soapMethod(method, args,

Adding Microsoft objects in Boa Constuctor Palette

2008-08-06 Thread Sid K
This is what I wanted to do: Add Microsoft Active objects like Excel sheets and Word files to the Palette in Boa Constructor. There is a User tab in the GUI builder menu, but I'm not sure how to use/enable it. 1. Does anyone know how to do this? 2. Is anyone aware of any work that is currently

Re: Parsing of a file

2008-08-06 Thread Henrique Dante de Almeida
On Aug 6, 3:55 pm, Tommy Grav [EMAIL PROTECTED] wrote: I have a file with the format Field f29227: Ra=20:23:46.54 Dec=+67:30:00.0 MJD=53370.06797690 Frames   5 Set 1 Field f31448: Ra=20:24:58.13 Dec=+79:39:43.9 MJD=53370.06811620 Frames   5 Set 2 Field f31226: Ra=20:24:45.50 Dec=+78:26:45.2

Re: Using an DTD not specified in XML file for validation

2008-08-06 Thread Ben Finney
Brian Quinlan [EMAIL PROTECTED] writes: I'm trying to figure out how I can validate an XML file using a DTD that isn't specified in the XML file. When your inention is to start a new discussion, you could compose a new message, *not* reply to an existing message. Your message here is now part

Re: Parsing of a file

2008-08-06 Thread Paul McGuire
On Aug 6, 3:14 pm, Shawn Milochik [EMAIL PROTECTED] wrote: Regular expressions will do the trick nicely. Or just use str.split, and create dicts using dict(list_of_tuples) constructor. This code creates a single dict for the input lines, keyed by id. Each value contains elements labeled 'id',

Re: Using an DTD not specified in XML file for validation

2008-08-06 Thread Edwin . Madari
can you edit the xml and add the dtd/scheama ? .Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ben Finney Sent: Wednesday, August 06, 2008 7:07 PM To: python-list@python.org Subject: Re: Using an DTD not specified in XML file for validation

benchmark

2008-08-06 Thread Jack
I know one benchmark doesn't mean much but it's still disappointing to see Python as one of the slowest languages in the test: http://blog.dhananjaynene.com/2008/07/performance-comparison-c-java-python-ruby-jython-jruby-groovy/ -- http://mail.python.org/mailman/listinfo/python-list

Re: benchmark

2008-08-06 Thread Jake Anderson
Jack wrote: I know one benchmark doesn't mean much but it's still disappointing to see Python as one of the slowest languages in the test: http://blog.dhananjaynene.com/2008/07/performance-comparison-c-java-python-ruby-jython-jruby-groovy/ --

Re: Tkinter fullscreen with Mac OS X

2008-08-06 Thread C Martin
On Jul 28, 6:43 pm, Guilherme Polo [EMAIL PROTECTED] wrote: You could try this, supposing tl is a toplevel: tl.tk.call(::tk::unsupported::MacWindowStyle, style, tl._w, plain, none) I tried this (although, my tl is actually a tk instance): self.tk.call(::tk::unsupported::MacWindowStyle,

os.system question

2008-08-06 Thread Kevin Walzer
import os foo = os.system('whoami') kevin print foo 0 The standard output of the system command 'whoami' is my login name. Yet the value of the 'foo' object is '0,' not 'kevin.' How can I get the value of 'kevin' associated with foo? -- Kevin Walzer Code by Kevin

A question about string and float number

2008-08-06 Thread Wei Guo
Hi all, I am new of python. Could anyone help me a question as below? Is there any function that can judge a string s is a float number or not? FOr example, if s = '1.232' or s='1e+10', then it returns true, otherwise, it will return false. isdigit() in string doesn't work. float() will throw

Re: os.system question

2008-08-06 Thread Steven D'Aprano
On Wed, 06 Aug 2008 21:07:40 -0400, Kevin Walzer wrote: import os foo = os.system('whoami') kevin print foo 0 The standard output of the system command 'whoami' is my login name. Yet the value of the 'foo' object is '0,' not 'kevin.' How can I get the value of 'kevin' associated

Re: random numbers according to user defined distribution ??

2008-08-06 Thread Steven D'Aprano
On Wed, 06 Aug 2008 15:02:37 -0700, Alex wrote: Hi everybody, I wonder if it is possible in python to produce random numbers according to a user defined distribution? Unfortunately the random module does not contain the distribution I need :-( This is a strange question. Of course you can

Re: benchmark

2008-08-06 Thread bearophileHUGS
On Aug 7, 2:05 am, Jack [EMAIL PROTECTED] wrote: I know one benchmark doesn't mean much but it's still disappointing to see Python as one of the slowest languages in the test: http://blog.dhananjaynene.com/2008/07/performance-comparison-c-java-p... That Python code is bad, it contains range()

Re: os.system question

2008-08-06 Thread Larry Wang
os.system() simply executes the command in a subshell, and returns the command's exit status which in your case is '0'. If you need to capture the stdout, stderr, etc. stuff, subprocess module is preferred which offers more powerful functionalities over os.system(). Nessus Kevin Walzer

  1   2   >