Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8548439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:29:45+00:00 2026-06-11T13:29:45+00:00

I have notepad++ installed on win7, and have installed the notepad++ exec plugin. Whenever

  • 0

I have notepad++ installed on win7, and have installed the notepad++ exec plugin. Whenever I execute the .py script I am running, i get the following error:

C:/Python27/python.exe ""
Process started >>>
C:\Python27\python.exe: can't find '__main__' module in ''
<<< Process finished.
================ READY ================

My index.py script is as follows:

text = "Hello World"
print text

The Notepad++ execute script (F6) is as follows:

C:/Python27/python.exe "$(C:/Python27/python.exe)"

This is the correct path to python.exe on my system. In the windows environmental variables, I have also added this to the PATH. Also, I have booted up the python.exe command prompt and have gotten the script to work by manually typing it in. I have done a directory search of C:/Python27, and the main.py file exists.

What is going on that is wrong here? Why can’t python find the __ main __ module??

EDIT:

Nevermind this, I’m an idiot.

So I had misinterpreted the setup for the notepad++ exec (F6) script:

C:/Python27/python.exe "$(C:/Python27/python.exe)"

It should have been this instead:

C:/Python27/python.exe "$(FULL_CURRENT_PATH)"

Of course it couldn’t find the main.py file because it wasn’t going to FULL_CURRENT_PATH.
Carry on.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:29:46+00:00Added an answer on June 11, 2026 at 1:29 pm

    Basically, it’s because the 1st argument in your script has been missinterpreted.
    That is to say, with the code

    C:/python27/python.exe "$(C:/python27/python.exe)"
    

    You’re doing something roughly equivalent

    C:/python27/python.exe 
    

    What you need to use is:

    C:/Python27/python.exe "$(FULL_CURRENT_PATH)"
    

    Note: Don’t substitute “$(FULL_CURRENT_PATH)” for something else – put that in verbatim – it’s a predefined variable of the NppExec plugin. It may be considered shorthand for the full-path of the file in the currently open tab.

    When I execute the script above (on a file called tmp.py, in my c:\xampp\htdocs\enhzflep folder), I get this displayed in the console:

    C:/Python27/python.exe “C:\xampp\htdocs\enhzflep\tmp.py”
    CreateProcess() failed with error code 2: The system cannot find the
    file specified.

    Which is just fine, since I don’t have python installed on this machine. 🙂

    EDIT: Just saw your edit. It seems I’m the greater fool!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following AutoIt script: Run(Notepad.exe, @WindowsDir, @SW_MAXIMIZE) Sleep(1000) Send(Just a test) $anPos
I have created a ContentProvider for my main Sqlite table, pretty much following NotePad
In my application, I have defined the following: public static readonly string NOTEPAD =
I'm using Visual Basic 2008 for example i have running notepad.exe , can i
I have a script which finds specific installed software but I am having trouble
I have created a notepad, a Tic Tac Toe and a scientific calculator. All
i have to make a notepad where i write,edit,clear the text. this notepad need
I have some code for starting a process (notepad), and dynamically makes a event
I have a txt file that created in notepad , containing these lines for
I have two notepads and each notepad contains some data. Let's say Notepad 1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.