One of my first programs was coded on paper tape. Another was via punched cards. I foresaw amazing stuff, e.g., artificial intelligence, models for weather, space travel, etc., but never imagined we would come this far in only 60 years. I now have a programmer son who wants me to learn Python. He has a relatively modern viewpoint, and I don't understand a lot of what he says. He has certain mathematical challenges in the music technology field, and believes I could help him due to my math interests, and my years of software development experience. Sadly, I don't understand much of the modern lingo, and every source I've tried to tap to learn Python makes assumptions that are foreign to me. Online tutorials quickly lose me. I've purchased a couple of books from Amazon, and they help a bit, but rather quickly lose me. For example, I never worked with IDE's, and now quickly get lost when the subject comes up. One of the books tells me on page 15 to "Open your favorite Python IDE and follow along with the example presented in Listing 2-3." Now how the heck to I do this? I have installed Python 3.4 on my Windows 7 64bit system, and suspect there's an IDE in that installation, but how do I access it? That's an initial question. I'd like to make friends with someone on Dani who could patiently guide me from time to time. What's scaring me already is the likelihood that when someone responds, and I log in, I'll wonder how/where to look for that response! Maybe something will pop up and tell me! I hope so.
I've never learned how to adeptly utilize forums. Thanks to anyone who answers this plea!

Recommended Answers

All 16 Replies

As one old (very old) programmer to another (I started with Fortran on punch cards in the 1960's) you might want to check out Eclipse. It supports most languages and is a decent open source IDE (no cost, source code available). Here is what may be a helpful link: http://marketplace.eclipse.org/content/pydev-python-ide-eclipse

If you want to learn python syntax and using it via ubuntu.Use codecademy.com which has simple interface and explaining course.

Python is fun in ubuntu than in IDE

At first create a folder like Atest in your Python directory C:\Python34 where you can save your newly created Python files.

On your Windows machine there should be a file called idle.bat in the folder
C:\Python34\Lib\idlelib
Double click on idle.bat and the IDE that comes with your Python installation called IDLE will come up.

If it comes up with a nice clean Editor Window, you can start typing Python code into it. For instance ...

''' hello.py
my first Python code
ask for a name and print a hello message
'''

name = input("Enter your name: ")
# {} is a placeholder for the name
print("Hello {}".format(name))

Put information/comments between the ''' ''' or in a line starting with a # character. These code lines are for your info and will be ignored by the Python interpreter.

The nice thing about an IDE is that you can run the code you have written directly from IDLE by pressing the F5 key. If your code has not been saved as a file, you will be prompted to do so. Save the code to a file, call it something like hello.py (the .py extension indicates a Python code file) in your Atest folder. After saving, a new window will pop up called the Shell Window, where the code is executed. So it will ask you for your name, type it in and press Enter. The comment line will be ignored, the print() function will execute next.

The Shell Window could look like that ...

>>> 
Enter your name: Old Fahrt
Hello Old Fahrt
>>> 

That is it, you ran your first Python program. Use the Windows tab to go back and forth between the Edit Window and the Shell Window. You can use the Shell Window to test short pieces of Python code. For instance at the >>> prompt type import calendar and press Enter. At the next >>> type calendar.prmonth(2015, 6) press Enter. The whole Shell Window should look like this ...

>>> import calendar
>>> calendar.prmonth(2015, 6)
     June 2015
Mo Tu We Th Fr Sa Su
 1  2  3  4  5  6  7
 8  9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

>>> 

Should IDLE initially come up as a shell with >>> prompts showing, you can configure it using tab Options then Configure IDLE then tab General and select Open Edit Window, finally press the Apply button. From now on IDLE will open with the Edit Window.

Use the IDLE Help tab to get more info on the IDE or bring up the Python Manual. IDLE has other helpful things, for instance as you type print( a help hint for function print() will pop up. If you made an error in your code, the line number with the error and the type of error will be indicated in the Shell Window.

Have fun!

Many respectful thanks to rubberman, Ravi Teja 1, and vegaseat!

IMHO, exercising your brain with Python programming might jut keep Alzheimer's at bay.

I agree, vegaseat, about trying to keep Alzheimer's at bay. I have several ideas for programming facilities for exercising memory and keeping it sharp. In years past I wrote APL code to solve puzzles such as Sudoku, and several other games, and intend to modify them now to tease players into using their brains in several modes, including word meanings, recognition of faces and scenes, etc., sort of along the line of Lumosity exercises. APL was very powerful in terms of writing very compact code, and offering the programmer the easy way to construct solutions both interactively and in building functions. Doing this by learning to use Python will serve both me and my target audiences.

Ahhhhh APL what memories!
I used APL in IBM in 1969 on an 1130 mini with a golfball typewriter terminal. I had to have my own personal APL character set golfball. I used it to write an assembler for the System 7 real-time mini so we could start to develop software for it before we got the first kit from manufacturing.
At the time it was disparagingly referred to as the first WOL (write-only language). How true - compact to the point where it was totally unreadable. Do you remember the contests to write the shortest program to deal 4 random bridge hands and display them in the standard bridge format? I seem to remember it got down down to about 150 characters.

I am glad to see so many experienced programmers in the forum. I did some programing in mid 70s in fortran , assembly and c but after getting my BSEE I moved on to semiconductor devices and fiber optics and that was the end of my programming . the reason I started python is that after I moved back to my country I noticed Alzheimers is increasing exponentially in my city (tehran) which as the doctors say is due to air pollution ( even worse than La ) and the other reason is politics related which I better not mention it . since I started python programming I can tell that it has helped me a lot , just thinking on a problem , even if I can not solve it feels good and it feels even better when some one answers my question in the forum . I started python with some elementary books that I found on the internet , vegaseat's starting python section helped a lot too and the code snippets were great . when I am stuck on a subject I google it to death before posting it on the forum and I am always looking for free books on python on the internet . best to all

For an IDE, I use PyScripter for my Python coding. Just the right mix of highlighting, etc. that I need for my rather basic programs/script. I like the ability to add keyboard shortcuts for code templates. So, as I learn how to do certain things, I add that code as a template and then invoke it as needed. Other IDEs have this, but PyScripter makes it easy to create and invoke.

As for learning, I used TutorialPoint's great site and info. Some of it is a little dated, but great foundation to build upon. Afterwards I moved to investing in books.

My choice for python is Sublime Text 3 with additional plugins such as Anaconda, it all makes the text editor a complete IDE for python, nice highlihting and its highly customizable, love it

Considering your mathematical background, if you need some exercises after you got the basics and before tackling recoding your old code to Python (nice and very recommendable own project to push you to learn more), you might want to go through mathematical coding chalenges of the Project Euler

I am just youngster, started with MSBasic, Z80 Assembler and (Turbo) Pascal at 80's :)

My evolution was machine language (front panel binary switches), Assembler, Basic, C, Delphi (Pascal), C++, Python (my love) and lately a little Go language.

The Zen of Python ...

import this

There are many differring opinions on where someone should go to learn programming, or even just simply a new language.

I would be honored to help a notable member of computer history (working with tape and punch cards is enoughfor note IMO).... That is, if you would like any help past what you have already recieved, feel free to let us/me know.

Happy Learning!

I think the "Sublime Text" IDE is very nice, but leaves me stranded with an
"EOFError: EOF when reading a line" whenever I use the Python input() function.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.