Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named opy.__main__; 'opy' is a package and cannot be directly executed #33

Open
RemiZOffAlex opened this issue Jan 15, 2019 · 3 comments

Comments

@RemiZOffAlex
Copy link

$ python3.7 -m opy -h
Opy (TM) Configurable Multi Module Python Obfuscator Version 1.1.29
Copyright (C) Geatec Engineering. License: Apache 2.0 at  http://www.apache.org/licenses/LICENSE-2.0

/usr/bin/python3.7: No module named opy.__main__; 'opy' is a package and cannot be directly executed
@BuvinJT
Copy link

BuvinJT commented Jan 17, 2019

Sorry for the delay.

This fork was created first and foremost to make Opy into a library, rather than a standalone utility. Retro testing has not been performed regarding the way the you are attempting to this use it. Thank you for pointing out this bug! I will try to patch it in the immediate future.

In the meantime, please pull directly from my development fork at: https://github.com/BuvinJT/Opy. Also, please read those instructions regarding use of Opy as a library (which definitely functions!). Alternatively, you can also install it in the "release form" via pip opy-distbuilder.

@chtseac
Copy link

chtseac commented May 15, 2019

Hi, what is this a fork of? I would like to use it as a utility and I fail to find anything on Google or here. Importing opy and running opy.main() seems to bring back the original interface, but it seems to have been modified enough that it is not operational.

@BuvinJT
Copy link

BuvinJT commented May 15, 2019

Hi @chtseac. Opy-Distbuilder is a library rather than a standalone utility. (Well, it's supposed to support both methods of use, but I might have broken the old way - I have to test that again...) Anyway, you need to install it using pip then, from opy import obfuscate, OpyConfig. Call obfuscate, passing a few arguments including one of those OpyConfig objects. You could also import analyze, depending upon your use... As with any library, the public interface is defined in the init.py script: https://github.com/BuvinJT/Opy/blob/master/opy/__init__.py

Please read the README that is displayed on https://github.com/BuvinJT/Opy. The covers the installation process and basic use.

Btw, the settings object (how one provides all the configuration details) is defined in: https://github.com/BuvinJT/Opy/blob/master/opy/settings.py. It has a one-to-one with the external opy-config,txt

I would suggest, however, that instead of using this by itself, that you try "Distribution Builder" https://distribution-builder.readthedocs.io/en/latest/. It installs opy-distbuilder, and implements it for you, along with additions built over the top of it. "Distribution Builder" is a much larger, encompassing project for creating distributable programs and python libraries. It is in alpha still, and the documentation is in a rough draft state, but it's developed far enough to be usable at this point, and development is still quite active. It should really shape up in the coming months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants