On Sunday 26 February 2006 22:44, [EMAIL PROTECTED] wrote:
> I am new to python, can you please tell me how can I convert my python
> script into an executable on linux?
> i.e. instead of typing 'python myscript.py abc', I just need to do
> 'myscript.py abc'?

Use the shebang syntax. Use this as a first line in your script:

#!/usr/bin/python

Some people rather prefer an "env" approach.

Remember to make your script executable (chmod +x scriptname).

> and how can I get the input argument from my script , in my example,
> how can I read 'abc'?

import sys
print sys.argv[1]

Kindly
 Christoph
-- 
~
~
".signature" [Modified] 1 line --100%--                1,48         All
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to