0

I am wondering if there is a way to open a python script in IDLE run mode, (the equivalent of opening it with idle.exe {path} and pressing F5) or set it up so that if a .py file is open with IDLE it automatically runs it.

#Opens without IDLE GUI
python {path}
#Opens in IDLE, but in editor mode
@ECHO OFF
idle.exe {path_to_idle}
2
  • 1
    do you mean execute the .py file? why doesn't python script_name.py not work? Commented Jun 19, 2020 at 8:14
  • It works fine, I just personally prefer the GUI of the IDLE, and I plan to write a package for ATOM to execute the command in IDLE. Commented Jun 19, 2020 at 12:26

1 Answer 1

1
# Running script.py in idle
idle.exe -r script.py

You might consider using:

# Inspect interactively after running script (see "python --help" from cmd)
python -i script.py
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.