Open AbhinavAjitsaria opened 5 years ago
I observe a similar problem on Windows:
(OK) terminal '2: Python' is created and
C:\Users\...>C:/Users/.../Miniconda3/Scripts/activate
(base) C:\Users\...>C:/Users/.../Miniconda3/python.exe "c:/Users/.../Documents/Python Scripts/hello.py"
hello
(OK) REPL in terminal '2: Python' is initialized.
(base) C:\Users\...>C:/Users/.../Miniconda3/python.exe
Python 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("hello")
hello
(ERROR => in terminal '2: Python' REPL is still active!!!)
>>> C:/Users/.../Miniconda3/python.exe "c:/Users/.../Documents/Python Scripts/hello.py"
File "<stdin>", line 1
C:/Users/.../Miniconda3/python.exe "c:/Users/.../Documents/Python Scripts/hello.py"
^
SyntaxError: invalid syntax
selecting terminal '1: cmd' or opening new terminal does not work, since run jumps into '2: Python'.
>>> exit()
(base) C:\Users\...>
(OK)
(base) C:\Users\...>C:/Users/.../Miniconda3/python.exe "c:/Users/.../Documents/Python Scripts/hello.py"
hello
(ERROR because of 3) => REPL is not initialized a second time.)
(base) C:\Users\...>print("hello")
Unable to initialize device PRN
'Run File in Python terminal' tests active terminal.
if REPL active:
run in cmd terminal (which is already open in '1: cmd')
'Run Selection/Line in Python terminal' tests active terminal.
if '2: Python' selected and REPL active:
run
else:
change to terminal '2: Python'
if REPL is not active in '2: Python':
initialize REPL and run selection
Environment data
Actual behavior
After 'Run Selection/Line in Python terminal' once, if 'Run Python File in terminal' is used, the command tries to execute in the ongoing interpreter session invoked by the first 'Run'
After 'Run File in Python terminal' once, if 'Run Selection/Line in terminal' is used, the command tries to execute in the open shell session invoked by the first 'Run' directly without invoking the interpreter first
Expected behavior
Steps to reproduce:
Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
)