ANN: SciPy 0.6.0

2007-09-21 Thread Jarrod Millman
I'm pleased to announce the release of SciPy 0.6.0: http://scipy.org/Download SciPy is a package of tools for science and engineering for Python. It includes modules for statistics, optimization, integration, linear algebra, Fourier transforms, signal and image processing, ODE solvers, and more.

global name is not defined - but this is actually a function's name

2007-09-21 Thread Mridula Ramesh
hi. i'm a beginner and i'm trying to get the hang of classes and functions. my code looks like this: code class showRecord(main): def __init__(self): global gmax #now to create the screen by placing all the widgets rt = Tk() showbuttons() #call the

Re: global name is not defined - but this is actually a function's name

2007-09-21 Thread Amit Khemka
On 9/21/07, Mridula Ramesh [EMAIL PROTECTED] wrote: hi. i'm a beginner and i'm trying to get the hang of classes and functions. my code looks like this: code class showRecord(main): def __init__(self): global gmax #now to create the screen by placing all the widgets

Re: Google and Python

2007-09-21 Thread Alex Martelli
Bryan Olson [EMAIL PROTECTED] wrote: ... TheFlyingDutchman asked of someone: Would you know what technique the custom web server uses to invoke a C++ app No, I expect he would not know that. I can tell you that GWS is just for Google, and anyone else is almost certainly better off

Re: Drawing a 640x480 Raw Image

2007-09-21 Thread Marc 'BlackJack' Rintsch
On Thu, 20 Sep 2007 20:49:59 -0700, W. Watson wrote: W. Watson wrote: I'm getting a 640x480 greyscale image from a video device. I'd like to place it on a canvas and then draw on the image. Does PIL or some image facility allow me to do that? Corrected misspelling in Subject. The image

Re: UTF-8 characters in doctest

2007-09-21 Thread Peter Otten
John J. Lee wrote: Peter Otten [EMAIL PROTECTED] writes: [...] # -*- coding: utf8 -*- r f(äöü.decode(utf8)) (u'\xe4\xf6\xfc',) def f(s): return (s,) Forgive me if this is a stupid question, but: What purpose does function f serve? Like the OP's get_inventary_number() it takes a

Re: I could use some help making this Python code run faster using only Python code.

2007-09-21 Thread George Sakkis
On Sep 20, 7:13 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Sep 20, 5:46 pm, Paul Hankin [EMAIL PROTECTED] wrote: On Sep 20, 10:59 pm, Python Maniac [EMAIL PROTECTED] wrote: I am new to Python however I would like some feedback from those who know more about Python than I do at

Re: An Editor that Skips to the End of a Def

2007-09-21 Thread Bruno Desthuilliers
Ben Finney a écrit : W. Watson [EMAIL PROTECTED] writes: Is vim just an editor or is it capable of running and debugging a program, as well? (Please don't top-post. Instead, reply below each point to which you're responding, removing quoted text irrelevant to your response.) Both Emacs

Re: Sets in Python

2007-09-21 Thread Gabriel Genellina
En Thu, 20 Sep 2007 08:46:29 -0300, Steven D'Aprano [EMAIL PROTECTED] escribi�: Another way is to use this class: class HashableList(list): def __hash__(self): return hash(tuple(self)) ...and that will stop working as soon as the list is mutated (which is exactly what you

Re: Processing drag drop on the desktop

2007-09-21 Thread Gabriel Genellina
En Wed, 19 Sep 2007 03:02:29 -0300, Pierre Quentel [EMAIL PROTECTED] escribi�: then put a shortcut to this script on the desktop When I drop a file on the shortcut, nothing happens (when I double- click on the shorcut, a console window opens and sys.argv is actually stored in the file)

global name is not defined - but this is actually a function's name

2007-09-21 Thread Mridula Ramesh
thanks! that fixed it :) -- http://mail.python.org/mailman/listinfo/python-list

Re: An Editor that Skips to the End of a Def

2007-09-21 Thread Bruno Desthuilliers
W. Watson a écrit : How about in the case of MS Win? Ben Finney wrote: (Please don't top-post. Instead, reply below each point to which you're responding, removing quoted text irrelevant to your response.) Wayne, may I second Ben on his suggestion to stop top-posting ? --

Re: Python 3K or Python 2.9?

2007-09-21 Thread Ron Adam
TheFlyingDutchman wrote: I am not talking about the way it does it, but rather, the way it could do it or... could have done it. That requires no knowledge of how the interpreter currently does it unless I am proposing something that no interpreter in the world could ever do. Yes, there

Re: Zope review

2007-09-21 Thread Bruno Desthuilliers
Norm a écrit : Hi, without meaning to start a flame war between the various python web tools, I was wondering if anyone had a review of the status of Zope. For example, is it being used for new projects or just maintenance? I really like the look of Zope 3, and the interface/schema

Re: newb: BeautifulSoup

2007-09-21 Thread 7stud
On Sep 20, 9:04 pm, crybaby [EMAIL PROTECTED] wrote: I need to traverse a html page with big table that has many row and columns. For example, how to go 35th td tag and do regex to retireve the content. After that is done, you move down to 15th td tag from 35th tag (35+15) and do regex to

Re: about __str__

2007-09-21 Thread Bruno Desthuilliers
Konstantinos Pachopoulos a écrit : Hi, i have the following class: === class CmterIDCmts: def __init__(self,commiterID,commits): self.commiterID_=long(commiterID) self.commits_=long(commits) def __str__(self):

Re: looking for ocbc example

2007-09-21 Thread Tim Golden
Carl K wrote: It seems there are 2 odbc modules - pyOdbc and mxOdbc - anyone know the difference? In short, pyodbc is open source; mxOdbc requires a commercial license. pyodbc is a newcomer, but appears to work for everything I've thrown at it (which is not much). mxOdbc has been around

Re: executing list of methods (and collecting results)

2007-09-21 Thread Paul Hankin
On Sep 21, 12:26 am, Gerardo Herzig [EMAIL PROTECTED] wrote: def collect_validators(self): v_dict = { 'is_really_a_number': is_really_a_number, 'is_even': is_even, 'is_greater_than_zero', is_greater_than_zero } for

Re: subprocess: returncode v. poll()

2007-09-21 Thread 7stud
On Sep 20, 3:24 pm, David [EMAIL PROTECTED] wrote: On 9/20/07, 7stud [EMAIL PROTECTED] wrote: On Sep 20, 1:25 pm, 7stud [EMAIL PROTECTED] wrote: On Sep 20, 1:17 pm, 7stud [EMAIL PROTECTED] wrote: Hi, What is the difference between: 1) getting the returncode directly from

Re: I could use some help making this Python code run faster using only Python code.

2007-09-21 Thread Duncan Booth
George Sakkis [EMAIL PROTECTED] wrote: It has to do with the input string length; try multiplying it by 10 or 100. Below is a more complete benchmark; for largish strings, the imap version is the fastest among those using the original algorithm. Of course using a lookup table as Diez showed

Re: newb: BeautifulSoup

2007-09-21 Thread Gabriel Genellina
En Fri, 21 Sep 2007 00:04:50 -0300, crybaby [EMAIL PROTECTED] escribi�: I need to traverse a html page with big table that has many row and columns. For example, how to go 35th td tag and do regex to retireve the content. After that is done, you move down to 15th td tag from 35th tag

Re: M2Crypto 0.18 - new version, same old build bugs.

2007-09-21 Thread Heikki Toivonen
John Nagle wrote: Back in March, I posted this: Hit that with OpenSSL. Red Hat took elliptical curve cryptography out of Fedora 6 for patent reasons. With that missing, M2Crypto won't build. It ought to; the implementor of M2Crypto thought of that, because it's an optional feature.

Re: Tapping into the access of an int instance

2007-09-21 Thread Peter Otten
Tor Erik Sønvisen wrote: Does anyone know how to interrupt the lookup of an integer value? I know I need to subclass int, since builtin types can't be altered directly... Below is how far I've come... What I want is to tap into the access of instance i's value 1... class Int(int):

Re: Python 3K or Python 2.9?

2007-09-21 Thread Bruno Desthuilliers
Ron Adam a écrit : TheFlyingDutchman wrote: I am not talking about the way it does it, but rather, the way it could do it or... could have done it. That requires no knowledge of how the interpreter currently does it unless I am proposing something that no interpreter in the world could

Re: executing list of methods (and collecting results)

2007-09-21 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: Haha, no, the actual methods do other kind of things. Thanks Björn!!! Okay, so I hoped. Glad to be of help. Regards, Björn -- BOFH excuse #233: TCP/IP UDP alarm threshold is set too low. -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2 POST problem

2007-09-21 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], darran wrote: entry = requestnotestesting API/noteshours3.5/ hoursproject_id65750/project_idtask_id79702/ task_idspent_atThu, 13 Sep 2007/spent_at/request ... # this POST (same data as the above curl example) fails with an internal server error (500) req =

Re: Odd files; just left behind?

2007-09-21 Thread Robin Becker
Bruno Desthuilliers wrote: Robin Becker a écrit : John J. Lee wrote: Robin Becker [EMAIL PROTECTED] writes: I see a folder .python-eggs in my home directory on one of our servers with various .so files ~/.python-eggs/MySQL_python-1.2.2-py2.3-freebsd-6.1-SECURITY-i386.egg-tmp/_mysql.so

Re: An Editor that Skips to the End of a Def

2007-09-21 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], John J. Lee wrote: Seriously for a moment, I read something recently (maybe here?) about an Apple study that claimed to show that people who perceived keyboard bindings as being much faster than mouseing did not, on average, take less time to complete the actions

Re: pdb attach?

2007-09-21 Thread Nir
On Sep 20, 3:26 pm, Hynek Hanke [EMAIL PROTECTED] wrote: Hello, please, is there something like 'attach' in pdb yet? My application uses threads and when it freezes (e.g. due to a deadlock situation), I'd like to get the traceback of all threads and inspect at which point did the

Re: looking for ocbc example

2007-09-21 Thread jay graves
On Sep 21, 2:43 am, Tim Golden [EMAIL PROTECTED] wrote: Carl K wrote: It seems there are 2 odbc modules - pyOdbc and mxOdbc - anyone know the difference? In short, pyodbc is open source; mxOdbc requires a commercial license. pyodbc is a newcomer, but appears to work for everything I've

Re: Odd files; just left behind?

2007-09-21 Thread Bruno Desthuilliers
Robin Becker a écrit : Bruno Desthuilliers wrote: Robin Becker a écrit : John J. Lee wrote: Robin Becker [EMAIL PROTECTED] writes: I see a folder .python-eggs in my home directory on one of our servers with various .so files

Re: Who can develop the following Python script into working application ?

2007-09-21 Thread http://members.lycos.co.uk/dariusjack/
On Sep 21, 2:33 am, http://members.lycos.co.uk/dariusjack/; [EMAIL PROTECTED] wrote: Hi, I am happy user of Nokia 770 tablett and one application for Nokia 770 is maemo mapper (beta navigation application). And the following script should run under mm (for Debian). Its developer told me it

Re: Who can develop the following Python script into working application ?

2007-09-21 Thread Diez B. Roggisch
snip/ Please help and let me know your terms. There are websites dedicated to this - like e.g. http://www.guru.com/ Make an offer there. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd files; just left behind?

2007-09-21 Thread Robin Becker
Bruno Desthuilliers wrote: it would seem simpler to have the .so files inside the site-packages and there's the question of why this folder has to be obfuscated (name starts with .). Even if these files are resources why should they be assumed to belong to the user? Notice

Re: An Editor that Skips to the End of a Def

2007-09-21 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Paul Rudin wrote: ... these days emacs comes with all sorts of pointing-clicky-menu-y type things - you don't really have to learn anything to get started. After two decades of putting up with vi just to ensure compatibility with every proprietary *nix system I

Re: Odd files; just left behind?

2007-09-21 Thread Bruno Desthuilliers
Robin Becker a écrit : Bruno Desthuilliers wrote: it would seem simpler to have the .so files inside the site-packages and there's the question of why this folder has to be obfuscated (name starts with .). Even if these files are resources why should they be assumed to belong

Re: An Editor that Skips to the End of a Def

2007-09-21 Thread Ant
On Sep 21, 4:47 am, W. Watson [EMAIL PROTECTED] wrote: How about in the case of MS Win? Both emacs and vim have GUI versions that run on Windows. -- Ant... -- http://mail.python.org/mailman/listinfo/python-list

Re: Drawing a 640x480 Raw Image

2007-09-21 Thread W. Watson
Very good. I'll give it a try. Marc 'BlackJack' Rintsch wrote: On Thu, 20 Sep 2007 20:49:59 -0700, W. Watson wrote: W. Watson wrote: I'm getting a 640x480 greyscale image from a video device. I'd like to place it on a canvas and then draw on the image. Does PIL or some image facility

Re: newb: BeautifulSoup

2007-09-21 Thread crybaby
I added extra td tags to your example, for whatever reason I am getting None. When I do the following: print all_tds[0].string print all_tds[8].string from BeautifulSoup import BeautifulSoup doc = html head title/title /head body table /table table

Re: An Editor that Skips to the End of a Def

2007-09-21 Thread Stefan Behnel
Bjoern Schliessmann wrote: Lawrence D'Oliveiro wrote: After two decades of putting up with vi just to ensure compatibility with every proprietary *nix system I might come across, let me just say ... USE EMACS! Nah. Use vim. Oh, and

Re: An Editor that Skips to the End of a Def

2007-09-21 Thread Stefan Behnel
W. Watson wrote: Is vim just an editor or is it capable of running and debugging a program, as well? Depends on how you define an editor. If you take Emacs as example for an editor, then, no, it's not an editor. BTW: (It even gives useful advice on top-posting if you use it as a news client

Re: An Editor that Skips to the End of a Def

2007-09-21 Thread Bjoern Schliessmann
Lawrence D'Oliveiro wrote: After two decades of putting up with vi just to ensure compatibility with every proprietary *nix system I might come across, let me just say ... USE EMACS! Nah. Use vim. Oh, and http://ars.userfriendly.org/cartoons/?id=20070910mode=classic.

Re: Drawing a 640x480 Raw Image

2007-09-21 Thread W. Watson
Oops. What I think I'm looking for is a way to open a data file of records that are 640x480 that are gray scaled. I probably need something like an open and a read. Once I've got that, then I need to place the raw image into a draw area on the canvas, so that I can draw on the image. W. Watson

__contains__() : Bug or Feature ???

2007-09-21 Thread [EMAIL PROTECTED]
Hi everybody, I need to overload the operator in and let him return an object ... It seems it is not a behavior Python expect : class A: ...def __contains__(self,a): ...return 'yop' ... a=A() print 'toto' in a True print a.__contains__('toto') yop I don't know if it's a bug or a

Re: __contains__() : Bug or Feature ???

2007-09-21 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: I need to overload the operator in and let him return an object ... It seems it is not a behavior Python expect : class A: ...def __contains__(self,a): ...return 'yop' ... a=A() print 'toto' in a True Not sure what you're trying to achieve, but the

Re: __contains__() : Bug or Feature ???

2007-09-21 Thread Carsten Haese
On Fri, 2007-09-21 at 13:08 +, [EMAIL PROTECTED] wrote: Hi everybody, I need to overload the operator in and let him return an object Why do you think you need to do that? What's the underlying problem you're trying to solve? -- Carsten Haese http://informixdb.sourceforge.net --

Re: looking for ocbc example

2007-09-21 Thread M.-A. Lemburg
Carl K wrote: I am sure this is what I want: http://www.python.org/topics/database/docs.html The documentation for the PythonWin ODBC module. but it is 404. google isn't being nice. Anyone know where I can find some simple examples? I have used odbc in other environments, so just

Re: An Editor that Skips to the End of a Def

2007-09-21 Thread Stefan Behnel
Michael v. Fondern wrote: (Ctrl-Shift-Down) Is this the opposite of thumbs up, or is it just to suggest that Eclipse can come close to Emacs's usability if you try hard? Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: frange() question

2007-09-21 Thread Michael J. Fromberger
In article [EMAIL PROTECTED], George Trojan [EMAIL PROTECTED] wrote: A while ago I found somewhere the following implementation of frange(): def frange(limit1, limit2 = None, increment = 1.): Range function that accepts floats (and integers). Usage: frange(-2, 2,

Re: __contains__() : Bug or Feature ???

2007-09-21 Thread Hrvoje Niksic
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: I need to overload the operator in and let him return an object ... It seems it is not a behavior Python expect : Python expects it all right, but it intentionally converts the value to a boolean. The 'in' operator calls PySequence_Contains, which

SHOCK: WHY None?

2007-09-21 Thread n00m
def f(i,sm): if i+1==len(a): print sm+a[i] return sm+a[i] else: f(i+1,sm+a[i]) a=[1,2,3,4,5] print f(0,0) 15 None -- http://mail.python.org/mailman/listinfo/python-list

Re: SHOCK: WHY None?

2007-09-21 Thread Tim Golden
n00m wrote: def f(i,sm): if i+1==len(a): print sm+a[i] return sm+a[i] else: f(i+1,sm+a[i]) a=[1,2,3,4,5] print f(0,0) 15 None You're not actually returning anything from the recursive call. TJG --

Re: SHOCK: WHY None?

2007-09-21 Thread Dave Borne
else: f(i+1,sm+a[i]) Maybe because you are ignoring the return value of the when you recurse... try this else: return f(i+1, sm+a[i]) -Dave -- http://mail.python.org/mailman/listinfo/python-list

Calling constructor but not initializer

2007-09-21 Thread Steven D'Aprano
I have a class that has a distinct empty state. In the empty state, it shouldn't have any data attributes, but it should still have methods. The analogy is with a list: an empty list still has methods like append() etc. but it has no data, if by data you mean items in the list. I can construct

Re: __contains__() and overload of in : Bug or Feature ???

2007-09-21 Thread Hrvoje Niksic
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: The string yop evaluates to the boolean value True, as it is not empty. Does it means that when overloading an operator, python just wrap the call to the method and keep control of the returned values ??? In case of 'in' operator, it does. --

Re: SHOCK: WHY None?

2007-09-21 Thread Ben Finney
n00m [EMAIL PROTECTED] writes: def f(i,sm): if i+1==len(a): print sm+a[i] return sm+a[i] else: f(i+1,sm+a[i]) a=[1,2,3,4,5] print f(0,0) 15 None Here's one to meditate on: def foo(): ... print foo ... print foo() foo

__contains__() and overload of in : Bug or Feature ???

2007-09-21 Thread [EMAIL PROTECTED]
Thanks for your quick response. I need to overload the operator in and let him return an object ... It seems it is not a behavior Python expect : class A: ...def __contains__(self,a): ...return 'yop' ... a=A() print 'toto' in a True print a.__contains__('toto')

Re: __contains__() and overload of in : Bug or Feature ???

2007-09-21 Thread Carsten Haese
On Fri, 2007-09-21 at 13:57 +, [EMAIL PROTECTED] wrote: Does it means that when overloading an operator, python just wrap the call to the method and keep control of the returned values ??? Is there a way to bypass this wrapping ??? The answers are No in general, but yes in this case and

Re: Python 3K or Python 2.9?

2007-09-21 Thread Ron Adam
Bruno Desthuilliers wrote: Ron Adam a écrit : TheFlyingDutchman wrote: I am not talking about the way it does it, but rather, the way it could do it or... could have done it. That requires no knowledge of how the interpreter currently does it unless I am proposing something that no

Re: Calling constructor but not initializer

2007-09-21 Thread Steve Holden
Steven D'Aprano wrote: I have a class that has a distinct empty state. In the empty state, it shouldn't have any data attributes, but it should still have methods. The analogy is with a list: an empty list still has methods like append() etc. but it has no data, if by data you mean items

acronym program

2007-09-21 Thread Shawn Minisall
I'm trying to write a program that gets the first letter of every word of a phrase and prints it on screen. I'm having problems with it. I'm thinking a for loop would be good since I don't know the exact number of words the user is going to enter, but after that I get confused. How do I

Re: Remote Command a Python Script

2007-09-21 Thread Diez B. Roggisch
Ulysse wrote: Hello, I've installed Python 2.5 on my WRT54G Linksys Router. On this router a script is executed. This script write a little Pickle database in the router memory. I would like to write another Python script which will be able to : 1. Stop and start the remote script

Remote Command a Python Script

2007-09-21 Thread Ulysse
Hello, I've installed Python 2.5 on my WRT54G Linksys Router. On this router a script is executed. This script write a little Pickle database in the router memory. I would like to write another Python script which will be able to : 1. Stop and start the remote script from my Windows Computer.

Re: __contains__() and overload of in : Bug or Feature ???

2007-09-21 Thread Steve Holden
[EMAIL PROTECTED] wrote: Thanks for your quick response. I need to overload the operator in and let him return an object ... It seems it is not a behavior Python expect : class A: ...def __contains__(self,a): ...return 'yop' ... a=A() print 'toto' in a True print

Re: calling extension's autoconf/make from distutils

2007-09-21 Thread Gary Jefferson
On Sep 20, 10:43 pm, Gary Jefferson [EMAIL PROTECTED] wrote: I've got a python extension that comes with its own standard autoconf/ automake system, and I can python setup.py build just fine with it as long as I have previously done ./configure in that directory. However, 'python setup.py

Re: Calling constructor but not initializer

2007-09-21 Thread Hrvoje Niksic
Steven D'Aprano [EMAIL PROTECTED] writes: I can construct an empty instance in the __new__ constructor, and I can initialize an non-empty instance in the __init__ initializer, but I can't think of any good way to stop __init__ from being called if the instance is empty. In pseudo-code, I want

Re: Processing drag drop on the desktop

2007-09-21 Thread Pierre Quentel
On 21 sep, 08:58, Gabriel Genellina [EMAIL PROTECTED] wrote: The shortcut must point to a *program*, not a *document*. Change the shortcut destination to point to: c:\path\to\python c:\path\to\your\script.py -- Gabriel Genellina Thanks for the explanation Gabriel, it works fine now Pierre

Re: Building Python with VC8 on x64 Vista

2007-09-21 Thread danfike
On Sep 20, 9:45 am, [EMAIL PROTECTED] wrote: Hi all, So I'm working on a C++ application that will eventually embed or extend Python using Boost.Python, but I first need to get Python compiled correctly for my platform. I've got a Windows Vista 64-bit machine with a Core 2 processor, and I'm

Re: An Editor that Skips to the End of a Def

2007-09-21 Thread Bjoern Schliessmann
Stefan Behnel wrote: Bjoern Schliessmann wrote: Lawrence D'Oliveiro wrote: http://ars.userfriendly.org/cartoons/ ?id=20070910mode=classic. Esc-Meta-Alt-Ctrl-Shift? :) Yep, that's five of them. I'd also have mentioned Caps Lock, Alt Gr, Compose and Sysrq if there was no deeper meaning

elementtree question

2007-09-21 Thread Tim Arnold
Hi, I'm using elementtree and elementtidy to work with some HTML files. For some of these files I need to enclose the body content in a new div tag, like this: body div class=remapped original contents... /div /body I figure there must be a way to do it by creating a 'div' SubElement to

Re: acronym program

2007-09-21 Thread Paul Rudin
Shawn Minisall [EMAIL PROTECTED] writes: I'm trying to write a program that gets the first letter of every word of a phrase and prints it on screen. I'm having problems with it. I'm thinking a for loop would be good since I don't know the exact number of words the user is going to enter, but

Re: acronym program

2007-09-21 Thread Shawn Minisall
That was it! Thanks a lot! I was also trying to output the acronym in caps so I was entering string.upper (acronym) like whats in the book and kept getting a 'tuple' object is not callable error message. Just for the heck of it I tried it acronym.upper() and it worked! I thought it could

Re: acronym program

2007-09-21 Thread Ian Clark
Shawn Minisall wrote: I'm trying to write a program that gets the first letter of every word of a phrase and prints it on screen. I'm having problems with it. I'm thinking a for loop would be good since I don't know the exact number of words the user is going to enter, but after that I

Re: calling extension's autoconf/make from distutils

2007-09-21 Thread Steve Holden
Gary Jefferson wrote: On Sep 20, 10:43 pm, Gary Jefferson [EMAIL PROTECTED] wrote: I've got a python extension that comes with its own standard autoconf/ automake system, and I can python setup.py build just fine with it as long as I have previously done ./configure in that directory.

Re: calling extension's autoconf/make from distutils

2007-09-21 Thread Steve Holden
Gary Jefferson wrote: On Sep 20, 10:43 pm, Gary Jefferson [EMAIL PROTECTED] wrote: I've got a python extension that comes with its own standard autoconf/ automake system, and I can python setup.py build just fine with it as long as I have previously done ./configure in that directory.

Newbie completely confused

2007-09-21 Thread Jeroen Hegeman
Dear Pythoneers, I'm moderately new to python and it got me completely lost already. I've got a bunch of large (30MB) txt files containing one 'event' per line. I open files after each other, read them line by line and from each line build a 'data structure' of a main class (HugeClass)

Re: I could use some help making this Python code run faster using only Python code.

2007-09-21 Thread Python Maniac
On Sep 21, 12:56 am, Duncan Booth [EMAIL PROTECTED] wrote: George Sakkis [EMAIL PROTECTED] wrote: It has to do with the input string length; try multiplying it by 10 or 100. Below is a more complete benchmark; for largish strings, the imap version is the fastest among those using the

xml-rpc timeout

2007-09-21 Thread Jd
Hi I have a multi-threaded application. For certain operations to the server, I would like to explicitly set timeout so that I get correct status from the call and not timed out exception. Does anyone know how to go about doing it ? /Jd --

TRying to import files from my folder not pythons lib folder

2007-09-21 Thread [EMAIL PROTECTED]
Hi, I'm trying to create my own lib of functions, but it seems like I can only import them if they are in pythons lib folder. Example I have a folder called K:\mypython Now in the interactive python shell I type Import k:\mypython\listall And get a error on : If I store listall.py in pythons

threading.local _threading_local problems

2007-09-21 Thread Jd
Hi I have the following situation.. Have a worker thread, that does the work given to it. While doing work, some of the objects use thread local storage for storing that requires explicit close. e.g. connection handles. These objects are long living. The worker, does not have any direct access

Re: xml-rpc timeout

2007-09-21 Thread Steve Holden
Jd wrote: Hi I have a multi-threaded application. For certain operations to the server, I would like to explicitly set timeout so that I get correct status from the call and not timed out exception. Does anyone know how to go about doing it ? The easiest way is to use

Re: TRying to import files from my folder not pythons lib folder

2007-09-21 Thread kyosohma
On Sep 21, 12:32 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I'm trying to create my own lib of functions, but it seems like I can only import them if they are in pythons lib folder. Example I have a folder called K:\mypython Now in the interactive python shell I type Import

Re: Zope review

2007-09-21 Thread Ross Patterson
Bruno Desthuilliers [EMAIL PROTECTED] writes: Norm a écrit : Hi, without meaning to start a flame war between the various python web tools, I was wondering if anyone had a review of the status of Zope. For example, is it being used for new projects or just maintenance? I really like the

Parameterize formatting string

2007-09-21 Thread cyril giraudon
Hello, I 'd like to know if a std::setw() equivalent function exists in python ? i thought of something like : a = 16 %ai % 12 But it is not correct. Any Idea ? Thanks a lot, Cyril. -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd files; just left behind?

2007-09-21 Thread Robert Kern
Robin Becker wrote: Bruno Desthuilliers wrote: Robin Becker a écrit : John J. Lee wrote: Robin Becker [EMAIL PROTECTED] writes: I see a folder .python-eggs in my home directory on one of our servers with various .so files

Re: Parameterize formatting string

2007-09-21 Thread Carsten Haese
On Fri, 2007-09-21 at 20:16 +0200, David wrote: Or, more ugly: %%%di % a % 12 Or, less ugly: %*i % (a,12) -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Parameterize formatting string

2007-09-21 Thread Jean-Paul Calderone
On Fri, 21 Sep 2007 20:16:29 +0200, David [EMAIL PROTECTED] wrote: On 9/21/07, cyril giraudon [EMAIL PROTECTED] wrote: Hello, I 'd like to know if a std::setw() equivalent function exists in python ? i thought of something like : a = 16 %ai % 12 But it is not correct. Any Idea ? (%i

Re: Parameterize formatting string

2007-09-21 Thread David
On 9/21/07, cyril giraudon [EMAIL PROTECTED] wrote: Hello, I 'd like to know if a std::setw() equivalent function exists in python ? i thought of something like : a = 16 %ai % 12 But it is not correct. Any Idea ? (%i % 12).rjust(a) Or, more ugly: %%%di % a % 12 The first % (after

Re: TRying to import files from my folder not pythons lib folder

2007-09-21 Thread Steve Holden
[EMAIL PROTECTED] wrote: On Sep 21, 12:32 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I'm trying to create my own lib of functions, but it seems like I can only import them if they are in pythons lib folder. Example I have a folder called K:\mypython Now in the interactive

Re: RE Help

2007-09-21 Thread David
data = asdfasgSTARTpruyerfghdfjENDhfawrgbqfgsfgsdfg x = re.compile('START.END', re.DOTALL) This should work: x = re.compile('START(.*)END', re.DOTALL) -- http://mail.python.org/mailman/listinfo/python-list

Re: xml-rpc timeout

2007-09-21 Thread Jd
Steve Holden wrote: Jd wrote: Hi I have a multi-threaded application. For certain operations to the server, I would like to explicitly set timeout so that I get correct status from the call and not timed out exception. Does anyone know how to go about doing it ? The easiest way is to

RE Help

2007-09-21 Thread byte8bits
Not specific to Python, but it will be implemented in it... how do I compile a RE to catch everything between two know values? Here's what I've tried (but failed) to accomplish... the knowns here are START and END: data = asdfasgSTARTpruyerfghdfjENDhfawrgbqfgsfgsdfg x = re.compile('START.END',

Re: Python Regex Question

2007-09-21 Thread Ivo
crybaby wrote: On Sep 20, 4:12 pm, Tobiah [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I need to extract the number on each td tags from a html file. i.e 49.950 from the following: td align=right width=80font size=2 face=New Times Roman,Times,Serifnbsp;49.950nbsp;/font/td The actual

Re: RE Help

2007-09-21 Thread chris . monsanto
On Sep 21, 2:44 pm, David [EMAIL PROTECTED] wrote: data = asdfasgSTARTpruyerfghdfjENDhfawrgbqfgsfgsdfg x = re.compile('START.END', re.DOTALL) This should work: x = re.compile('START(.*)END', re.DOTALL) You'll want to use a non-greedy match: x = re.compile(rSTART(.*?)END, re.DOTALL)

Re: xml-rpc timeout

2007-09-21 Thread Steve Holden
Jd wrote: Steve Holden wrote: Jd wrote: Hi I have a multi-threaded application. For certain operations to the server, I would like to explicitly set timeout so that I get correct status from the call and not timed out exception. Does anyone know how to go about doing it ? The

Re: RE Help

2007-09-21 Thread Steve Holden
[EMAIL PROTECTED] wrote: On Sep 21, 2:44 pm, David [EMAIL PROTECTED] wrote: data = asdfasgSTARTpruyerfghdfjENDhfawrgbqfgsfgsdfg x = re.compile('START.END', re.DOTALL) This should work: x = re.compile('START(.*)END', re.DOTALL) You'll want to use a non-greedy match: x =

Re: Google and Python

2007-09-21 Thread David
OK, thanks. Would you know what technique the custom web server uses to invoke a C++ app (ditto for Java and Python) CGI is supposed to be too slow for large sites. For large sites you would have modules loaded into your web server so that executables don't have to be shelled for each request.

Re: Remote Command a Python Script

2007-09-21 Thread Ivo
Ulysse wrote: Hello, I've installed Python 2.5 on my WRT54G Linksys Router. On this router a script is executed. This script write a little Pickle database in the router memory. I would like to write another Python script which will be able to : 1. Stop and start the remote script from

Resolving windows shortcut to url

2007-09-21 Thread Richard Townsend
If I have a windows shortcut to a URL, is there a way to get the URL in a Python app? I found some code that uses pythoncom to resolve shortcuts to local files, but I haven't found any examples for URLs. The PyWin32 help mentions the PyIUniformResourceLocator Object, but I couldn't find an

Re: RE Help

2007-09-21 Thread byte8bits
You'll want to use a non-greedy match: x = re.compile(rSTART(.*?)END, re.DOTALL) Otherwise the . will match END as well. On Sep 21, 3:23 pm, Steve Holden [EMAIL PROTECTED] wrote: Only if there's a later END in the string, in which case the user's requirements will determine whether greedy

  1   2   >