I have a python project consisting of three files: file1.py, file2.py and main.py. I can start main.py from cmd with some arguments, which imports and uses file.py and file2.py as follow:
from file1 import *
from file2 import *
# some other imports
if __name__ == "__main__":
arg1 = sys.argv[1]
arg2 = sys.argv[2]
arg3 = sys.argv[3]
RumMyLogic(arg1, arg2, arg3) # a function defined in file1 or so...
Now, I want to export all these files in pyc format(seperate pyc files or all in one, no matter) and hence, be able to run it from command line/terminal with some command like follow(supposing that python is installed on target machine):
main.pyc "arg1" "arg2" "arg3"
I couldn't find any straight forward solution on the internet. Any simple solution would be appreciated.
PS: This is not for code protection reasons.