Code editors/IDE's for Python 3.6.4


#1

Hello everyone,
I am new here and very new to programming. I have downloaded Python 3.6.4, from the Python.org site. I have had a few problems
that have been driving me mad and are really impeding my progress. They are two separate problems causing me the same basic
road block.

I have tried to use Notepad++ and had nothing but problems trying to “Run” my code. I have tried setting the file path in the
Run pop-up box and have had problems with permissions and file paths. I also learned how to set a macro using plug ins and
still had the same basic result.

I tried using IDLE, from the 3.6.4 download package, which lets you run code with the simple press of the enter key, but it
won’t let me highlight and change, or delete anything I have typed, once it is in the editor. I am dumbfounded as to how these
sort of problems both exist and how it is reasonably expected for “green” programmers to figure these things out on their own.

Would anyone please help me solve either of these problems ? I would prefer to understand how to solve all of them and have
options. I am interested in ultimately creating my own free standing GUI, so knowing how to fully utilize an IDE would be the
best, but I am interested in starting off some what simple. I don’t want too many crutches or short cuts. Thanks in advance for
your time, consideration and any advice.


#2

python is the programming language. Its an interpreted language. The interpreter is also called python, and the the program you download also ships with IDLE, which is great for trying small things

there are two options:

  1. a text-editor (like notepad++, but i would pick atom, which in my opinion is better), and then run the python interpreter from the command line to execute the scripts you wrote with the text-editor.

  2. a full fledged IDE which can also handle running scripts, so you don’t have to bother with what i described at point 1

Its a bit tricky at first, but i also opened a good opportunity to google this, with some time and effort you would have figured out how the pieces fit together :slight_smile:

doing python would indeed give the IDLE, doing python scriptname.py would execute the script. The scriptname is both the path and the name of the file

something else, i wouldn’t pick python for GUI apps if i had pick in language. Sure, there is PyQT (QT is really written for c++) and there is Kivy, but it still doesn’t make python the best pick for a GUI app


#3

Thanks for your reply. I appreciate the tip about Atom. I plan to check it out. I have read good things about it. I had only been using Notepad++, since I already had it. If Atom doesn’t have a simple run function, it isn’t better in my opinion. While I want to understand file paths,permissions, etcetera, I wasn’t looking forward to being bogged down by them.

I did take the time, prior to the original post of mine, to attempt to figure out the answers to the questions I seek. I had read that a code editor is easier to understand and doesn’t offer shortcuts, which can hinder the education of green programmers. I also read that IDE’s are the way to go, once you know how to code and are looking to save time. I do want to learn and I am willing to put forth the effort, but the particular set of problems I have, seem to be a major road block to even trying to learn. I hope you can appreciate where I am coming from.

I was trying to understand from my Google searches and use the f5 feature in Notepad ++ to run my code. At the advice of various individuals and a few of my own ideas, I tried all of the following:

C:\ProgramFiles(x86)\MicrosoftVisualStudio\Shared\Python36_64\Lib\idlelib-r “$(FULL_CURRENT_PATH)”

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\idlelib-i “$(FULL_CURRENT_PATH)”

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\idlelib\idle.bat-r “$(FULL_CURRENT_PATH)”

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\idlelib\idle.bat-i “$(FULL_CURRENT_PATH)”

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\idlelib\idle.py-r “$(FULL_CURRENT_PATH)”

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\idlelib\idle.py-i “$(FULL_CURRENT_PATH)”

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\idlelib\idle.py “$(FULL_CURRENT_PATH)”

I uninstalled the Microsoft Visual Studio version, thinking it was the problem and went with the version from Python.org. I found another video, explaining how to use the Plug-ins for Notepad++ and the programming of a macro. I programmed the macro with the following path;

NPP _SAVE
cd "$(CURRENT_DIRECTORY)"
C:\Python\python\new 1.py "$(FILE_NAME)

and that didn’t work…

I got an error message stating that I couldn’t save in Python, I didn’t have permission. That doesn’t make sense. I am the owner/administrator and only user on my computer. I tried this next, since I did have permission to save here;

NPP _SAVE
cd "$(CURRENT_DIRECTORY)"
C:\Users\Christopher\Documents\new 1.py "$(FILE_NAME)

If the file I am creating isn’t actually supposed to be saved in the Python folder, or a sub folder of python, then none of the file paths I was instructed to use make sense. Either I am getting bad information, or the information doesn’t fit my OS and Python version. I find it all a bit dizzying. I was hoping for an experienced coder to help me understand these confusing things. I am using Windows 7 Pro x 64 and Python 3.6.4

Any help you could offer me beyond, “you think I will figure it out”," I should be able to figure it out", or “I have to get lucky enough that, another individual with my exact problem ands circumstances, inquired and got a correct answer, and should have to find it in a public forum somewhere”, would be much appreciated.

As for the advice about using Python for GUI’s, I really appreciate where you are coming from. From what I have read, and a few other programmers I have conversed with have told me that, Python or Java tend to be easier to learn with, than any of the C languages. I was trying to get a good basic education as a programmer, before jumping into complex things. They also say that the C languages are better for GUI’s and more for efficient data processing.

I realize that I am perhaps seemingly contradicting myself, by wanting to build a GUI, for my first project. I plan to start small, with a basic file parser. I was hoping that by learning to import files and export files, I would be able to graduate up to importing other programs into the GUI, that then do calculations and export data, for further analysis and then eventually, create a free standing program that can do all of the importing, exporting, parsing, analysis and then storage and retrieval.

I have learned that I can do this in chunks. I have also learned that I can use more than one language to write a program. Who knows, maybe once I get a program written in Python, I may attempt to rewrite it in other languages, until I find one I like or that functions best. Another thing that attracted me to Python was that it is sort of imperative and declarative. I could see the need to understand both types of languages, to eventually do what I want. I was interested in a versatile language that I could grow with. Python seems to be it.


#4

There are tons of code editors and Python IDE’s for whatever you want.

Most popular code editors

  • Atom
  • Sublime
  • Visual Studio Code

Most popular Python IDE’s

  • Rodeo
  • PyCharm
  • Jupyter Notebook (not a IDE at all)
  • Spyder

#5

The interactive shell is a gateway to the CPU. Commands are executed immediately. Click the File menu and select New window That will open a text editor. Write, save and run code from there.

>>> def foo(bar):
	return "foo" + bar

>>> def bar(foo):
	return foo + "bar"

>>> foo('bar')
'foobar'
>>> bar('foo')
'foobar'
>>> 

These functions are in memory until the next restart of the shell (or close). We can construct the namespace from the command line, if we so choose. It’s how we can theorize code, by watching it run immediately, by which we see the errors thrown and logic flaws.