0

I am using multiple python programs . Where each program has different set of arguments passed (Like the below situation).

python program_1.py --filename "path_to_a_file" --length 50

python program_2.py --filename "path_to_another_file" --labelled True --length 50 --dimension 3

In ubuntu I have no problem, I can create a shell script. But the requirement finally is to produce a windows exe. I kindly like to know if it is possible to create a single exe (for multiple programs) with arguments passed through the argparse module.

The arguments that will be passed are integers, strings, path of an input file, etc like shown.

Looking forward for some help.

Many Thanks

Aadithya Sathya
  • 797
  • 1
  • 6
  • 12
  • You can create wrapper with imports from your programs and add a cmd parameter inside this wrapper (for example '--program program_1') to distinguish which program the other parameters refer to. Then you can create a single exe file with Pyinstaller. – viilpe Oct 19 '20 at 12:57
  • hey @viilpe Thanks for your reply. Can you post an example code here about the wrapper – Aadithya Sathya Oct 19 '20 at 13:33

0 Answers0