473,473 Members | 1,959 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to configure notepad++ to run python script

4 New Member
Hello All

I am new to python and using python 2.6 for few weeks with no problem.

I like notepad++ and trying to run pythons script in notepad++.

In notepadd++, Run menu > Run dialog box I entered following line:

C:\Python26\python.exe "$(C:\Python26\EXERCISES\logistic.py)"

After clicking on 'Save' button, in next window I select a shortcut key such as: (CTRL + R) or F8, etc.)

I restarted notepad++, when I click designated shortcut key to run my python script the python interpreter screen open and close in less then a second.

After that no matter how many times I use shortcut key it doesn't work at all.

When I click on python.exe python interpreter screen opens and I can run any python script like:

C:\Python26\EXERCISES>logistic.py
0 0.84
1 0.5376
2 0.99434496

Alternatively in notepadd++ when I put the C:\Python26\python.exe "$(C:\Python26\EXERCISES\logistic.py)" in Plugins > Npp Exec > Execute window, after clicking on 'Save' button and then 'Ok' button to run the script, it gives me the following error:

C:\Python26\python.exe
Process started >>>
C:\Python26\python.exe: can't find '__main__.py' in ''
<<< Process finished.

Could you please help me out to fix this issue.
Feb 12 '11 #1
2 5997
Sean Asemani
4 New Member
Hello All

I am new to python and notepad++.

I was reading all the questions in the 'python in notepad++' section\forum of this web site.

I've configured the 'shortcuts.xml' file (in notepad++ directory) exactly the way it was explained in the forum
but when i re-open notepad++ and press shortcut keys, nothing happened.

Also as Crisb mentioned in the forum, I setup the NppExec in notepad++ as he guided:

C:\Python26\python.exe "$(C:\Python26\EXERCISES\logistic.py)"

but when I try to run any python script from within notepad++, I get the following error:

C:\Python26\python.exe
Process started >>>
C:\Python26\python.exe: can't find '__main__.py' in ''
<<< Process finished.

Would anyone have any idea what could be wrong?

Thanks
Feb 13 '11 #2
bvdet
2,851 Recognized Expert Moderator Specialist
I haven't been able to do it either. It should work, I just haven't figured it out yet.
Feb 13 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Andrew Chalk | last post by:
Is this possible? In my CGI app. I display a web page with a link (anchor). When the link is clicked I want to exectute a python script rather than go to an HTML page. Many thanks.
3
by: Mivabe | last post by:
I'm using a Python script om my Wildfire XMPP server to connect to external transports (for instantce MSN) I configured the script as a windows service with 'srvany' and 'instrv" and everything...
6
by: tatamata | last post by:
Hello. How can I run some Python script within C# program? Thanks, Zlatko
7
by: hlubenow | last post by:
Hi, recently there was a thread about hiding the python-script from the user. The OP could use http://freshmeat.net/projects/pyobfuscate/ H.
1
by: michael.buonomo | last post by:
We have been using the Google recommended python script for about a year. We recently realized that the script was not crawling our sites url's, but just our folders which reside on the server. The...
3
by: telduivel | last post by:
Can someone please help me with this: I have a python script, that at some point calls a linux bash script (.sh). Starting the shell script is the last thing my python script needs to do, so I...
4
by: Quill_Patricia | last post by:
I have a Python script which is used to load data into a database. Up to now this script has been run by customers from the Windows command prompt using "python edg_loader.pyc". Any error messages...
0
by: norseman | last post by:
Gros Bedo wrote: ============================== Yes. man ps explains try ps -AFL | grep then kill -9 found (check it more than twice) 1) If your script is known to hang use what...
1
by: replysonika | last post by:
Hello, I run a Java app with subprocess from Python script. This python script is called from another Python Wrapper. python = subprocess.Popen(, stdout=subprocess.PIPE,...
2
by: SaraswathiIndirarajan | last post by:
I need to run python script in firefox browser. I followed the steps mentioned in this site (Configuring the Apache Web Server to Run Python on Windows) to configure apache to run python scripts in...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.