Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I compile multiple py files as one?

I am new to Python and am totally lost as to where to even start to get this done.

I have written many small modules (a toolset for maya) that need to be compiled into on single .pyc file. Is there a module that just does this? Or can you tell me where to go to start? A tutorial? I don't even know what terms to look for.

like image 877
user12294 Avatar asked Jul 10 '13 16:07

user12294


1 Answers

You don't even need to make an egg, you can just zip up your files and put the zip file onto your python path. Maya's version of python includes the zipimport module by default so it 'just works' as long as maya can find your zip file.

Here are some discussions of the whole topic of tools distribution you might find useful:

http://tech-artists.org/forum/showthread.php?3271-Distribution-techniques-for-external-Python-tools&highlight=distribute

http://tech-artists.org/forum/showthread.php?3987-Maya-GitHub-and-Script-Paths-for-Mel-and-Python-How-Would-You-Do-It&highlight=distribute

http://tech-artists.org/forum/showthread.php?3752-Best-Way-to-Share-Your-Scripts&highlight=distribution

like image 177
theodox Avatar answered Oct 11 '22 14:10

theodox