Eric, In your Python distribution there is a script called compileall.py. It is in the main Lib directory. This script is described as:
Module/script to "compile" all .py files to .pyc (or .pyo) file. When called as a script with arguments, this compiles the directories given as arguments recursively; the -l option prevents it from recursing into directories. Without arguments, if compiles all modules on sys.path, without recursing into subdirectories. (Even though it should do so for packages -- for now, you'll have to deal with packages separately.) See module py_compile for details of the actual byte-compilation. Daryl McDaniel "It is the mark of an educated mind to be able to entertain a thought without accepting it." - Aristotle From: Tran, Eric [mailto:[email protected]] Sent: Friday, July 11, 2014 8:43 AM To: [email protected] Subject: [edk2] Python modules in UEFI Shell Hi, I'm new to Python/UEFI and I'm currently trying to use python in the UEFI shell. I've placed all the packages/modules into the python.27 folder and when I enter Python for the first time by typing "Python", it seems to only compile the minimum set of modules (os, site, stat, etc.). The log is below. Is this normal behavior? Is it recommended to compile all the modules? b/c it takes quite a long time. How do I compile all the modules located in the python.27 folder? FSOpen: Open '\Efi\StdLib\lib' Success FSOpen: Open '\Efi\StdLib\lib\python.27' Success FSOpen: Open '\Efi\StdLib\lib\python.27' Success FSOpen: Open '\Efi\StdLib\lib\python.27\site.py' Success FSOpen: Created new directory entry 'site.pyc' FSOpen: Open '\Efi\StdLib\lib\python.27\site.pyc' Success FSOpen: Open '\Efi\StdLib\lib\python.27\os.py' Success FSOpen: Created new directory entry 'os.pyc' FSOpen: Open '\Efi\StdLib\lib\python.27\os.pyc' Success FSOpen: Open '\Efi\StdLib\lib\python.27\ntpath.py' Success FSOpen: Created new directory entry 'ntpath.pyc' FSOpen: Open '\Efi\StdLib\lib\python.27\ntpath.pyc' Success FSOpen: Open '\Efi\StdLib\lib\python.27\stat.py' Success FSOpen: Created new directory entry 'stat.pyc' FSOpen: Open '\Efi\StdLib\lib\python.27\stat.pyc' Success FSOpen: Open '\Efi\StdLib\lib\python.27\genericpath.py' Success FSOpen: Created new directory entry 'genericpath.pyc' FSOpen: Open '\Efi\StdLib\lib\python.27\genericpath.pyc' Success FSOpen: Open '\Efi\StdLib\lib\python.27\warnings.py' Success FSOpen: Created new directory entry 'warnings.pyc' FSOpen: Open '\Efi\StdLib\lib\python.27\warnings.pyc' Success FSOpen: Open '\Efi\StdLib\lib\python.27\linecache.py' Success FSOpen: Created new directory entry 'linecache.pyc' FSOpen: Open '\Efi\StdLib\lib\python.27\linecache.pyc' Success FSOpen: Open '\Efi\StdLib\lib\python.27\types.py' Success FSOpen: Created new directory entry 'types.pyc' FSOpen: Open '\Efi\StdLib\lib\python.27\types.pyc' Success Thanks, Eric
------------------------------------------------------------------------------
_______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
