Python Forum
A question about script readers and python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A question about script readers and python
#1
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.
Reply
#2
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.
Reply
#3
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.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#4
(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.
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
#5
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Re-write BASH script to Python script popi75 5 2,364 Apr-30-2021, 03:52 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

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