Grazie mile ad entrambi!

stefano664

2010/3/22 Lorenzo Macchiavelli <lmacchiave...@gmail.com>

> Ciao, Prova Con:
>
> import os
>     if os.name == "posix":
>         # Unix/Linux/MacOS/BSD/etc
>         os.system('clear')
>     elif os.name in ("nt", "dos", "ce"):
>         # DOS/Windows
>         os.system('CLS')
>     else:
>         # Fallback for other operating systems.
>         print '\n' * numlines
>
>
> Lorenzo Macchiavelli
>
>
> Il giorno 22 marzo 2010 12.29, Sandro Tosi <matrixh...@gmail.com> ha
> scritto:
>
> 2010/3/22 stefano664 <stefano...@gmail.com>:
>> > "Come faccio una
>> > routine per capire da che sistema operativo sto interpretando il
>> codice?".
>>
>> $ ipython
>>
>> In [1]: import platform
>>
>> In [2]: platform.system()
>> Out[2]: 'Linux'
>>
>> spero che su win ritorni "Windows" (non ho macchine dove provare).
>>
>> Ciao,
>> --
>> Sandro Tosi (aka morph, morpheus, matrixhasu)
>> My website: http://matrixhasu.altervista.org/
>> Me at Debian: http://wiki.debian.org/SandroTosi
>> _______________________________________________
>> Python mailing list
>> Python@lists.python.it
>> http://lists.python.it/mailman/listinfo/python
>>
>
>
> _______________________________________________
> Python mailing list
> Python@lists.python.it
> http://lists.python.it/mailman/listinfo/python
>
>
_______________________________________________
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python

Rispondere a