简体   繁体   English

将复杂模块导入Processing.py

[英]Importing Complex Modules into Processing.py

I'm currently using PyGame to build games on python, however exporting becomes rather difficult as Py2Exe and Py2App are almost the only ways to do so and are not very effective. 我目前正在使用PyGame在python上构建游戏,但是导出变得相当困难,因为Py2Exe和Py2App几乎是这样做的唯一方法,并且效果不佳。 I tried to using the wonderful exporting mechanic in Processing (in Python mode), but this opened a Pandora's box of problems. 我试图在Processing(在Python模式下)中使用出色的导出机制,但这打开了Pandora的难题之门。

  1. How do you import modules in Processing.py ? 如何在Processing.py中导入模块? I read that if the module is in the form of a PY file it is simply to be located in the same folder as the sketch. 我读到,如果模块采用PY文件的形式,则只需将其与草图放置在同一文件夹中即可。 But some modules, like PyGame, are more complex and require an installer or a wheel (WHL file, which is installed through PIP). 但是某些模块(例如PyGame)更加复杂,需要安装程序或安装轮(WHL文件,该文件通过PIP安装)。

  2. During some testing, I tried to export a simple one-line program ( print('a') ) but the 'application.windows64' folder was missing an EXE file. 在进行一些测试期间,我试图导出一个简单的单行程序(print('a')),但是'application.windows64'文件夹缺少EXE文件。 I'm not an expert, but I think that might be a problem :) 我不是专家,但我认为这可能是个问题:)

Thanks in advance! 提前致谢!

processing.py与CPython(本地python)或任何c语言模块都不兼容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM