LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual Environment Subshell Python Script Execution

I am trying to automate a legacy tool we're using to simulate a current sensor's signal over CAN.  To manually run the script, I'll navigate to a directory in the command line/powershell then launch a subshell in a virtual environment via pipenv shell.  Then I navigate to the python directory, run the python script which prompts the user to enter a current to simulate (example attached).

 

I've just been experimenting and googling at this point to see if it's possible to execute those commands in succession just with the system exec.vi.  I can get into the virtual environment but can't execute anything further.  I am setting the command line to: "cmd /k cd ..\.. & cd ..\.. & cd .\svn\LMC\amp_platform\tools\ & pipenv shell & cd .\ivts_emulator\ & python .\ivts_emulator.py" and I am seeing the execution up to pipenv shell but nothing after.  

 

Is it possible to do this the way I want or am I going to have to look into alternatives?

 

0 Kudos
Message 1 of 1
(1,001 Views)