Re: [Tutor] Why is this not working? Seems like a whitespace issue

2007-02-05 Thread Necmettin Begiter
05 Şub 2007 Pts 04:58 tarihinde, Gizmo şunları yazmıştı: Hello I have a whole directory tree of RAR files that I wish to extract as a batch job. In my real script I've used os.walk() and os.spawn*() but for demonstration purposes have a look at the code below import os

Re: [Tutor] Can I pause, stop or reset python virtual machine

2007-02-05 Thread Necmettin Begiter
05 Şub 2007 Pts 04:56 tarihinde, Wong Vincent şunları yazmıştı: Dear tutors, Hi. Does python provide any API to pause, stop or reset the virtual machine? Am currently building an application which will run a script file using os.popen(). In order to allow user to run, stop and pause the

Re: [Tutor] Can I pause, stop or reset python virtual machine

2007-02-05 Thread Alan Gauld
Wong Vincent [EMAIL PROTECTED] wrote Hi. Does python provide any API to pause, stop or reset the virtual machine? Can you explain a little bit more about what you mean? Are those 3 separate things? If so whjat is the difference between stop and pause? Does reset mean restart the running

Re: [Tutor] Why is this not working? Seems like a whitespace issue

2007-02-05 Thread Alan Gauld
Gizmo [EMAIL PROTECTED] wrote import os process=rC:\Program Files\WinRAR\Rar.exe startDir = rC:\to burn os.system(process+ x +C:\\to burn\\somemovie\\mymovie.rar+ +startDir) This doesnt work for me.. I get the error 'C:\Program' is not recognized whenever you have whitespaces in

Re: [Tutor] Why is this not working? Seems like a whitespace issue

2007-02-05 Thread Zara
On Sun, 4 Feb 2007 18:58:25 -0800, Gizmo [EMAIL PROTECTED] wrote: Hello I have a whole directory tree of RAR files that I wish to extract as a batch job. In my real script I've used os.walk() and os.spawn*() but for demonstration purposes have a look at the code below import os

Re: [Tutor] curious struct problem

2007-02-05 Thread Marcus Goldfish
On 2/2/07, Danny Yoo [EMAIL PROTECTED] wrote: I'm trying to read a binary file using struct. This code works interactively in the IPython shell, but not as a function invoked from a command line (Windows). Can someone point out my error? Thanks! Hi Marcus, There is something very

Re: [Tutor] curious struct problem

2007-02-05 Thread Marcus Goldfish
On 2/2/07, Danny Yoo [EMAIL PROTECTED] wrote: There is something very suspicious in the code. You don't happen to have any global variables in your program, do you? I think I found the problem: the last chunk read is incomplete, so there is size(chunk) is not sufficient to unpack according

[Tutor] Coding for AP configuration

2007-02-05 Thread govind goyal
Hello, I am a beginner in python.I am working as S/W tester relating to WI-FI testing where we've to manually configure Access points(AP). I want to write a Automated Scripts to configure my AP through HTTP. Can any body suggest basic coding for this? Thanks. Best Regards, Govind Goyal

Re: [Tutor] Coding for AP configuration

2007-02-05 Thread Christopher Arndt
govind goyal schrieb: I want to write a Automated Scripts to configure my AP through HTTP. Can any body suggest basic coding for this? Search the cheeseshop [1] for mechanoid and mechanize. Chris [1] http://cheeseshop.python.org/pypi/ ___ Tutor

Re: [Tutor] curious struct problem

2007-02-05 Thread Daniel Yoo
On Mon, 5 Feb 2007, Marcus Goldfish wrote: I think I found the problem: the last chunk read is incomplete, so there is size(chunk) is not sufficient to unpack according to the format string. Good! I'm glad you found the problem. ___ Tutor

Re: [Tutor] Coding for AP configuration

2007-02-05 Thread Kent Johnson
govind goyal wrote: Hello, I am a beginner in python.I am working as S/W tester relating to WI-FI testing where we've to manually configure Access points(AP). I want to write a Automated Scripts to configure my AP through HTTP. Can any body suggest basic coding for this? You can use

[Tutor] timedelta doesnt do month

2007-02-05 Thread frank h.
so what is the easiest way to to get to a list of months in a given timeinterval, e.g. startdate = datetime.date(2005,2,13) enddate = datetime.date(2007,1,25) delta = enddate - startdate delta.days 711 delta.months exceptions.AttributeErrorTraceback (most recent

Re: [Tutor] curious struct problem

2007-02-05 Thread Alan Gauld
Marcus Goldfish [EMAIL PROTECTED] wrote I just want to troubleshoot the problem. The error is reproduced as a comment below the source. As far as I know, there are no globals; I am invoking this from a command line prompt: python demux.py foo.bin 1 1 def demux(fname, ch=1, nchan=1):

Re: [Tutor] Coding for AP configuration

2007-02-05 Thread Alan Gauld
govind goyal [EMAIL PROTECTED] wrote I am a beginner in python.I am working as S/W tester relating to WI-FI Welcome. testing where we've to manually configure Access points(AP). I want to write a Automated Scripts to configure my AP through HTTP. Can any body suggest basic coding for

Re: [Tutor] timedelta doesnt do month

2007-02-05 Thread frank h.
thanks kent for your fast and comprehensive answer! On 2/5/07, Kent Johnson [EMAIL PROTECTED] wrote: frank h. wrote: so what is the easiest way to to get to a list of months in a given timeinterval, e.g. startdate = datetime.date(2005,2,13) enddate = datetime.date(2007,1,25) delta

[Tutor] best book?

2007-02-05 Thread Andrew Purdea
Hi! what do you guys think that would be the best free book, or tutorial or something to start learning python? Something that can also focus on important differences from other languages, and present why some choices made in the design are better then others. Not just present the information,

[Tutor] MapReduce

2007-02-05 Thread Steve Nelson
Hello, I have to give a presentation this week on how the MapReduce (of Google and Hadoop fame) algorithm works. I understand how map() works, and how reduce() works, and having read the google papers, I have an idea of their implementation (which I must say takes certain liberties with

Re: [Tutor] MapReduce

2007-02-05 Thread Steve Nelson
On 2/5/07, Steve Nelson [EMAIL PROTECTED] wrote: What I want to do is now group these urls so that repeated urls have as their partner a lsit of indexes. To take a test example of the method I have in mind: def testGrouper(self): Group occurences of a record together test_list =

[Tutor] Trying to get a feel

2007-02-05 Thread Chris Hengge
I've asked this on the Turbogears list, but I thought I'd ask here since there is a larger active user base from what I can tell. Basically I'm trying to get an idea of how practical streaming data with something like turbogears would be for going from the client (web site user) to the server. I

Re: [Tutor] MapReduce

2007-02-05 Thread Kent Johnson
Steve Nelson wrote: On 2/5/07, Steve Nelson [EMAIL PROTECTED] wrote: What I want to do is now group these urls so that repeated urls have as their partner a lsit of indexes. To take a test example of the method I have in mind: def testGrouper(self): Group occurences of a record

[Tutor] Using __import__ and byte-compiling

2007-02-05 Thread Tim Johnson
I am currently using the __import__ function to do conditional importing of modules, whose names are determined at runtime. It appears the __import__ does not handle byte-compiling, or at least it is not being done in my current implementation. From reading the __import__ documentation, I don't

Re: [Tutor] Using __import__ and byte-compiling

2007-02-05 Thread Tim Johnson
I should add one thing: If the source module is in the same directory, it *is* byte-compiled. thanks tim On Tuesday 06 February 2007 03:46 pm, Tim Johnson wrote: I am currently using the __import__ function to do conditional importing of modules, whose names are determined at runtime. It

Re: [Tutor] best book?

2007-02-05 Thread Kent Johnson
Andrew Purdea wrote: Hi! what do you guys think that would be the best free book, or tutorial or something to start learning python? Something that can also focus on important differences from other languages, and present why some choices made in the design are better then others. Not just

Re: [Tutor] How to make ftplib show progress while uploading a large file

2007-02-05 Thread Terry Carroll
On Sun, 4 Feb 2007, [ISO-8859-1] Magnus Wirstr?m wrote: I'm workinga on a program that will upload a large file to a server using ftp. I'm using ftplib to do this. I'm using a gui with wxpython and i would like to have a progressbar showing in % how much have been transfered. I have been