我打包一个包,我发现只要删除__init__ 无论是否存在license,都可以正常使用库中的函数,如何解决呢? #2311
Unanswered
UniqueMrsu
asked this question in
Q&A
Replies: 4 comments 1 reply
-
|
执行代码为 上面打错了 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
请参阅文档了解正确用法 |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
破案了,我之前为了测试代码在本机安装了未加密的库,删除__init__之后自动导入了已安装的库 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
谢谢 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
我使用下列命令加密我的包
pyarmor gen --output ./bcc --outer -i --enable-bcc src/myPKG然后我删除__init__
创建一个test.py, 执行以下代码
from myPKG.myModule get_Name发现函数 get_Name 可以正常使用,但是此时我还没有生成license
我尝试添加 --private命令,这个时候又不能通过
from myPKG.myModule get_Name使用get_Name我的目标:
如果license存在的时候,可以任意导入包中的所有代码
如果license不存在,即使用户删除__init__, 也不能正常调用包内的任何代码
请问我应该如何实现呢
Beta Was this translation helpful? Give feedback.
All reactions