Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Dismissing interactive prompt in python

Is it possible to interact with a PSS/e prompt using a python script?

I'm trying to initialize a case for dynamics but it has a user written model that prompts the user for a filename at initialization. I can press enter when prompted during manual initialization through the PSS/e GUI, however the command line waits for user input when I attempt to do it through a python script.

Less graceful ways of bypassing this that I can think of are:

  1. Do the initialization in the GUI, dismiss the prompt, save the .snp and .cnv files, and use that as the start point for the python scripts.
  2. Make an .idv that does the STRT command with an extra carriage return, and call the .idv from python. This also means I'd have to make a distinct .idv for each .out file or rename them before starting a separate dynamics run.

Dismissing interactive prompt in python

Is it possible to interact with a PSS/e prompt using a python script?

I'm trying to initialize a case for dynamics but it has a user written model that prompts the user for a filename at initialization. I can press enter when prompted during manual initialization through the PSS/e GUI, however the command line waits for user input when I attempt to do it through a python script.

Less graceful ways of bypassing this that I can think of are:

  1. Do the initialization in the GUI, dismiss the prompt, save the .snp and .cnv files, and use that as the start point for the python scripts.
  2. Make an .idv that does the STRT command with an extra carriage return, and call the .idv from python. This also means I'd have to make a distinct .idv for each .out file or rename them before starting a separate dynamics run.