Windows, subprocess.Popen & encodage

2007-05-07 Thread M�ta-MCI
Hi! >From long time, I have problems with strings return, in Windows, by subprocess.Popen / stdout.read() Last night, I found, by hazard, than if the second byte equal 0, it's, perhaps, the solution. With a code like this: p=subprocess.Popen(u850("cmd /u/c tdata=p.stdout.read()

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

2007-05-07 Thread Martin v. Löwis
> This is python 2.4.4 and Python 2.5.1 on windows XP. > The reported time clearly differs. Interesting. They don't for me: C:\temp>dir test_os.diff Volume in drive C has no label. Volume Serial Number is 7414-6FC4 Directory of C:\temp 04.04.2007 18:41 3.661 test_os.diff

Re: interesting exercise

2007-05-07 Thread Christopher Cormie
Michael Tobis wrote: > I want a list of all ordered permutations of a given length of a set > of tokens. Each token is a single character, and for convenience, they > are passed as a string in ascending ASCII order. > > For example > > permute("abc",2) > > should return ["aa","ab","ac","ba","bb"

Re: interesting exercise

2007-05-07 Thread castironpi
On May 8, 12:24 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > <[EMAIL PROTECTED]> wrote: > >... > > > def p(a,b): > > if list( a ) != sorted( list( a ) ): raise ValueError, "String not > > ordered." > > if not b: return [''] > > return [i+j for i in list(a) for j in p(a,b-1)]

Re: interesting exercise

2007-05-07 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: ... > def p(a,b): > if list( a ) != sorted( list( a ) ): raise ValueError, "String not > ordered." > if not b: return [''] > return [i+j for i in list(a) for j in p(a,b-1)] No need for 2/3 of the list(...) calls. sorted(a) and sorted(list(a)) will A

Re: interesting exercise

2007-05-07 Thread sherry
On May 8, 9:31 am, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Mon, 07 May 2007 20:45:52 -0700, Michael Tobis wrote: > > I have a reasonably elegant solution but it's a bit verbose (a couple > > dozen lines which I'll post later if there is interest). Is there some > > clever Pythonism I didn't

Re: how do you implement a reactor without a select?

2007-05-07 Thread Alex Martelli
Michele Simionato <[EMAIL PROTECTED]> wrote: > On May 8, 4:53 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > > What do you expect from "timers on Linux" that you could not get with a > > simple "sleep for the next N milliseconds"? A timer (on Linux or > > elsewhere) can jog your process N millise

Re: invoke user's standard mail client

2007-05-07 Thread Leo Kislov
On May 7, 2:00 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On May 7, 10:28 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: > > > > > Get the pywin32 package (Python for Windows extensions) from sourceforge, > > install it, and look into the win32comext\mapi\demos directory. > > Thanks

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

2007-05-07 Thread Tony Meyer
On May 8, 10:15 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > that you are mistaken: There is NO difference between the outcome > of os.path.getmtime between Py2.5 and Py2.4. It always did return > UTC, and always will. In revision 42230, you checked in a change to posixmodule.c with the foll

Re: interesting exercise

2007-05-07 Thread castironpi
On May 7, 11:42 pm, [EMAIL PROTECTED] wrote: > On May 7, 11:34 pm, [EMAIL PROTECTED] wrote: > > > > > On May 7, 10:45 pm, Michael Tobis <[EMAIL PROTECTED]> wrote: > > > > I want a list of all ordered permutations of a given length of a set > > > of tokens. Each token is a single character, and for

Re: interesting exercise

2007-05-07 Thread castironpi
On May 7, 11:34 pm, [EMAIL PROTECTED] wrote: > On May 7, 10:45 pm, Michael Tobis <[EMAIL PROTECTED]> wrote: > > > > > I want a list of all ordered permutations of a given length of a set > > of tokens. Each token is a single character, and for convenience, they > > are passed as a string in ascendi

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

2007-05-07 Thread Leo Kislov
On May 7, 4:15 pm, Irmen de Jong <[EMAIL PROTECTED]> wrote: > Martin v. Löwis wrote: > >> Is this a bug? > > > Why don't you read the responses posted earlier? John Machin > > replied (in <[EMAIL PROTECTED]>) > > that you are mistaken: There is NO difference between the outcome > > of os.path.getmt

Re: interesting exercise

2007-05-07 Thread Gabriel Genellina
En Tue, 08 May 2007 01:33:51 -0300, Steven D'Aprano <[EMAIL PROTECTED]> escribió: > On Tue, 08 May 2007 01:21:37 -0300, Gabriel Genellina wrote: > >> if not sorted(values): raise ValueError("unsorted values") > > sorted() doesn't return a flag telling if the values are sorted, it > returns a new

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

2007-05-07 Thread John Machin
On May 8, 1:04 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > John Machin <[EMAIL PROTECTED]> wrote: > > > [E:\Projects]c:\Python24\python.exe -c "import os; print > > os.path.getmtime('p64.py')"> > 1164470381 > > > > [E:\Projects]c:\Python25\python.exe -c "import os; print > > os.path.getmtime('p6

Re: interesting exercise

2007-05-07 Thread castironpi
On May 7, 10:45 pm, Michael Tobis <[EMAIL PROTECTED]> wrote: > I want a list of all ordered permutations of a given length of a set > of tokens. Each token is a single character, and for convenience, they > are passed as a string in ascending ASCII order. > > For example > > permute("abc",2) > > sh

Re: interesting exercise

2007-05-07 Thread Steven D'Aprano
On Tue, 08 May 2007 01:21:37 -0300, Gabriel Genellina wrote: > if not sorted(values): raise ValueError("unsorted values") sorted() doesn't return a flag telling if the values are sorted, it returns a new list containing values sorted. So this line will raise an exception only on an empty sequen

Re: interesting exercise

2007-05-07 Thread Steven D'Aprano
On Mon, 07 May 2007 20:45:52 -0700, Michael Tobis wrote: > I have a reasonably elegant solution but it's a bit verbose (a couple > dozen lines which I'll post later if there is interest). Is there some > clever Pythonism I didn't spot? Peering into my crystal ball, I see that your algorithm does

Re: interesting exercise

2007-05-07 Thread Gabriel Genellina
En Tue, 08 May 2007 00:45:52 -0300, Michael Tobis <[EMAIL PROTECTED]> escribió: > I want a list of all ordered permutations of a given length of a set > of tokens. Each token is a single character, and for convenience, they > are passed as a string in ascending ASCII order. This is what I come,

Re: how do you implement a reactor without a select?

2007-05-07 Thread Michele Simionato
On May 7, 7:36 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > Busy-looping like that is ugly and inefficient, even with the sleep > thrown in. > > Most GUI main loops _do_ use either select() or poll(). When Xt/GTK/ > Qt/etc have function like "gtk_add_input" which takes an fd that > you'l

[ANN]Py++ 0.9.0

2007-05-07 Thread Roman Yakovenko
Hello! I'm pleased to announce the 0.9.0 release of Py++. What is Py++? = Py++ is an object-oriented framework for creating a code generator for Boost.Python library. Where is Py++? == Site: http://language-binding.net/pyplusplus/pyplusplus.html Download: http://langua

[ANN]pygccxml-0.9.0

2007-05-07 Thread Roman Yakovenko
Hello! I'm pleased to announce the 0.9.0 release of pygccxml. What is pygccxml? = "...The purpose of the GCC-XML extension is to generate an XML description of a C++ program from GCC's internal representation. " -- Introduction to GCC-XML The purpose of pygccxml is to read a ge

Re: interesting exercise

2007-05-07 Thread James Stroud
Michael Tobis wrote: > I want a list of all ordered permutations of a given length of a set > of tokens. Each token is a single character, and for convenience, they > are passed as a string in ascending ASCII order. > > For example > > permute("abc",2) > > should return ["aa","ab","ac","ba","bb"

Re: how do you implement a reactor without a select?

2007-05-07 Thread Michele Simionato
On May 8, 4:53 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > What do you expect from "timers on Linux" that you could not get with a > simple "sleep for the next N milliseconds"? A timer (on Linux or > elsewhere) can jog your process N milliseconds from now, e.g. with a > SIGALRM or SIGPROF, and

interesting exercise

2007-05-07 Thread Michael Tobis
I want a list of all ordered permutations of a given length of a set of tokens. Each token is a single character, and for convenience, they are passed as a string in ascending ASCII order. For example permute("abc",2) should return ["aa","ab","ac","ba","bb","bc","ca","cb","cc"] and permute("135

Re: randomly write to a file

2007-05-07 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: ... > Hang on, as I understand it, Nick just suggesting using SQlite for > holding indexes into the file! That's why I said it was overkill. So > whether the indexes are in a list or a database, you've _still_ got to > deal with writing to the file. >

Re: randomly write to a file

2007-05-07 Thread Steven D'Aprano
On Mon, 07 May 2007 20:00:57 -0700, Alex Martelli wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >> On Mon, 07 May 2007 14:41:02 -0700, Nick Vatamaniuc wrote: >> >> > Rohit, >> > >> > Consider using an SQLite database. It comes with Python 2.5 and >> > higher. SQLite will do a nice job k

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

2007-05-07 Thread James Stroud
Tonico wrote: > On May 4, 2:08 am, quasi <[EMAIL PROTECTED]> wrote: > >>On Fri, 04 May 2007 09:37:37 +1200, Gib Bogle >> >><[EMAIL PROTECTED]> wrote: >> >>>Ah, so the firefighters were in on the conspiracy! >> >>No, but the firefighters are very much aware that there is more to >>9/11 than has bee

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

2007-05-07 Thread James Stroud
quasi wrote: > On Mon, 7 May 2007 17:00:01 -0400, krw <[EMAIL PROTECTED]> wrote: > > >>In article <[EMAIL PROTECTED]>, >>[EMAIL PROTECTED] says... >> >>>On Mon, 7 May 2007 10:55:55 -0400, James Beck >>><[EMAIL PROTECTED]> wrote: >>> >>> In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]

ANN: Omaha Python Users Group Meeting, May 10

2007-05-07 Thread dundeemt
It's time for another get together! May 10, 2007 - 7pm Door Prize: + There will be a door prize for this meeting! Topics: + Testing in Python: Nosetest + Lightning Talks (subprocess, cheetah) Discuss possible additional monthly lunch meeting Location: Reboot Th

Re: How to make Python poll a PYTHON METHOD

2007-05-07 Thread Nick Vatamaniuc
On May 7, 10:42 pm, Nick Vatamaniuc <[EMAIL PROTECTED]> wrote: > On May 7, 10:07 pm, johnny <[EMAIL PROTECTED]> wrote: > > > Is there a way to call a function on a specified interval(seconds, > > milliseconds) every time, like polling user defined method? > > > Thanks. > > Sure, > > >>> def baz():

Re: invoke user's standard mail client

2007-05-07 Thread Gabriel Genellina
En Mon, 07 May 2007 18:00:06 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > On May 7, 10:28 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> >> Get the pywin32 package (Python for Windows extensions) from >> sourceforge, >> install it, and look into the win32comext\mapi\demos

Re: How to make Python poll a PYTHON METHOD

2007-05-07 Thread James Stroud
johnny wrote: > Is there a way to call a function on a specified interval(seconds, > milliseconds) every time, like polling user defined method? > > Thanks. > A very literal interpretation of your question yields the following very simple answer: import time while True: time.sleep(some

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

2007-05-07 Thread Alex Martelli
John Machin <[EMAIL PROTECTED]> wrote: > > [E:\Projects]c:\Python24\python.exe -c "import os; print os.path.getmtime('p64.py')" > > 1164470381 > > > > [E:\Projects]c:\Python25\python.exe -c "import os; print os.path.getmtime('p64.py')" > > 1164466781.28 > > > > This is python 2.4.4 and Python 2.5.

Re: randomly write to a file

2007-05-07 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Mon, 07 May 2007 14:41:02 -0700, Nick Vatamaniuc wrote: > > > Rohit, > > > > Consider using an SQLite database. It comes with Python 2.5 and higher. > > SQLite will do a nice job keeping track of the index. You can easily > > find the line you need

Re: how do you implement a reactor without a select?

2007-05-07 Thread Alex Martelli
Michele Simionato <[EMAIL PROTECTED]> wrote: ... > I know about sched (it was the first thing I looked at): the problem > is that sched > adopt a blocking approach and it basically requires threads, whereas I As the "sleep for time N" callable, you can pass any callable you wish; I suggested o

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

2007-05-07 Thread quasi
On Mon, 7 May 2007 17:00:01 -0400, krw <[EMAIL PROTECTED]> wrote: >In article <[EMAIL PROTECTED]>, >[EMAIL PROTECTED] says... >> On Mon, 7 May 2007 10:55:55 -0400, James Beck >> <[EMAIL PROTECTED]> wrote: >> >> >In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] >> >says... >> >> On Sat, 05 May

Re: How to make Python poll a PYTHON METHOD

2007-05-07 Thread Nick Vatamaniuc
On May 7, 10:07 pm, johnny <[EMAIL PROTECTED]> wrote: > Is there a way to call a function on a specified interval(seconds, > milliseconds) every time, like polling user defined method? > > Thanks. Sure, >>> def baz(): ...: print "Baz!" ...: >>> from threading import Timer >>> timer=Ti

Re: change of random state when pyc created??

2007-05-07 Thread Alan Isaac
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If you want to send me the modules, I will have a look at them as well. > Many eyes make for shallow bugs... Dustan and John Machin have confirmed the apparent bug, and I have sent you the files. Explanation welcome!!

How to make Python poll a PYTHON METHOD

2007-05-07 Thread johnny
Is there a way to call a function on a specified interval(seconds, milliseconds) every time, like polling user defined method? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie prob: How to write a file with 3 threads?

2007-05-07 Thread est
On May 8, 1:29 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On 7 May 2007 00:13:46 -0700, est <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: > > > > > I'll try Queue.Queue, thank you. I didn't expect that multithread > > write a file is so troublesome > > Multiple

Re: Why stay with lisp when there are python and perl?

2007-05-07 Thread Bart Willems
Xah Lee wrote: > blah blah blah blah blah lisp blah blah blah > blah blah lisp blah blah. Blah blah? Blah blah! > blah blah blah blah blah; > 1) Blah lisp. > 2) Blah blah. > 3) Blah lisp blah. > blah blah blah blah blah. Blah blah lisp! Blah lisp! > Blah lisp! Blah! Blah blah blah! Lisp bla

Re: inspected console

2007-05-07 Thread castironpi
On May 7, 7:59 pm, [EMAIL PROTECTED] wrote: > On May 7, 6:52 pm, [EMAIL PROTECTED] wrote: > > > > > Presents a console permitting inspection. Input as well as output > > saved in Python-readable form. > > Python 2.5.1 memoryconsole4.py logging to My Documents\console.log>>> class > > A: > > > ...

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

2007-05-07 Thread John Machin
On May 8, 9:15 am, Irmen de Jong <[EMAIL PROTECTED]> wrote: > Martin v. Löwis wrote: > >> Is this a bug? > > > Why don't you read the responses posted earlier? John Machin > > replied (in <[EMAIL PROTECTED]>) > > that you are mistaken: There is NO difference between the outcome > > of os.path.getmt

Re: inspected console

2007-05-07 Thread castironpi
On May 7, 6:52 pm, [EMAIL PROTECTED] wrote: > Presents a console permitting inspection. Input as well as output > saved in Python-readable form. > Python 2.5.1 memoryconsole4.py logging to My Documents\console.log>>> class A: > > ... def f( self ): > ... print 2 > ...>>> a=A() > >>

Re: randomly write to a file

2007-05-07 Thread Steven D'Aprano
On Mon, 07 May 2007 14:41:02 -0700, Nick Vatamaniuc wrote: > Rohit, > > Consider using an SQLite database. It comes with Python 2.5 and higher. > SQLite will do a nice job keeping track of the index. You can easily > find the line you need with a SQL query and your can write to it as > well. Whe

Re: randomly write to a file

2007-05-07 Thread Steven D'Aprano
On Mon, 07 May 2007 12:51:37 -0700, rohit wrote: > i can read a specified line by using the module linecache but i am > struck as to how to implement writing to the n(th) line in a file > EFFICIENTLY > which means i don't want to traverse the file sequentially to reach the > n(th) line Unless you

Re: Why are functions atomic?

2007-05-07 Thread Michael
On May 4, 7:54 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > Michael <[EMAIL PROTECTED]> wrote: > > Thus, whenever I need to pass information to a function, I use default > > arguments now. Is there any reason not to do this other than the fact > > that it is a bit more typing? > > You're giving

Re: is for reliable?

2007-05-07 Thread Terry Reedy
Yes. <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hi to all I have a question about the for statement of python. I have the | following piece of code where cachefilesSet is a set that contains the | names of 1398 html files cached on my hard disk [snip]| | this code stops at the

inspected console

2007-05-07 Thread castironpi
Presents a console permitting inspection. Input as well as output saved in Python-readable form. Python 2.5.1 memoryconsole4.py logging to My Documents\console.log >>> class A: ... def f( self ): ... print 2 ... >>> a=A() >>> import inspect >>> inspect.getsource( a.f ) '\tdef f( se

Re: No module named urllib

2007-05-07 Thread Carsten Haese
On Mon, 2007-05-07 at 16:24 -0700, HMS Surprise wrote: > Since sys.path = ['.', 'C:\\maxq\\lib\\Lib', 'C:\\maxq\\jython'] I > copied urllib to c:\maxq\lib\Lib. > > Now I get the error - > > Traceback (innermost last): > File "", line 5, in ? > File "C:\maxq\lib\Lib\urllib.py", line 1148 >

Re: SkimpyGimpy PNG canvas w/ Javascript mouse tracking

2007-05-07 Thread aaronwmail-usenet
re: http://skimpygimpy.sourceforge.net On May 7, 7:29 pm, James Stroud <[EMAIL PROTECTED]> asks: > Can you advertise "CAPTCHA" as it is trademarked by Carnegie Mellon? > > James I can easily forward them a generous portion of my earnings from this project if needed :). Actually I think the term

Re: No module named urllib

2007-05-07 Thread HMS Surprise
On May 7, 6:31 pm, Jorge Godoy <[EMAIL PROTECTED]> wrote: > HMS Surprise <[EMAIL PROTECTED]> writes: > > Since sys.path = ['.', 'C:\\maxq\\lib\\Lib', 'C:\\maxq\\jython'] I > > copied urllib to c:\maxq\lib\Lib. > > > Now I get the error - > > > Traceback (innermost last): > > File "", line 5, in ?

Re: No module named urllib

2007-05-07 Thread John Machin
On May 8, 9:06 am, HMS Surprise <[EMAIL PROTECTED]> wrote: > On May 7, 6:00 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > > On May 8, 8:06 am, HMS Surprise <[EMAIL PROTECTED]> wrote: > > > > I edited environment varialbes and have added C:\Python25\Lib to > > > PYTHONPATH but get the no module

Re: No module named urllib

2007-05-07 Thread Jorge Godoy
HMS Surprise <[EMAIL PROTECTED]> writes: > Since sys.path = ['.', 'C:\\maxq\\lib\\Lib', 'C:\\maxq\\jython'] I > copied urllib to c:\maxq\lib\Lib. > > Now I get the error - > > Traceback (innermost last): > File "", line 5, in ? > File "C:\maxq\lib\Lib\urllib.py", line 1148 > _hextochr =

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

2007-05-07 Thread John Machin
On May 8, 3:26 am, Josef Dalcolmo <[EMAIL PROTECTED]> wrote: > I tried this on Windows only: > > In Python 2.4 os.path.getmtime returned the local time, > in Python 2.5 it seems to return GMT: > > import os, time > print ctime.time(os.path.getmtime(foo)) I think you mean time.ctime :-) > > diffe

Re: SkimpyGimpy PNG canvas w/ Javascript mouse tracking

2007-05-07 Thread James Stroud
[EMAIL PROTECTED] wrote: > SkimpyGimpy is a collection of tools for generating > HTML visual, PNG image, and WAVE audio components > for use in web based applications including CAPTCHA Can you advertise "CAPTCHA" as it is trademarked by Carnegie Mellon? James -- http://mail.python.org/mailman/li

Re: No module named urllib

2007-05-07 Thread HMS Surprise
Since sys.path = ['.', 'C:\\maxq\\lib\\Lib', 'C:\\maxq\\jython'] I copied urllib to c:\maxq\lib\Lib. Now I get the error - Traceback (innermost last): File "", line 5, in ? File "C:\maxq\lib\Lib\urllib.py", line 1148 _hextochr = dict(('%02x' % i, chr(i)) for i in range(256))

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

2007-05-07 Thread Irmen de Jong
Martin v. Löwis wrote: >> Is this a bug? > > Why don't you read the responses posted earlier? John Machin > replied (in <[EMAIL PROTECTED]>) > that you are mistaken: There is NO difference between the outcome > of os.path.getmtime between Py2.5 and Py2.4. It always did return > UTC, and always wi

Re: No module named urllib

2007-05-07 Thread HMS Surprise
On May 7, 6:00 pm, John Machin <[EMAIL PROTECTED]> wrote: > On May 8, 8:06 am, HMS Surprise <[EMAIL PROTECTED]> wrote: > > > I edited environment varialbes and have added C:\Python25\Lib to > > PYTHONPATH but get the no module message when the statement > > That directory should already be in sys.p

Re: No module named urllib

2007-05-07 Thread HMS Surprise
On May 7, 5:45 pm, Jorge Godoy <[EMAIL PROTECTED]> wrote: > HMS Surprise <[EMAIL PROTECTED]> writes: > > Perhaps I should have put qoutes in my sentence. > > Or I should have read it slowly. ;-) > > > I get the "no module message named urllib". > > Can you please > > import sys > print sys.path > >

Re: No module named urllib

2007-05-07 Thread John Machin
On May 8, 8:06 am, HMS Surprise <[EMAIL PROTECTED]> wrote: > I edited environment varialbes and have added C:\Python25\Lib to > PYTHONPATH but get the no module message when the statement That directory should already be in sys.path after a normal Python install. Likewise the PYTHONPATH environmen

Re: is for reliable?

2007-05-07 Thread John Machin
On May 8, 5:46 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi to all I have a question about the for statement of python. I have the > following piece of code where cachefilesSet is a set that contains the > names of 1398 html files cached on my hard disk > > for fn in cachefilesSet: > >

Re: No module named urllib

2007-05-07 Thread Jorge Godoy
HMS Surprise <[EMAIL PROTECTED]> writes: > Perhaps I should have put qoutes in my sentence. Or I should have read it slowly. ;-) > I get the "no module message named urllib". Can you please import sys print sys.path and put the answer here on the newsgroup? -- Jorge Godoy <[EMAIL PROTE

Re: randomly write to a file

2007-05-07 Thread rohit
hi gabriel, i am utilizing file names and their paths which are written to a file on a singe line. now if i use records that would be wasting too much space as there is no limit on the no. of characters (at max) in the path. next best approach i can think of is reading the file in memory editing it

Re: No module named urllib

2007-05-07 Thread HMS Surprise
On May 7, 5:29 pm, Jorge Godoy <[EMAIL PROTECTED]> wrote: > HMS Surprise <[EMAIL PROTECTED]> writes: > > I edited environment varialbes and have added C:\Python25\Lib to > > PYTHONPATH but get the no module message when the statement > > > import urllib > > > is executed. > > > Even tried copying t

Re: randomly write to a file

2007-05-07 Thread rohit
nick, i just wanted to ask for time constrained applications like searching won't sqlite be a expensive approach. i mean searching and editing o the files is less expensive by the time taken . so i need an approach which will allow me writing randomly to a line in file without using a database On M

integrating embedded interpreter with external controls

2007-05-07 Thread joshusdog
I need some advice about how to go about architecting a solution to the following problem. I'd like to create an application that has an interactive listener/ console window in which the user can enter commands (in much the same vain as 3D Studio Max, for those who are familiar with the product).

Re: No module named urllib

2007-05-07 Thread Jorge Godoy
HMS Surprise <[EMAIL PROTECTED]> writes: > I edited environment varialbes and have added C:\Python25\Lib to > PYTHONPATH but get the no module message when the statement > > import urllib > > is executed. > > Even tried copying the urllib file to my working directory. > > Any suggestions? No mess

Re: is for reliable?

2007-05-07 Thread MRAB
On May 7, 8:46 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi to all I have a question about the for statement of python. I have the > following piece of code where cachefilesSet is a set that contains the > names of 1398 html files cached on my hard disk > > for fn in cachefilesSet: > >

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

2007-05-07 Thread Martin v. Löwis
> Is this a bug? Why don't you read the responses posted earlier? John Machin replied (in <[EMAIL PROTECTED]>) that you are mistaken: There is NO difference between the outcome of os.path.getmtime between Py2.5 and Py2.4. It always did return UTC, and always will. Regards, Martin -- http://mail

No module named urllib

2007-05-07 Thread HMS Surprise
I edited environment varialbes and have added C:\Python25\Lib to PYTHONPATH but get the no module message when the statement import urllib is executed. Even tried copying the urllib file to my working directory. Any suggestions? Thanks, jh -- http://mail.python.org/mailman/listinfo/python-l

Re: randomly write to a file

2007-05-07 Thread Nick Vatamaniuc
Rohit, Consider using an SQLite database. It comes with Python 2.5 and higher. SQLite will do a nice job keeping track of the index. You can easily find the line you need with a SQL query and your can write to it as well. When you have a file and you write to one line of the file, all of the rest

Re: msbin to ieee

2007-05-07 Thread John Machin
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 PROTECTED]> wrote: > > > > On 7 mai, 13:21, John Machin <[EMAIL PROTECTED]> wrote: > > > > > On May 7, 6:18 pm, revuesbio <[EMAIL PROTEC

Re: matplotlib: howto redraw figure automatically, without stop in show()/draw()?

2007-05-07 Thread Baptiste Carvello
WEINHANDL Herbert a écrit : > dmitrey wrote: >> Hi all, >> here is a question already mentioned below, and I'm also interested in >> that one very much. >> unfortunatly, I can't write anything to matplotlib mailing lists >> because I constantly get server internal error (500) >> Does anyone knows t

Re: assisging multiple values to a element in dictionary

2007-05-07 Thread James Stroud
[EMAIL PROTECTED] wrote: > Like i want the > key 170 to take either the name 'dataPackageID' or the name > 'LocalId'.I use this in my code,and hence if either comes it should > work . It should work to do what exactly? Cause a perturbation in the orbit of Mars, or something else entirely? James

Re: invoke user's standard mail client

2007-05-07 Thread [EMAIL PROTECTED]
On May 7, 10:28 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > Get the pywin32 package (Python for Windows extensions) from sourceforge, > install it, and look into the win32comext\mapi\demos directory. Thanks for the hint, Gabriel. Wow, that's heavily spiced code! When I invoke mapisend.p

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

2007-05-07 Thread krw
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > On Mon, 7 May 2007 10:55:55 -0400, James Beck > <[EMAIL PROTECTED]> wrote: > > >In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > >says... > >> On Sat, 05 May 2007 07:54:50 +0100, Eeyore > >> <[EMAIL PROTECTED]> wrote: > >> > >> > >

Re: Simulating simple electric circuits

2007-05-07 Thread Stef Mientki
hi Bjoern, Bjoern Schliessmann wrote: > Hello all, > > I'm trying to simulate simple electric logic (asynchronous) > circuits. By "simple" I mean that I only want to know if I > have "current" or "no current" (it's quite digital) and the only > elements need to be (with some level of abstraction

Re: randomly write to a file

2007-05-07 Thread Gabriel Genellina
En Mon, 07 May 2007 16:51:37 -0300, rohit <[EMAIL PROTECTED]> escribió: > i am developing a desktop search.For the index of the files i have > developed an algorithm with which > i should be able to read and write to a line if i know its line > number. > i can read a specified line by using the

Re: randomly write to a file

2007-05-07 Thread kyosohma
On May 7, 2:51 pm, rohit <[EMAIL PROTECTED]> wrote: > hi, > i am developing a desktop search.For the index of the files i have > developed an algorithm with which > i should be able to read and write to a line if i know its line > number. > i can read a specified line by using the module linecache

Re: long lists

2007-05-07 Thread Gabriel Genellina
En Mon, 07 May 2007 09:14:34 -0300, Merrigan <[EMAIL PROTECTED]> escribió: > The Script it available at this url : > http://www.lewendewoord.co.za/theScript.py I understand this as a learning exercise, since there are lot of utilities for remote syncing. Some comments: - use os.path.join t

Re: Latest errors on pickled objects and blob datatypes in mysql

2007-05-07 Thread Gabriel Genellina
En Mon, 07 May 2007 14:08:21 -0300, krishnakant Mane <[EMAIL PROTECTED]> escribió: > my table is called testobj and the blob field is called obj. > now following is my query with the cursor named CSRInsert. > CSRInsert.execute("insert into testobj (obj) values > (?);",(pickled_object)) > the e

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

2007-05-07 Thread quasi
On Mon, 7 May 2007 10:55:55 -0400, James Beck <[EMAIL PROTECTED]> wrote: >In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] >says... >> On Sat, 05 May 2007 07:54:50 +0100, Eeyore >> <[EMAIL PROTECTED]> wrote: >> >> > >> > >> >quasi wrote: >> > >> >> Gib Bogle wrote: >> >> >> >> >Ah, so the firef

Re: is for reliable?

2007-05-07 Thread Jerry Hill
On 5/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > for fn in cachefilesSet: ... > this code stops at the 473th file instead of reaching 1398 This is often caused by mutating the object you are iterating over inside the for loop. I didn't see anything in the code you posted that would do th

Re: is for reliable?

2007-05-07 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Hi to all I have a question about the for statement of python. I have the > following piece of code where cachefilesSet is a set that contains the > names of 1398 html files cached on my hard disk > > [snipped code] > > this code stops at the 47

Re: Simulating simple electric circuits

2007-05-07 Thread Terry Reedy
"Bjoern Schliessmann" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hello all, | I'm trying to simulate simple electric logic (asynchronous)circuits. [snip] Some network simulators use connection objects in addition to node objects, with connections joined to nodes but not the sa

randomly write to a file

2007-05-07 Thread rohit
hi, i am developing a desktop search.For the index of the files i have developed an algorithm with which i should be able to read and write to a line if i know its line number. i can read a specified line by using the module linecache but i am struck as to how to implement writing to the n(th) lin

Re: Simulating simple electric circuits

2007-05-07 Thread Bjoern Schliessmann
Arnaud Delobelle wrote: > On May 7, 7:05 pm, Bjoern Schliessmann > There is a master "current controller" object which tells >> the "source" object to start a "current" by calling its >> neighbour. The calls traverse the network until they reach a >> "ground" object. Specifically, the source passes

is for reliable?

2007-05-07 Thread [EMAIL PROTECTED]
Hi to all I have a question about the for statement of python. I have the following piece of code where cachefilesSet is a set that contains the names of 1398 html files cached on my hard disk for fn in cachefilesSet: fObj = codecs.open( baseDir + fn + '-header.html', 'r', 'iso-8859-1' )

Re: SOAPpy parameters in sequence

2007-05-07 Thread D Unit
I figured it out. The SOAPPRoxy class has an attribute 'SOAPPRoxy.config.argsOrdering' You can set it to a dict. Each key is the name of a method, and the value is a list with the attributes in the correct order. -Dave D Unit wrote: > > Hi, > > I am trying to send a message to a SOAP implemen

Re: Simulating simple electric circuits

2007-05-07 Thread Arnaud Delobelle
On May 7, 7:05 pm, Bjoern Schliessmann wrote: > Hello all, > > I'm trying to simulate simple electric logic (asynchronous) > circuits. By "simple" I mean that I only want to know if I > have "current" or "no current" (it's quite digital) and the only > elements need to be (with some level of abstr

SOAPpy parameters in sequence

2007-05-07 Thread D Unit
Hi, I am trying to send a message to a SOAP implementation where the parameters must in sequence. I am creating a SOAPProxy and then sending the message with: proxy.methodName(paramName=value, paramName2=value2) Is there a way to explicitly set the order of parameters? If not, is there a way to

Simulating simple electric circuits

2007-05-07 Thread Bjoern Schliessmann
Hello all, I'm trying to simulate simple electric logic (asynchronous) circuits. By "simple" I mean that I only want to know if I have "current" or "no current" (it's quite digital) and the only elements need to be (with some level of abstraction to my specific problem) - sources (here begin curr

Re: Latest errors on pickled objects and blob datatypes in mysql

2007-05-07 Thread Daniele Varrazzo
On 7 Mag, 19:08, "krishnakant Mane" <[EMAIL PROTECTED]> wrote: > hello, > finally the errors for my sql query have changed so I have even > changed the thread subject because I feel now that this is not doable > in mysql and this seams to be a bug, ither in python or the MySQLdb > module or perhaps

Re: Unittest Automation

2007-05-07 Thread bourbaki
On May 7, 7:29 am, "Calvin Spealman" <[EMAIL PROTECTED]> wrote: > I'm trying to find a better way, a shell one-liner, that I can use to > recurse through my project, find all my test_ modules, aggregate the > TestCase classes into a suite, and run all my tests. Basically, what > py.test does out of

Re: Latest errors on pickled objects and blob datatypes in mysql

2007-05-07 Thread Daniele Varrazzo
On 7 Mag, 19:08, "krishnakant Mane" <[EMAIL PROTECTED]> wrote: > hello, > finally the errors for my sql query have changed so I have even > changed the thread subject because I feel now that this is not doable > in mysql and this seams to be a bug, ither in python or the MySQLdb > module or perhaps

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

2007-05-07 Thread Leisure . 208
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 this second book called E.T. and the BOOK OF THE GREEN PLANET...

Re: how do you implement a reactor without a select?

2007-05-07 Thread [EMAIL PROTECTED]
Michele Simionato wrote: > Notice that I copied the Twisted terminology, but > I did not look at Twisted implementation because I did not want to > use a select (I assume that the GUI mainloops do not use it either). > The trick I use is to store the actions to perform (which are > callables identi

getmtime differs between Py2.5 and Py2.4

2007-05-07 Thread Josef Dalcolmo
I tried this on Windows only: In Python 2.4 os.path.getmtime returned the local time, in Python 2.5 it seems to return GMT: import os, time print ctime.time(os.path.getmtime(foo)) differs on Python 2.4 and Python 2.5 by the timezone. Now, the implementation of the two stat calls differs on Win

Latest errors on pickled objects and blob datatypes in mysql

2007-05-07 Thread krishnakant Mane
hello, finally the errors for my sql query have changed so I have even changed the thread subject because I feel now that this is not doable in mysql and this seams to be a bug, ither in python or the MySQLdb module or perhaps both. my table is called testobj and the blob field is called obj. now f

  1   2   >