Python Forum
Cant Get Powershell to run a python program from notepad++. Newbie help!
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cant Get Powershell to run a python program from notepad++. Newbie help!
#3
Pythonerous

First, welcome to Python and the forum!

You can run scripts from the Command Line or PowerShell, however as Yoriz mentioned, you'll likely need to pass in the full file path of the script in order for it to work.
Something like this:

D:\Projects\Test.py    (this would be for a file called "Test.py"  that is located in a folder called "Projects" on your D drive).


Without having Python added to PATH, you will likely need to pass in the location of your Python interpreter as well.
I highly suggest adding Python to PATH - this can be easily done via a checkbox option during initial Python install.

For most of my scripts, I simply double click the .py file, and they run automatically.
No Command Line / PowerShell drama.   :D
Reply


Messages In This Thread
RE: Cant Get Powershell to run a python program from notepad++. Newbie help! - by ATXpython - Oct-09-2016, 01:34 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  using PowerShell from Python script for mounting shares tester_V 8 657 Mar-12-2024, 06:26 PM
Last Post: tester_V
  PowerShell & Python deep_logic 2 772 Jun-06-2023, 06:34 AM
Last Post: buran
  How to write a part of powershell command as a variable? ilknurg 2 1,169 Jul-26-2022, 11:31 AM
Last Post: ilknurg
Question Trouble installing modules/libraries and getting Notepad++ to show cyrillic letters Dragiev 6 2,338 Jul-24-2022, 12:55 PM
Last Post: Dragiev
  Python newbie laleebee 2 1,384 May-24-2022, 01:39 PM
Last Post: laleebee
Photo Windows 10 PowerShell doesn't work Amy 3 3,982 Apr-27-2021, 01:33 PM
Last Post: jefsummers
  Newbie on Python syntax rud0lp20 6 3,013 Apr-21-2020, 04:26 PM
Last Post: jefsummers
  Variable from notepad problem samuelbachorik 2 2,346 Apr-10-2020, 09:04 AM
Last Post: samuelbachorik
  Newbie needs help with a simple program feynarun 3 2,370 Jan-15-2020, 01:17 PM
Last Post: DeaD_EyE
  python newbie marcush929 2 2,653 Jan-01-2020, 08:06 AM
Last Post: marcush929

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020