Python Forum
Path of Notepad++ and Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Path of Notepad++ and Python
#1
Dear Forum members,

I have just registered and I am happy that there is a place where people share their struggles and achievement using Python or other software. 

My question and shout for help would be making a path to notepad++ so I could use Python. If that helps, maybe some of you would know I just got a book "Learning the Python the hard way" and it tells me I have to do just that in order to start programming.

So, Could you please put the step by step guide with pictures? Also, explanations would be great ! 

Yes, the internet if flooded with them yet nothing that I can understand. 

The python I am using - Python 2.7.12 and notepad++- (take this if you do not know what to download) After checking it, it seems it has 7th version.

Disclaimer: I am not here for discussion of what is better I have already made my mind. Just please be so kind to assist me in this matter.



Take this one if you have no idea which one you should take.Take this one if you have no idea which one you should take.Take this one if you have no idea which one you should take.Take this one if you have no idea which one you should take.Take this one if you have no idea which one you should take.Take this one if you have no idea which one you should take.Take this one if you have no idea which one you should take.Take this one if you have no idea which one you should take.Take this one if you have no idea which one you should take.Take this one if you have no idea which one you should take.
Reply
#2
Quote:My question and shout for help would be making a path to notepad++ so I could use Python. If that helps, maybe some of you would know I just got a book "Learning the Python the hard way" and it tells me I have to do just that in order to start programming.

Well, that's not entirely correct, in order to start programming you need Python and just about any text editor, but notepad++ is a good one for Windows. Make sure, in notepad++ you've set the Language as Python, this gives you syntax highlighting and more for Python. Main menu bar --> Language --> P --> Python. 

On the bottom left of the main window, there is the 'file type' , right click and select 'Python' this will automatically save file as a '.py' file. Over to the right is the line feed/carriage return used by your target OS. For now, leave as Dos\Windows, next to that is the encoding, change to UTF-8 by going to the main menu bar Encoding --> Encode in UTF-8.

There are a couple of Plugins for Python, but they are not required.

Next, I would NOT associate '.py' files with notepad++, this will jazz up running scripts by double clicking them (they are, by default associated with python.exe) If you need to open/edit a '.py' file, right click the file and 'Open with' Notepad++.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#3
Consider to install the latest stable Python3 - it was 3.5.2 I think. Learn to program on Python3 instead 2. And once you pass the basics you may see the differences between both versions.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#4
I think that Notepad++ is not very good choice. Sublime is better than Notepad++.
Reply
#5
For learning purposes, everything will do.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#6
(Oct-12-2016, 08:59 PM)sparkz_alot Wrote:
Quote:My question and shout for help would be making a path to notepad++ so I could use Python. If that helps, maybe some of you would know I just got a book "Learning the Python the hard way" and it tells me I have to do just that in order to start programming.

Well, that's not entirely correct, in order to start programming you need Python and just about any text editor, but notepad++ is a good one for Windows. Make sure, in notepad++ you've set the Language as Python, this gives you syntax highlighting and more for Python. Main menu bar --> Language --> P --> Python. 

On the bottom left of the main window, there is the 'file type' , right click and select 'Python' this will automatically save file as a '.py' file. Over to the right is the line feed/carriage return used by your target OS. For now, leave as Dos\Windows, next to that is the encoding, change to UTF-8 by going to the main menu bar Encoding --> Encode in UTF-8.

There are a couple of Plugins for Python, but they are not required.

Next, I would NOT associate '.py' files with notepad++, this will jazz up running scripts by double clicking them (they are, by default associated with python.exe) If you need to open/edit a '.py' file, right click the file and 'Open with' Notepad++

Firstly, Thank you for reading my post. Secondly, I did what you have told me here and it seems it works. Yet, when I do the testing for example: print "Hello world" it does not do anyhing.
Any input on this ?

User has been warned for this post. Reason: written inside quote tag
Reply
#7
Quote:Firstly, Thank you for reading my post. Secondly, I did what you have told me here and it seems it works. Yet, when I do the testing for example: print "Hello world" it does not do anyhing.

Any input on this ? 
What I did is create a directory on my hard drive 'C:\Python'. All my .py files are saved there to make it easy to find. You may want to do the same. Let's say you created the file HelloWorld.py, open a command terminal (right click on Start menu --> click on Run --> enter "cmd.exe" (without quotes). Navigate to the files location, in my case it would be
cd c:\Python
yours will be different. Once there, just type "HelloWorld" (again without the quotes) and you should see your results.
Though you could just double-click the file in File Explorer, it will run so fast you will not see the command terminal open, run your program and then close. This way (from within the terminal) once the program terminates, the terminal remains open allowing you to see the output.

I should add, if you want to run code without creating a file, open the command terminal and type "python", you should see something similar to

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\>python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
then just type your command

>>> print("Hello World")
Hello World
>>>
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Trouble installing modules/libraries and getting Notepad++ to show cyrillic letters Dragiev 6 2,244 Jul-24-2022, 12:55 PM
Last Post: Dragiev
  WebDriverException: Message: 'PATH TO CHROME DRIVER' executable needs to be in PATH Led_Zeppelin 1 2,203 Sep-09-2021, 01:25 PM
Last Post: Yoriz
  Variable from notepad problem samuelbachorik 2 2,296 Apr-10-2020, 09:04 AM
Last Post: samuelbachorik
  Running python code meant for Notepad++ plugin independently greektranslator 3 2,982 Jan-28-2019, 06:03 PM
Last Post: maxtimbo
  Exporting Python Output to Notepad Nirmal 4 3,578 Sep-02-2018, 02:36 PM
Last Post: Nirmal
  .pth file does not show up in sys.path when configuring path. arjunsingh2908 2 5,740 Jul-03-2018, 11:16 AM
Last Post: arjunsingh2908
  Is there an equivalent of Notepad in linux sylas 5 3,853 Jun-15-2018, 12:33 PM
Last Post: DeaD_EyE
  Setup Notepad++ for python LavaCreeperKing 6 12,746 Mar-22-2018, 07:27 PM
Last Post: LavaCreeperKing
  With Notepad how to have lines numbered sylas 3 3,302 Mar-10-2018, 08:25 AM
Last Post: sylas
  Get filepath to save from notepad.exe python3 Jason2024 1 2,969 Oct-03-2017, 02:30 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

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