0

I'm having a function where an excel file is passed as an argument to it. My function manipulates the passed file and does some calculations from the values of the existing column, writes those values into the new column, and then it writes it as .csv format. Now, I just want to hide this code i.e user should not see the code. I want to run this from a terminal by passing the input file.

I have converted my .py file to .pyc file. now I want to run the .pyc file by passing my input file in anaconda prompt.

Carlos Mermingas
  • 3,822
  • 2
  • 21
  • 40

1 Answers1

1

you can just call it

 python my_main.pyc my_excelfile.xls

but just a heads up its not very hidden

C:\> pip install uncompyle
C:\> uncompyle6 my_main.pyc 

you might want to try something like building an actual windows binary(assuming you are on windows ... )

C:\project> pip install pyinstaller
C:\project> pyinstaller --onefile my_main.py
C:\project> cd dist
C:\project\dist> my_main.exe my_xls.xls

(but even then its not that hard to get at the source if you know where to look)

Joran Beasley
  • 110,522
  • 12
  • 160
  • 179