0

I'm having trouble executing my programs in Notepad++. I'm currently operating on Windows 7.

When attempting to run the program in the the interpreter, I have to jump through numerous hoops to actually get my program to execute. In Notepad++, I'm unable to provide additional text if I'd like to run a sys.argv command, or need to write in a name for a function.

Are there any solutions? Any easier way to run my code?

Yu Hao
  • 119,891
  • 44
  • 235
  • 294
  • 4
    Consider using a proper integrated development environment instead of a text editor; perhaps [PyCharm Educational](https://www.jetbrains.com/pycharm-educational/) would suit you as a beginner. Or try using IDLE, the default python editor on Windows. PyCharm has some nice tutorial stuff included that'öö help you get started with Python. – jpw Jul 10 '15 at 01:28
  • Agree with @jpw. I personally advocate using IPython or the IPython Notebook. – WGS Jul 10 '15 at 01:29
  • Agreed. Pycharm is amazing. Not to mention the debugger will save you hours of troubleshooting :) – Dan Jul 10 '15 at 02:32

3 Answers3

4

Run your code from command interpreter.It will look like this

C:\Python27\python.exe programe_name.py

change directory where your program is save before the command.I recommend you to download IDLE editor.It is easy way to learn python.

rishi kant
  • 1,235
  • 1
  • 9
  • 28
1

What I have been doing is this:

Press F5 to run.

Paste this | C:\Python27\python.exe "$(FULL_CURRENT_PATH)"

Replace Python27 with whatever version you use.

Then run.

It should take what you're writing and run it, make sure to select Python as the current language too.

Sorry if this isn't what you're looking for, I'm just starting too!

0

There are better editors which can run python without a problem. Github's atom can do this easily and is a great free solution and Sublime Text 2 is also both free and paid.

However, if you absolutely have to run on NotePad++, do click Run on the Menu and then Run again. Now, type in the shell command you would like to run (Path-to-python.exe + Path-To-File) and click run

rassa45
  • 3,482
  • 1
  • 29
  • 43