I nead too run a python program from another code.

I have the main code wher you can chose what too do and if you chose 1 you will run a surten python program and then return and if you chose 2 you will run some other program and then return.
The programs consist of serveral funktions and variabels.

I found the answer online.

For you how wonder:

You can use a funktion calld os.system

this is the way you use it:

import os

os.system("your python file name.py")

and it will run :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.