Re: simple question: $1, $2 in py ?

2005-09-06 Thread Christos Georgiou
On Mon, 05 Sep 2005 12:54:35 +0200, rumours say that Diez B. Roggisch [EMAIL PROTECTED] might have written: As far as I understand there's no $1, $2... etc stuff right ? Yes - but there is sys.argv Try this import this print sys.argv I believe this last line should be: print

Re: simple question: $1, $2 in py ?

2005-09-05 Thread Lee Harr
On 2005-09-05, es_uomikim [EMAIL PROTECTED] wrote: Hi, I have one small simple question, that I didn't found answer in google's. It's kind of begginers question because I'm a one. ; ) I wanned to ask how to use scripts with vars on input like this: $ echo something | ./my_script.py or:

Re: simple question: $1, $2 in py ?

2005-09-05 Thread Jeff Pitman
es_uomikim wrote: $ echo something | ./my_script.py echo test | python -c import sys; print sys.stdin.readlines() -- http://mail.python.org/mailman/listinfo/python-list

simple question: $1, $2 in py ?

2005-09-05 Thread es_uomikim
Hi, I have one small simple question, that I didn't found answer in google's. It's kind of begginers question because I'm a one. ; ) I wanned to ask how to use scripts with vars on input like this: $ echo something | ./my_script.py or: $ ./my_scripy.py var1 var2 As far as I understand

Re: simple question: $1, $2 in py ?

2005-09-05 Thread Diez B. Roggisch
As far as I understand there's no $1, $2... etc stuff right ? Yes - but there is sys.argv Try this import this print sys.argv and invoke it as script with args. Make also sure to checkout modules optparse and getopt to deal with the options. Diez --

Re: simple question: $1, $2 in py ?

2005-09-05 Thread es_uomikim
Diez B. Roggisch wrote: As far as I understand there's no $1, $2... etc stuff right ? Yes - but there is sys.argv Oh, yes. Right : ) It feels that I miss-looked it. thank You very much for an advice : ) greetz, T -- Przyjacielu, lepiej nas dobrze wypieprz zamiast prawić nam kazania.

Re: simple question: $1, $2 in py ?

2005-09-05 Thread Laszlo Zsolt Nagy
Oh, yes. Right : ) It feels that I miss-looked it. thank You very much for an advice : ) Also try the OptParse module. http://www.python.org/doc/2.4/lib/module-optparse.html It handles the GNU/POSIX syntax very well. Les -- http://mail.python.org/mailman/listinfo/python-list

Re: simple question: $1, $2 in py ?

2005-09-05 Thread es_uomikim
Laszlo Zsolt Nagy wrote: Also try the OptParse module. http://www.python.org/doc/2.4/lib/module-optparse.html It handles the GNU/POSIX syntax very well. Les Oh thanx, that could be really helpfull : ) btw there was a great artist/photographer named: Laszlo Moholy-Nagy - simillar