Piattaforma: Ubuntu 16.04 Versione Python: 3.5.2 Posizione modulo: /home/Python-3.5.2 Nome file: m.py (modulo: m) Contenuto: print(__name__) Comando: $ python -m m Output: __main__ (nessun .pyc creato)
Invece: Comando: $ python -m m.py Output: __main__ (generato bytecode) Lo stesso per quanto riguarda l'opzione -O (generazione bytecode ottimizzato) Inviato da iPhone > Il giorno 08 set 2016, alle ore 17:34, Carlo Miron <mi...@python.it> ha > scritto: > > 2016-09-08 17:25 GMT+02:00 Emanuele Urselli <urselliemanu...@icloud.com>: > >> Eh, è ciò che anche io ho letto sul libro. >> Solo che se passo il modulo mi dà un output il risultato dello script senza >> generare bytecode. >> Se invece passo il file (con suffisso .py quindi) mi genera il file .pyc. >> >> Python 3.5.2 su Ubunt 16.04 > > Che comando dai, esattamente? > Che output ottieni? > E che modulo utilizzi, e dove si trova? > > ㎝ > > -- > |:**THE BEER-WARE LICENSE** *(Revision 42)*: > | <mi...@python.it> wrote this mail. As long as you retain > | this notice you can do whatever you want with this stuff. > | If we meet some day, and you think this stuff is worth it, > | you can buy me a beer in return. > | --Carlo Miron : > _______________________________________________ > 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