SourceForge has been redesigned. Learn more.

dummy question: run script in ms-dos command

  • maxouv327

    maxouv327 - 2014-03-02


    I am currenlty working with Python Script plugin0.9.2.0 in Notepad++ v6.5.2.
    This is the only way I have to code and run python on my computer.
    This means that i do not have another installation of python like C:\Python27\python.exe

    As far as I stay in notepad++ to code and run my scripts everything is Ok.
    But now i would like to launch my python script in ms-dos command line.

    is there a mean to launch my script in ms-dos command line ?

    maybe something like:
    notepad++.exe -python_script ??

    Sorry if this is a silly question, but after hours looking for a solution i just can not figure out to do so ?

    thank you,

    • Dave Brotherstone

      There is no direct way to start the script within n++ from the command
      line. However, the python.exe file is actually a very small wrapper around
      the python27.DLL included with the PythonScript plugin. You should be able
      to grab the python.exe from, and copy it to the notepad++
      directory. Obviously you won't have the notepad and editor objects
      available, and you may need to append or insert some paths in sys.path to
      let python find the built in libraries.

      If you've been able to install python script, you should have permission to
      add the exe. I've never tried this, but I see no reason why it wouldn't


  • Dave W.

    Dave W. - 2014-03-03

    What is it you are trying to do? Create a worm that will run on machines that have N++ installed?

  • maxouv327

    maxouv327 - 2014-03-03

    Ok thank you Dave for your answer.

    I therefore understand that the answer to my question is: "you can not launch python script in command line with only python27.dll"

    To tell you the truth:
    i am sending mail in my python scripts. So if i install python.exe aside from python script plugin I can not run my script via notepad++/plugin/python Script menu (see error message below).
    This is the explanation why I did not want to install python.exe

    As you explained to me, I must have python.exe aside from python script plugin if i want to run my script in command dos.
    So i've installed python.exe and now launch my script using F5 notepad++ command.
    But i now can not use notepad++/plugin/python Script menu to run my script.

    thank you for your explanation.

    error message:
    File "C:\Users\EEEBOX\AppData\Roaming\Notepad++\plugins\Config\PythonScript\scripts\", line 3, in <module>
    import urllib2
    File "C:\Python27\Lib\", line 94, in <module>
    import httplib
    File "C:\Python27\Lib\", line 71, in <module>
    import socket
    File "C:\Python27\Lib\", line 47, in <module>
    import _socket
    ImportError: DLL load failed: La procꥵre spꤩfiꥠest introuvable


Log in to post a comment.