简体   繁体   English

如何隐藏C ++应用程序中嵌入的python代码?

[英]How can I hide the python code embedded in c++ app?

I currently have a c++ application that calls a python code file. 我目前有一个调用python代码文件的c ++应用程序。 I would like to know if there is a way to hide this file or put some kind of password to open it and that you can continue call from the c++ code. 我想知道是否可以隐藏此文件或使用某种密码打开它,并且可以继续从c ++代码调用。

EDIT: I need call python because i use keras library. 编辑:我需要调用python,因为我使用keras库。 That is the reason that i don´t port the code I import python code with PyImport_ImportModule and PyObject 这就是我不移植使用PyImport_ImportModule和PyObject导入python代码的代码的原因

Thanks in advance. 提前致谢。

The question is from whom you like to hide the content of the python file. 问题是您想向谁隐藏python文件的内容。

If you like to ship the application to some customer, you may compile the python file to a binary . 如果您希望将应用程序交付给某些客户,则可以将python文件编译为二进制文件

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

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