Minor bug in tempfile module (possibly __doc__ error)

2007-05-08 Thread James T. Dennis
Tonight I discovered something odd in the __doc__ for tempfile as shipped with Python 2.4.4 and 2.5: it says: This module also provides some data items to the user: TMP_MAX - maximum number of names that will be tried before giving up. templat

Re: interesting exercise

2007-05-08 Thread Charles Sanders
Michael Tobis wrote: > Here is the bloated mess I came up with. I did see that it had to be > recursive, and was proud of myself for getting it pretty much on the > first try, but the thing still reeks of my sorry old fortran-addled > mentality. Recursion is not necessary, but is much, much cleare

CPU usage.

2007-05-08 Thread Navid Parvini
Dear All, I want to get the CPU usage in my code. Is there any module in Python to get it? Also I want to get in on Windows and Linux. Thank you in advance. Navid - Ahhh...imagining that irresistible "new car" smell? Check outnew cars at Y

Re: which is more pythonic/faster append or +=[]

2007-05-08 Thread Alex Martelli
alf <[EMAIL PROTECTED]> wrote: > two ways of achieving the same effect > > > l+=[n] > > or > > l.append(n) > > > so which is more pythonic/faster? .append - easy to measure, too: brain:~ alex$ python -mtimeit 'L=range(3); n=23' 'x=L[:]; x.append(n)' 100 loops, best of 3: 1.31 usec per

Re: Towards faster Python implementations - theory

2007-05-08 Thread Kay Schluehr
On May 9, 1:25 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Marc 'BlackJack' Rintsch wrote: > > I don't see how this type inference for static types will work unless some > > of the dynamism of the language will get restricted. But is this really > > necessary? Isn't a JIT compiler and maybe type

which is more pythonic/faster append or +=[]

2007-05-08 Thread alf
two ways of achieving the same effect l+=[n] or l.append(n) so which is more pythonic/faster? -- alfz1 -- http://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 error

2007-05-08 Thread Martin v. Löwis
> ImportError: libpq.so.5: cannot open shared object file: No such file or > directory > > libpq files are readable by the world: [EMAIL PROTECTED] pgsql # ll lib/ -d > drwxr-xr-x 3 postgres postgres 1528 2007-05-07 23:25 lib/ Don't try this as the root user, but as the one for whom it is failing

Re: Towards faster Python implementations - theory

2007-05-08 Thread Alex Martelli
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > John Nagle a écrit : > >Some faster Python implementations are under development. > > JPython has been around for a while, > > s/JP/J/ These days, yes, but it WAS originally called JPython (it was renamed to Jython later). So, "has been aroun

Re: Parameter checking on an interfase

2007-05-08 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: ... > In this case, could be reasonable add type checking LBYL style > on the methods, so if passed data is of wrong type, it generates a > adequate exception to be catched by the caller? In this way, the rest As maybe one of the first popular authors to use L

Parameter checking on an interfase

2007-05-08 Thread w . m . gardella . sambeth
Hi all, I am more or less new to Python, and currently am making my first "serious" program. The application is a Clinical History manager (for my wife) which stores its data on a sqlite database. After googling on this newsgroup, I have read several threads where is stated that the LBYL wa

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-08 Thread Steven Howe
Steve Holden wrote: Steven D'Aprano wrote: On Wed, 02 May 2007 19:47:28 -0700, Huck Phin wrote: [a request for peace, love and understanding, concluding with] We all should be a little more considerate of each other. And if the hippy hug fest fails to stop spamming, perhaps

Re: Towards faster Python implementations - theory

2007-05-08 Thread John Nagle
Marc 'BlackJack' Rintsch wrote: > I don't see how this type inference for static types will work unless some > of the dynamism of the language will get restricted. But is this really > necessary? Isn't a JIT compiler and maybe type hinting good enough? Not necessarily. One of the more powe

Re: 1.#QNAN Solution

2007-05-08 Thread Alex Martelli
Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Tue, 08 May 2007 14:14:58 -0300, Greg Corradini > <[EMAIL PROTECTED]> escribió: > > > I'm running descriptive stats on mileages from a database (float numbers, > > about a million records). My sum returns 1.#QNAN, which I understand from > > sea

Re: String parsing

2007-05-08 Thread HMS Surprise
Thanks all. Carsten, you are here early and late. Do you ever sleep? ;^) -- http://mail.python.org/mailman/listinfo/python-list

Re: change of random state when pyc created??

2007-05-08 Thread Gabriel Genellina
En Tue, 08 May 2007 14:59:27 -0300, Alan Isaac <[EMAIL PROTECTED]> escribió: > What I have seen is: > > - when a test1.pyc file is present, I always get the > same outcome (result1) > - when a test1.pyc file is NOT present, I always get > the same outcome (result2) >

Re: String parsing

2007-05-08 Thread Carsten Haese
On 8 May 2007 19:06:14 -0700, HMS Surprise wrote > Thanks for posting. Could you reccommend an HTML parser that can be > used with python or jython? BeautifulSoup (http://www.crummy.com/software/BeautifulSoup/) makes HTML parsing easy as pie, and sufficiently old versions seem to work with Jython.

tokenize generate_tokens token[0]

2007-05-08 Thread castironpi
Is token[0] guaranteed to be OP for parentheses, commas, etc.? -- http://mail.python.org/mailman/listinfo/python-list

Re: String parsing

2007-05-08 Thread Gabriel Genellina
En Tue, 08 May 2007 23:06:14 -0300, HMS Surprise <[EMAIL PROTECTED]> escribió: > Thanks for posting. Could you reccommend an HTML parser that can be > used with python or jython? Try BeautifoulSoup, which handles malformed pages pretty well. -- Gabriel Genellina -- http://mail.python.org/ma

Re: BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-08 Thread Michael A. Terrell
James Beck wrote: > > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > says... > > James Beck wrote: > > > > > > Yep, you must have access to better drugs than I do. > > > You get to hallucinate your stuff up. > > > Don't forget to adjust your tin beanie! > > > > > >Its not a beanie. He ha

Re: String parsing

2007-05-08 Thread HMS Surprise
On May 8, 9:19 pm, HMS Surprise <[EMAIL PROTECTED]> wrote: > Yes it could, after I isolate that one string. Making sure I that I > isolate that complete line and only that line is part of the problem. > It comes in as one large string... -- http://mail.python.org/mailman/listinfo/python-list

Re: String parsing

2007-05-08 Thread HMS Surprise
Yes it could, after I isolate that one string. Making sure I that I isolate that complete line and only that line is part of the problem. thanks for posting. jh -- http://mail.python.org/mailman/listinfo/python-list

Re: String parsing

2007-05-08 Thread HMS Surprise
Thanks for posting. Could you reccommend an HTML parser that can be used with python or jython? john -- http://mail.python.org/mailman/listinfo/python-list

Re: String parsing

2007-05-08 Thread Tim Leslie
On 8 May 2007 18:09:52 -0700, HMS Surprise <[EMAIL PROTECTED]> wrote: > > The string below is a piece of a longer string of about 2 > characters returned from a web page. I need to isolate the number at > the end of the line containing 'LastUpdated'. I can find > 'LastUpdated' with .find but n

Re: String parsing

2007-05-08 Thread Gabriel Genellina
En Tue, 08 May 2007 22:09:52 -0300, HMS Surprise <[EMAIL PROTECTED]> escribió: > The string below is a piece of a longer string of about 2 > characters returned from a web page. I need to isolate the number at > the end of the line containing 'LastUpdated'. I can find > 'LastUpdated' with .

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-08 Thread Steve Holden
Steven D'Aprano wrote: > On Wed, 02 May 2007 19:47:28 -0700, Huck Phin wrote: [a request for peace, love and understanding, concluding with] >> We all should be a little more considerate of each other. > > And if the hippy hug fest fails to stop spamming, perhaps we'll be allowed > to hunt them do

Re: My newbie annoyances so far

2007-05-08 Thread Isaac Gouy
On May 6, 9:29 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Isaac Gouy wrote: > > On May 6, 6:09 pm, John Nagle <[EMAIL PROTECTED]> wrote: > > >>Alex Martelli wrote: > > >>>John Nagle <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > >On Apr 27, 9:07 am, John Nagle <[EMAIL PROTECTE

Re: High resolution sleep (Linux)

2007-05-08 Thread John Nagle
Hendrik van Rooyen wrote: > "Tim Roberts" <[EMAIL PROTECTED]> wrote" > It is also possible to keep the timer list sorted by "expiry date", > and to reprogram the timer to interrupt at the next expiry time > to give arbitrary resolution, instead of implementing a regular 'tick'. Yes, and tha

Re: Win32: shortpathname to longpathname

2007-05-08 Thread Gabriel Genellina
En Tue, 08 May 2007 21:04:50 -0300, Jim Tittsler <[EMAIL PROTECTED]> escribió: > I wrap my cross platform application up with py2exe on Windows, and > have the installer associate a particular file type with it. When a > user double clicks on a document to launch my application, Windows > appea

String parsing

2007-05-08 Thread HMS Surprise
The string below is a piece of a longer string of about 2 characters returned from a web page. I need to isolate the number at the end of the line containing 'LastUpdated'. I can find 'LastUpdated' with .find but not sure about how to isolate the number. 'LastUpdated' is guaranteed to occur o

Re: tkinter get widget option value

2007-05-08 Thread James Stroud
[EMAIL PROTECTED] wrote: > Hi, > If I have a button widget > > w = Button(root, text = "Button", state = 'disabled') > > How can I get the value of option 'state' from the widget 'w'. > I want something like -- > > print w.state >> to print out >> 'disabled' > > Thanks > Rahul > print w["sta

Re: e-mailing multiple values

2007-05-08 Thread Gabriel Genellina
En Tue, 08 May 2007 20:19:22 -0300, Ian Clark <[EMAIL PROTECTED]> escribió: > On 5/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> >> I have a script which has a method which returns multiple strings at >> once using the yield. I would like to send an e-mail of these values in >> a singl

Re: interesting exercise

2007-05-08 Thread Michael Tobis
Thanks castironpi and alex, for this: def p(a,b): if not b: return [''] return [i+j for i in a for j in p(a,b-1)] That is a thing of beauty! As usual you guys didn't disappoint. (Validity check of alphabet removed; you didn't check for duplicate characters.) Here is the bloated

Re: 1.#QNAN Solution

2007-05-08 Thread Gabriel Genellina
En Tue, 08 May 2007 14:14:58 -0300, Greg Corradini <[EMAIL PROTECTED]> escribió: > I'm running descriptive stats on mileages from a database (float numbers, > about a million records). My sum returns 1.#QNAN, which I understand from > searching this forum is an error. > > While I'm looking for h

Re: Muzzle Velocity (was: High resolution sleep (Linux)

2007-05-08 Thread [EMAIL PROTECTED]
On May 8, 12:59 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Tue, 8 May 2007 08:24:01 +0200, "Hendrik van Rooyen" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > > So being an idle bugger, I just naturally assumed that the > > speed would have doubled in the inte

Re: Atttribute error

2007-05-08 Thread Gabriel Genellina
En Tue, 08 May 2007 13:54:31 -0300, HMS Surprise <[EMAIL PROTECTED]> escribió: >> print urllib.__file__ >> print dir(urllib) >> > > C:\maxq\bin\testScripts\.\urllib.py > ['__doc__', '__file__', '__name__', 'string'] Perhaps you get an import error and it got unnoticed? I think earlier Python

Win32: shortpathname to longpathname

2007-05-08 Thread Jim Tittsler
I wrap my cross platform application up with py2exe on Windows, and have the installer associate a particular file type with it. When a user double clicks on a document to launch my application, Windows appears to pass me the "short" Windows pathname. How can I convert to the long version of the

Re: FW: Re: e-mailing multiple values

2007-05-08 Thread Ian Clark
On 5/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Thanks. > That does help. When teh script sends a mail of the list item(all_data), the > data shows up like this: > > [(' Ham\n', ' eggs \n'), > (' chicken \n', ' thighs

RotatingFileHandler bugs/errors and a general logging question.

2007-05-08 Thread nicholas . petrella
I am currently trying to use the python logging system as a core enterprise level logging solution for our development and production environments. The rotating file handler seems to be what I am looking for as I want the ability to have control over the number and size of log files that are writt

Re: FW: Re: e-mailing multiple values

2007-05-08 Thread axjacob
Thanks. That does help. When teh script sends a mail of the list item(all_data), the data shows up like this: [(' Ham\n', ' eggs \n'), (' chicken \n', ' thighs \n')] So I have to figure out a way to cleanup the co

Re: e-mailing multiple values

2007-05-08 Thread Ian Clark
On 5/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I have a script which has a method which returns multiple strings at once > using the yield. I would like to send an e-mail of these values in a single > e-mail instead of a mail for each string. How would I be able to do that? > > Thank

USA VISA USA STUDENT VISA USA H1B VISA Jobs With VISA Sponsorship, USA VISA immigration, USA VISA Sponsorship, USA VISA

2007-05-08 Thread ralph lewis
Feel free to add to your list: Seeking a USA Job? Do you want to know which USA employers/companies sponsor H1B work visa applicants? Download more than 65,000 new H1B visa employer/sponsor listings at http://www.insights123.com/visa.html -- http://mail.python.org/mailman/list

Re: __getattr__ and __getattribute__

2007-05-08 Thread Gabriel Genellina
En Tue, 08 May 2007 08:22:03 -0300, km <[EMAIL PROTECTED]> escribió: > i find it difficult to understand the difference between the magic > methods > __getattr__ and __getattribute__ > and so donot know when to use former or later. > can someone brief me on it ? This is better understood wit

RE: Using os.popen and os.chdir together

2007-05-08 Thread Looney, James B
ok, nevermind. My coworker pointed out part of what's wrong. Guess I'll need to do more spelunking in my script to figure out what I'm messing up. -JB From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Looney, James B Sent: Tuesday, May 08, 2007 4:17

e-mailing multiple values

2007-05-08 Thread anil_jacob
I have a script which has a method which returns multiple strings at once using the yield. I would like to send an e-mail of these values in a single e-mail instead of a mail for each string. How would I be able to do that? Thanks AJ -- http://mail.python.org/mailman/listinfo/python-list

Re: Muzzle Velocity (was: High resolution sleep (Linux)

2007-05-08 Thread Steven D'Aprano
On Tue, 08 May 2007 17:59:13 +, Dennis Lee Bieber wrote: >> Did you know that the first military smokeless powder >> round was for the French Lebel? - It threw a bronze >> ball, and could punch through a single brick wall. >> > Well, extreme high speed wouldn't help for that -- just get

Using os.popen and os.chdir together

2007-05-08 Thread Looney, James B
Within a script on a *nix machine, I use os.chdir then os.popen, and it appears to me as though the os.chdir had no effect so far as the os.popen is concerned. Why's that? Here's what I'm doing: >>> import os >>> os.path.realpath( os.curdir ) '/home/jlooney' >>> print os.popen( "echo $PWD" ).rea

Re: msbin to ieee

2007-05-08 Thread John Machin
On May 8, 8:15 pm, revuesbio <[EMAIL PROTECTED]> wrote: > On 7 mai, 23:38, John Machin <[EMAIL PROTECTED]> wrote: > > > > > On May 7, 11:37 pm, revuesbio <[EMAIL PROTECTED]> wrote: > > > > On 7 mai, 14:56, John Machin <[EMAIL PROTECTED]> wrote: > > > > > On May 7, 10:00 pm, revuesbio <[EMAIL PROTEC

Re: Designing a graph study program

2007-05-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, andrea wrote: > Interesting but what do you mean for two graph-implementatio that > share the same interface?? > I don't have abstract classes or interfaces in python, am I wrong? You are thinking of some kind of types or enforcements. If two classes have some methods wit

Re: __getattr__ and __getattribute__

2007-05-08 Thread Daniel Nogradi
> i find it difficult to understand the difference between the magic methods > __getattr__ and __getattribute__ > and so donot know when to use former or later. >From the docs: __getattr__(self, name) Called when an attribute lookup has not found the attribute in the usual places (i.e. it is not

Re: Mod Python Question

2007-05-08 Thread Daniel Nogradi
> I am very new to Python and Mod_Python and I am running into what > looks like a caching problem. > > I have the following code: > --- > from mod_python import apache > from folder import Messenger > > def handler(req): > > msg = Messenger(req): > > # using req

Re: interesting exercise

2007-05-08 Thread castironpi
On May 8, 4:55 pm, [EMAIL PROTECTED] wrote: > On May 8, 3:55 pm, James Stroud <[EMAIL PROTECTED]> wrote: > > > > > Steven D'Aprano wrote: > > > On Tue, 08 May 2007 10:22:05 +, James Stroud wrote: > > > >>This takes annoying past annoying to some new level of hell to which > > >>even satan himse

Re: Python regular expressions just ain't PCRE

2007-05-08 Thread John Machin
On May 9, 7:34 am, Klaas <[EMAIL PROTECTED]> wrote: > On May 5, 6:57 pm, Wiseman <[EMAIL PROTECTED]> wrote: > > > > There's also the YAGNI factor; most folk would restrict using regular > > > expressions to simple grep-like functionality and data validation -- > > > e.g. re.match("[A-Z][A-Z]?[0-9]{

Re: XLRD Python 2.51 Question

2007-05-08 Thread John Machin
On May 9, 1:36 am, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Tue, 2007-05-08 at 08:26 -0700, [EMAIL PROTECTED] wrote: > > CompDocError: MSAT extension: accessing sector 1717046 but only 2887 > > in file > > > I am not sure what this means at all > > At least superficially that sounds like the f

Re: interesting exercise

2007-05-08 Thread castironpi
On May 8, 3:55 pm, James Stroud <[EMAIL PROTECTED]> wrote: > Steven D'Aprano wrote: > > On Tue, 08 May 2007 10:22:05 +, James Stroud wrote: > > >>This takes annoying past annoying to some new level of hell to which > >>even satan himself wouldn't venture. > > > And thank you for sharing that pi

Re: How safe is a set of floats?

2007-05-08 Thread Klaas
On May 4, 10:15 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > Just to beat this into the ground, "test for equality" appears to be > implemented as "test for equality of hashes". So if you want to > implement a class for the purposes of set membership, you must > implement a suitable __hash__ met

Re: Another easy pair of questions

2007-05-08 Thread HMS Surprise
> Press the cursor-up key. > > Martin Should have mentioned that I tried that hunting around earlier and it did not work. jh -- http://mail.python.org/mailman/listinfo/python-list

psycopg2 error

2007-05-08 Thread Luis P. Mendes
Hi, I've installed psycopg2 under Slacware 11.0 along with PostgreSQL 8.2.4. When I run the python shell I get the following error: [EMAIL PROTECTED] ~$ python Python 2.4.3 (#1, Jul 26 2006, 20:13:39) [GCC 3.4.6] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>

Re: Python regular expressions just ain't PCRE

2007-05-08 Thread Klaas
On May 5, 6:57 pm, Wiseman <[EMAIL PROTECTED]> wrote: > > There's also the YAGNI factor; most folk would restrict using regular > > expressions to simple grep-like functionality and data validation -- > > e.g. re.match("[A-Z][A-Z]?[0-9]{6}[0-9A]$", idno). The few who want to > > recognise yet anot

Re: Suggestions for how to approach this problem?

2007-05-08 Thread James Stroud
John Salerno wrote: > Marc 'BlackJack' Rintsch wrote: > Here's what it looks like now: > > 1. Levy, S.B. (1964) Isologous interference with ultraviolet and X-ray > irradiated > bacteriophage T2. J. Bacteriol. 87:1330-1338. > 2. Levy, S.B. and T. Watanabe (1966) Mepacrine and transfer of R >

Re: BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-08 Thread James Beck
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > James Beck wrote: > > > > Yep, you must have access to better drugs than I do. > > You get to hallucinate your stuff up. > > Don't forget to adjust your tin beanie! > > >Its not a beanie. He had his head tin plated. :( > I just th

Re: tkinter get widget option value

2007-05-08 Thread rahulnag22
On May 8, 2:15 pm, Rob Williscroft <[EMAIL PROTECTED]> wrote: > wrote innews:[EMAIL PROTECTED] > comp.lang.python: > > > If I have a button widget > > > w = Button(root, text = "Button", state = 'disabled') > > > How can I get the value of option 'state' from the widget 'w'. > > I want something l

Re: Designing a graph study program

2007-05-08 Thread andrea
On 8 Mag, 13:55, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > Ok thank you very much I'll try with that. > > But I have some design doubts, I'd like to keep the algorithm (for > > example bfs) as clean as possible, being independent from the drawing > > methods. > > And how could I make it ste

ANN: A login wrapper for DSPAM

2007-05-08 Thread Joshua J. Kugler
I wanted it: http://www.mail-archive.com/dspam-users%40lists.nuclearelephant.com/msg00264.html So I wrote it. Annoucning DspamFrontend 1.0 DSPAM Frontend is a script written in Python designed to provide login facilities for DSPAM when HTTP basic auth is either undesireable or unavailable. dsp

ANN: vuLookup.py, a TCP lookup server for Postfix

2007-05-08 Thread Joshua J. Kugler
We needed it, so we wrote it. Announcing vuLookup.py 1.0 vuLookup.py is a TCP lookup table server for Postfix, written in Python. It reads an ini file and uses the values therein to answer requests for virtual users, as well as virtual domains. You can download it here: http://www.eeinternet.c

Re: Another easy pair of questions

2007-05-08 Thread kyosohma
On May 8, 4:12 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > In a python Tk shell in Windows, what is the equivalent of unix's pwd? > > os.getcwd() > > > In a python Tk shell in Windows, is there an easy way to reoeat an > > earlier command, similar to Tcl/Tk's hist? > > Press the cursor-up

Re: Question about file handles and windows handles @ Windows Operating Systems

2007-05-08 Thread Martin v. Löwis
> Are there any function to get windows handle of file which is already > opened with built-in file-function. mscvrt.get_osfhandle HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Another easy pair of questions

2007-05-08 Thread Martin v. Löwis
> In a python Tk shell in Windows, what is the equivalent of unix's pwd? os.getcwd() > In a python Tk shell in Windows, is there an easy way to reoeat an > earlier command, similar to Tcl/Tk's hist? Press the cursor-up key. Martin -- http://mail.python.org/mailman/listinfo/python-list

Question about file handles and windows handles @ Windows Operating Systems

2007-05-08 Thread eino
Very hard to find right function... If I open file fname="c:\\temp\\foobar.txt" file_foobar = file(fname) file_foobar.fileno() returns 3 becausee of unix like library used in windows python If I'd like to get to known what windows handle it has hfile=win32file.CreateFile( ff,win32con.GEN

Re: sys.path

2007-05-08 Thread John Machin
On May 9, 1:35 am, HMS Surprise <[EMAIL PROTECTED]> wrote: > Is sys.path setup differnently in jython vs python? I have environment > variables pythonpath and jythonpath set to include C:\python22 but the > initial printout indicates it is being ignored. Also when I used > sys.path.extend, the adde

Re: interesting exercise

2007-05-08 Thread James Stroud
Steven D'Aprano wrote: > On Tue, 08 May 2007 10:22:05 +, James Stroud wrote: > > >>This takes annoying past annoying to some new level of hell to which >>even satan himself wouldn't venture. > > > And thank you for sharing that piece of spam with us again. It was so much > less enjoyable t

Re: changing a var by reference of a list

2007-05-08 Thread Bruno Desthuilliers
Jorgen Bodde a écrit : > Ok thanks, > > I will try this approach. The idea was that I could give a list to the > SQL execute command, so that the results coming back would > automatically be assigned to variables. > You may want to have a look at SQLAlchemy. -- http://mail.python.org/mailman/lis

Re: getmtime differs between Py2.5 and Py2.4

2007-05-08 Thread Irmen de Jong
Leo Kislov wrote: > > Let me guess: your E drive uses FAT filesystem? > > -- Leo > Nope, its all NTFS on my system. Anyway this doesn't matter, as the true cause is explained in another reply in this thread (bug in c runtime library of Python 2.4). --Irmen -- http://mail.python.org/mail

Re: Emacs and pdb after upgrading to Ubuntu Feisty

2007-05-08 Thread Patricia J. Hawkins
> "l" == levander <[EMAIL PROTECTED]> writes: l> Okay, thanks Alexander and Bernstein. I'll lookinto Emacs 23, but l> I'm worried about compatibility with modes. Does all the stuff l> that works in Emacs 21 work in 23? Like even that ipython.el file, l> does it work in Emacs 23? Well...

Re: Towards faster Python implementations - theory

2007-05-08 Thread Bruno Desthuilliers
John Nagle a écrit : >Some faster Python implementations are under development. > JPython has been around for a while, s/JP/J/ And FWIW, I'm not sure Jython is really faster than CPython... -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggestions for how to approach this problem?

2007-05-08 Thread Dave Hansen
On May 8, 3:00 pm, John Salerno <[EMAIL PROTECTED]> wrote: > Marc 'BlackJack' Rintsch wrote: > > I think I have vague idea how the input looks like, but it would be > > helpful if you show some example input and wanted output. > > Good idea. Here's what it looks like now: > > 1. Levy, S.B. (1964)

Mod Python Question

2007-05-08 Thread descartes
I am very new to Python and Mod_Python and I am running into what looks like a caching problem. I have the following code: --- from mod_python import apache from folder import Messenger def handler(req): msg = Messenger(req): # using req.write msg.write("hel

Another easy pair of questions

2007-05-08 Thread HMS Surprise
In a python Tk shell in Windows, what is the equivalent of unix's pwd? In a python Tk shell in Windows, is there an easy way to reoeat an earlier command, similar to Tcl/Tk's hist? -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter get widget option value

2007-05-08 Thread Rob Williscroft
wrote in news:[EMAIL PROTECTED] in comp.lang.python: > If I have a button widget > > w = Button(root, text = "Button", state = 'disabled') > > How can I get the value of option 'state' from the widget 'w'. > I want something like -- > > print w.state >> to print out >> 'disabled' > print w

Re: chdir()

2007-05-08 Thread HMS Surprise
On May 8, 3:06 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Tue, 2007-05-08 at 12:54 -0700, HMS Surprise wrote: > > Tried executing os.chdir("c:\twill") from a python Tk shell and got > > the error message: > > > WindowsError: [Error 123] The filename, directory name, or volume > > label synta

Re: Suggestions for how to approach this problem?

2007-05-08 Thread Necmettin Begiter
On Tuesday 08 May 2007 22:23:31 John Salerno wrote: > John Salerno wrote: > > typed, there are often line breaks at the end of each line > > Also, there are sometimes tabs used to indent the subsequent lines of > citation, but I assume with that I can just replace the tab with a space. Is this how

Re: chdir()

2007-05-08 Thread Carsten Haese
On Tue, 2007-05-08 at 12:54 -0700, HMS Surprise wrote: > Tried executing os.chdir("c:\twill") from a python Tk shell and got > the error message: > > WindowsError: [Error 123] The filename, directory name, or volume > label syntax is incorrect: 'c:\twill'. Backslash-t is a tab character, so you'r

Re: chdir()

2007-05-08 Thread Basilisk96
On May 8, 3:54 pm, HMS Surprise <[EMAIL PROTECTED]> wrote: > Tried executing os.chdir("c:\twill") from a python Tk shell and got > the error message: > > WindowsError: [Error 123] The filename, directory name, or volume > label syntax is incorrect: 'c:\twill'. > > I have the directory exists as I c

Re: chdir()

2007-05-08 Thread Jarek Zgoda
HMS Surprise napisał(a): > Tried executing os.chdir("c:\twill") from a python Tk shell and got > the error message: > > WindowsError: [Error 123] The filename, directory name, or volume > label syntax is incorrect: 'c:\twill'. > > I have the directory exists as I copied the name from the explorer

Re: Suggestions for how to approach this problem?

2007-05-08 Thread John Salerno
Marc 'BlackJack' Rintsch wrote: > I think I have vague idea how the input looks like, but it would be > helpful if you show some example input and wanted output. Good idea. Here's what it looks like now: 1. Levy, S.B. (1964) Isologous interference with ultraviolet and X-ray irradiated bacteri

Re: chdir()

2007-05-08 Thread Necmettin Begiter
On Tuesday 08 May 2007 22:54:39 HMS Surprise wrote: > WindowsError: [Error 123] The filename, directory name, or volume > label syntax is incorrect: 'c:\twill'. > > What is wrong with the syntax? Try 'c:\\twill' because the '\' character is the escape character. Eg: \n is new-line (aka crlf) \t is

chdir()

2007-05-08 Thread HMS Surprise
Tried executing os.chdir("c:\twill") from a python Tk shell and got the error message: WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: 'c:\twill'. I have the directory exists as I copied the name from the explorer window that was open to it. What is

Re: Suggestions for how to approach this problem?

2007-05-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, John Salerno wrote: > I have a large list of publication citations that are numbered. The > numbers are simply typed in with the rest of the text. What I want to do > is remove the numbers and then put bullets instead. Now, this alone > would be easy enough, with a littl

Re: After the Deletion of Google Answers, . U Got Questions Fills the Gap Answering and Asking the Tough Questions

2007-05-08 Thread MMM
On 7 May 2007 10:45:51 -0700, [EMAIL PROTECTED] wrote: >My friend asked some tough questions >http://ugotquestions.blogspot.com/2007_05_01_archive.html >unlike yahoo answers ( Which Generates Content with Answers ) U got >questions picks only the best, Real Person Questions.,yeah so there is >thi

Re: Suggestions for how to approach this problem?

2007-05-08 Thread John Salerno
John Salerno wrote: > typed, there are often line breaks at the end of each line Also, there are sometimes tabs used to indent the subsequent lines of citation, but I assume with that I can just replace the tab with a space. -- http://mail.python.org/mailman/listinfo/python-list

Re: 1.#QNAN Solution

2007-05-08 Thread Greg Corradini
Thanks for you help Grant Grant Edwards wrote: > > On 2007-05-08, Greg Corradini <[EMAIL PROTECTED]> wrote: > >> I'm running descriptive stats on mileages from a database >> (float numbers, about a million records). My sum returns >> 1.#QNAN, which I understand from searching this forum is an >

Re: BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-08 Thread Michael A. Terrell
James Beck wrote: > > Yep, you must have access to better drugs than I do. > You get to hallucinate your stuff up. > Don't forget to adjust your tin beanie! Its not a beanie. He had his head tin plated. :( -- Service to my country? Been there, Done that, and I've got my DD214 to prove it.

Suggestions for how to approach this problem?

2007-05-08 Thread John Salerno
I figured I might give myself a little project to make my life at work easier, so here's what I want to do: I have a large list of publication citations that are numbered. The numbers are simply typed in with the rest of the text. What I want to do is remove the numbers and then put bullets ins

tkinter get widget option value

2007-05-08 Thread rahulnag22
Hi, If I have a button widget w = Button(root, text = "Button", state = 'disabled') How can I get the value of option 'state' from the widget 'w'. I want something like -- print w.state >> to print out >> 'disabled' Thanks Rahul -- http://mail.python.org/mailman/listinfo/python-list

Re: Setting up python socket server with non-standard termination string.

2007-05-08 Thread Jean-Paul Calderone
On 8 May 2007 06:59:26 -0700, [EMAIL PROTECTED] wrote: >Hi, > >I'm trying to create a tcp/ip port listening socket server for various >cellular devices that don't use the standard "\r\n" termination string >at the end of their message. Instead, they use "-ND-". Do you know >how I can setup such

fminbound

2007-05-08 Thread darkside
Hello everyone: I'm new using scipy, so I'm sorry if any of my questions are silly. I'm trying to find the maxima, absolut and local, of a function, in order to fit an exponencial curve and get de exponecial argument. My function if the soluction of a couple equations system: def derivs3(x,t,ga

Re: No module named urllib

2007-05-08 Thread HMS Surprise
Great idea Dennis, I will look into that. Thanks, jh -- http://mail.python.org/mailman/listinfo/python-list

Re: Emacs and pdb after upgrading to Ubuntu Feisty

2007-05-08 Thread Alexander Schmolck
levander <[EMAIL PROTECTED]> writes: > Okay, thanks Alexander and Bernstein. I'll lookinto Emacs 23, but I'm > worried about compatibility with modes. Does all the stuff that works > in Emacs 21 work in 23? I've switched from 21 to 23 a few weeks ago and don't recall any particular issues (an

Re: change of random state when pyc created??

2007-05-08 Thread Alan Isaac
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > My testing suggests the bug is *not* to do with pyc files at all. I'm > getting different results when running the files, even when the directory > is read-only (and therefore no pyc files can be created). > > My resul

Re: 1.#QNAN Solution

2007-05-08 Thread Grant Edwards
On 2007-05-08, Greg Corradini <[EMAIL PROTECTED]> wrote: > I'm running descriptive stats on mileages from a database > (float numbers, about a million records). My sum returns > 1.#QNAN, which I understand from searching this forum is an > error. Not necessarily. You've ended up with a floating

Re: File Name Format

2007-05-08 Thread Grant Edwards
On 2007-05-08, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, Grant Edwards wrote: > >> On 2007-05-08, Anand <[EMAIL PROTECTED]> wrote: >> >>> How do I convert programmatically the file names from WIN32 to UNIX format? >> >> You don't need to. AFAIK, all legal WIN3

  1   2   >