{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Execute scripts within the Simulator interface","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":false}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"execute-scripts-within-the-simulator-interface","__idx":0},"children":["Execute scripts within the Simulator interface"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can run Python 3 scripts within the Simulator interface."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the Petromod Simulator, click the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Advanced runs"]}," tab to display the Open Simulator."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/pyt_01_advanced_runs_tab.23f4290255e76ac33e27705432e69d7383a737650a133407073f2aefc24011ef.d560898b.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A set of sample scripts is provided in the subfolder scripts of your Petromod installation folder. Script files have to be written in Python 3 to be read and followed by the Petromod Simulator."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Double-click into a field of the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Script"]}," column, an explorer is launched displaying the Python scripts that are stored in the subfolder “scripts” of your Petromod installation folder."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select one of these scripts and then click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Open"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The selected script is listed in the Open Simulator dialog box and a new and empty row is added for selecting additional scripts."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select multiple scripts in the Explorer dialog, then click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Open"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All selected scripts are loaded each into a row of their own, and an additional empty row is added. Only the checked scripts in the list are activated. When you run a Petromod simulation, the activated scripts run in the order in which they are listed."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To delete a script from the list, right-click the scripts and click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Delete"]}," on the context menu."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Arguments"]}," column to pass arguments to the scripts. Multiple arguments are separated by spaces. If an argument contains spaces it needs to be enclosed in quotation marks."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also run scripts manually. In the Open Simulator dialog box, click"," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/button_run.31c34bb20e62a6b676ec54248cd9a7840a5c868335f3522ec55a6ba983da184c.d560898b.png","alt":""},"children":[]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Run now"]}," beside any script, and it will immediately run using the existing simulation output. If you click"," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/button_run.31c34bb20e62a6b676ec54248cd9a7840a5c868335f3522ec55a6ba983da184c.d560898b.png","alt":""},"children":[]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Run all now"]},","," ","all activated scripts will run."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/pyt_02_run_scripts.1a5e55a2e6a7de011b23ffda6b0f7bfd3509a63844d2746c17d68f7f894ef288.d560898b.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parent topic:"]},{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/petromod-python-toolbox/tutorial/get_started"},"children":["Get started"]}]}]},"headings":[{"value":"Execute scripts within the Simulator interface","id":"execute-scripts-within-the-simulator-interface","depth":1}],"frontmatter":{"seo":{"title":"Execute scripts within the Simulator interface"}},"lastModified":"2026-08-25T13:57:13.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/petromod-python-toolbox/tutorial/execute_topics_within_sim_interface","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}