Re: [Tutor] Division doesn't work

2007-01-18 Thread Zara
On Thu, 18 Jan 2007 13:09:48 +0100, Geoframer <[EMAIL PROTECTED]>
wrote:

>You assign s as an integer... it should be a float to get the right
>result...
<...>


Yes, that is the wordt defect of Python: its inability to read
programmer mind and detect the rteal programmer intentions.


Zara

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


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
>>>> process=r"C:\Program Files\WinRAR\Rar.exe"

You may try
... process=r'"C:\Program Files\WinRAR\Rar.exe"'
(It is your original string, surrounde by simple quotes)

>>>> startDir = r"C:\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
>as an internal or external command, operable program or batch file."
>Notice that it says "C:\Program" thats the incorrect path, the path is
>supposed to be "C:\Program Files\..."
<...>

I have not tried the soultion myself, but it is the same that must be
applied in other similar situation .

best regards,

zara

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor