Use IDLE to launch script using the full file path
Asked Answered
V

1

3

I'm currently using Notepad++ to edit my python script, and I would like to be able to use a shortcut to make my script run in IDLE. Currently, I have:

cd C:\Python32
pythonw.exe Lib\idlelib\idle.pyw -c "$(FULL_CURRENT_PATH)"

When I try to run it, I get a Syntax error on the : in C:\Users\...

However, if I omit -c, IDLE properly opens up the file in it's editor and then I am able to run it.

I feel like I'm missing something simple, can anyone help me out?

Valeta answered 6/7, 2011 at 14:52 Comment(3)
Is this a Windows .BAT file? If so, perhaps you should update the tags, since it doesn't seem to be a Python question, but rather a BAT file question. Or is this a PowerShell question?Bedstead
I am using NppExec. The core part of the question is why doesn't idle.pyw -c work with a full path.Valeta
This is barely about Python and entirely about NppExec, correct? Please update the tags (and the question) to clarify this. Also. Just to confirm that it's not Python, try the IDLE command from the cmd.exe prompt to confirm that it works from the Windows command-line.Bedstead
H
9

Argument -c used to start the command, if you need to run a file, then use argument -r

I use this command: C:\Python27\Lib\idlelib\idle.bat -r "$(FULL_CURRENT_PATH)"

Haphazard answered 6/11, 2011 at 19:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.