4
--
http://mail.python.org/mailman/listinfo/python-list
var2
As far as I understand there's no $1, $2... etc stuff right ?
Sorry for a silly question.
greetz,
T
--
"Przyjacielu, lepiej nas dobrze wypieprz zamiast prawić nam kazania.
Nawrócić nas nie zdołasz..." Marquis Donatien Alphonse François de Sade
--
http://mail.python.org/mailman/listinfo/python-list
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello!
it's Ok. Python gets from 1/2 0 as 0 is the integer part of that
division. So, Python is interpreting -1**0 so you get 1 as answer.
you should try this (-1)**(1.0/2.0) so 1.0/2.0 is an operation returning
0.5 completely.
and you
>
> 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
--
http://mail.python.
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
>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
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 -
sim
rs on input like this:
>
> $ echo "something" | ./my_script.py
>
> or:
>
> $ ./my_scripy.py var1 var2
>
>
> As far as I understand there's no $1, $2... etc stuff right ?
>
Others answered about commandline args... You can also read
from stdin to get the piped inpu
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
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
1, 2, 3, 5, 7... PRIME Numbers
[ Mathematics / Physics / Engineering ]
Definitions
What is a PRIME Number ?
A PRIME number is a number whose only positive divisors are one and
itself.
What is a MAGIC SQUARE?
A magic square is an arrangement of numbers in a
11 matches
Mail list logo