THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/06/2012 at 01:53, xxxxxxxx wrote:
I'm aware you can use the source protector to protect a single .pyp file.
but what if the .pyp references other .py files, how do I compile all these files together?
I've used python -m compileall, but when I import the files into the plugin folder and launch cinema I get
ImportError: Bad magic number in /Applications/MAXON/CINEMA 4D R13/plugins/Plugin/package/__init__.pyc
seems like the compiled pyc files aren't working
On 28/06/2012 at 02:29, xxxxxxxx wrote:
I've been trying to use the python executable in resource/modules/python/res/Python.osx.framework/
as i knew the version of python I had installed was 2.7, and I'm aware that cinema supports 2.6
cinema still didn't like my .pyc files
so looked at how i could target python2.6 instead and came across http://www.activestate.com/activepython/
install that and you can type python2.6 into the terminal. then i just did
the files compiled and cinema read them properly with no errors!
hope that helps someone
On 28/06/2012 at 06:50, xxxxxxxx wrote:
Thanks for sharing your solution.
On 07/07/2012 at 11:45, xxxxxxxx wrote:
I tried this an I get a:
"Can't list" error, followed by the provided path.
I assume I need to provide the folder path where my .py files are and that the path needs to be provided between the '', right?
On 08/07/2012 at 01:09, xxxxxxxx wrote:
You need to specify the complete path to the folder. Py4D's cwd is root and the OS assumes that your relative path can be made absolute by joining the CWD and your path, but I don't think your plugin is in
, is it?
You get "ba magic number error" because the version of your installed Python interpreter is not 2.6. Either install CPython 2.6 and run -m compileall, or switch to the CPython version that is delivered with every Cinema 4D distribution.