Converting .py files to batch files.

r0g aioe.org at technicalbloke.com
Wed Sep 17 12:46:33 EDT 2008


Michael Palmer wrote:
> On Sep 15, 3:04 pm, Matias Surdi <matiassu... at gmail.com> wrote:
>> aditya shukla escribió:
>>
>>> How can we convert .py files to batch files? is there any library for this?
>>> Aditya
>>> ------------------------------------------------------------------------
<snip>> On Linux, you would instead insert the shebang line that points to
> your python interpreter, such as
> 
> #!/usr/bin/python
> 
> at the top and also set the executable bit, but I suppose if you use
> Linux at all you know that.

Doh! I'm new to Linux and so I didn't know that, thanks!
One small snag though, it doesn't work on my system :-(
I did both steps, the shebang and the execute bit but nada...

r0g at steppa:~/Desktop/py$ ls
kickstart.py  kickstart.py~  kicktest.py  kicktest.py~
r0g at steppa:~/Desktop/py$ kickstart.py
bash: kickstart.py: command not found

Any ideas why this might be? A path thing? I'm on Ubuntu 8.04 / Py2.5

Thanks,

Roger.



More information about the Python-list mailing list