Python Forum

Full Version: A question about script readers and python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I began learning about python today and I am having difficulty with getting a script reader to work with Python. I am relatively new to this. I am using Geany and NotePad++ but having troubles with getting them to run with python. I know this is probably a really simple problem, but would appreciate any feedback on this.
Get either (although there are others, in my humble opinion, these are the best) PyCharm community edition (free) or atom editor.
PyCharm is simple to setup and is very complete, includes editor command window, debugger, syntax checker, spell checker, source
code control. I believe atom has plugins for all of these (i might be wrong) and Snippsat has a tutorial (or part of one on another subject) in the tutorials section.
For small scripts I am using Geany. There is no problem for me to make it work with Python. Just have to tell to editor that you want Python to be used when you hit F5.
(Jul-24-2017, 02:26 AM)zero91 Wrote: [ -> ]but having troubles with getting them to run with python

Could you be more specific please?  I presume, since your using Notepad++, your on the Windows OS. Are your Environmental Variables set correctly? How exactly are you trying to 'run' them?

If you open a command terminal and type 'python' 'Enter", do you see something similar to:

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\>python
Python 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
If you have a short script, such as:

print("Hello World")
if you double click it, by default, if will open a command window, print 'Hello World' to the window, then close.  This will happen so fast that you will think it did not happen at all.
For Notepad++.
Open notepad++ and press F5.
You'll get a little popup box:
[Image: CUrbF.jpg]
If follow my tutorial here.
Then is this command you paste in.
cmd /k "C:\Python36\python.exe $(FULL_CURRENT_PATH)"
The can eg make a shortcut key Ctrl+z.

Thonny is good for beginner.
Here tips for Pycharm(Free edtion)
For cmder look at Python environment Windows.

My setup is with Atom and cmder.