LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-20-2011, 06:54 PM   #1
InvRa
Member
 
Registered: Dec 2010
Posts: 59

Rep: Reputation: 0
Learning Python...how?


hello guys i have never tryed programming anyhing. i was wondering inhow i can start learning python. i use archlinux with openbox. do i need any specific tools or jsut a text editor? sorry for the noob question . from the tutorials online i see many tools like pygtk glade and so on and i cant understand anything
 
Old 02-20-2011, 07:35 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Read, read and read! That's the only way man...

As far as what you need, you can use an IDE or just a plain text editor. For being a beginner, I recommend using an IDE like eclipse so it will help you as far as syntax highlighting, etc.

Here are a few links to get you started with python:

http://www.sthurlow.com/python/
http://www.tutorialspoint.com/python/

Notice to you though: I have found these links via searching on google. Please be advised for future reference that you should search either online or within these forums before you go posting brand new threads. Thanks.
 
Old 02-21-2011, 07:25 AM   #3
tur third
Member
 
Registered: Jun 2005
Location: Surrey, UK
Distribution: Ubuntu 10.04, 10.10
Posts: 187

Rep: Reputation: 24
Definately go for an IDE - I would suggest Stani's SPE for an editor. Python is very unforgiving on spacing and syntax - so it will save you time.

If you are planning to program for fun, have a look at Pygame. This enables you to do graphical stuff with very little code.
 
Old 02-21-2011, 07:40 AM   #4
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Quote:
Originally Posted by corp769 View Post
Read, read and read! That's the only way man...
I'll add to this:

Code, code and code!
 
1 members found this post helpful.
Old 02-21-2011, 08:13 AM   #5
slack-fu
Member
 
Registered: Feb 2006
Location: Norway
Distribution: Slackware Linux 13.37
Posts: 71

Rep: Reputation: 10
Do a google search for 'python tutorial' and you will find more than you need.
 
Old 02-21-2011, 10:08 AM   #6
soplin
Member
 
Registered: Apr 2007
Distribution: Mostly Debian
Posts: 114

Rep: Reputation: 19
Learn programming design. Beginners often ignore this important part. To design a program, try to express what you have in mind and put it on paper first in a way that others can understand it and then use this as the basis for commenting. You may use conventions like flow charts or uml.

Learn how to comment for that language.

Read but also play.

Start small with a basic hello world.
Learn the input, the output, the operators, condition statements, loops, the syntax in general and learn how you can use it.

Make a habit of adding a statement, compiling and running and if and only if it works move on to the next.
Try to make errors.
Learn to program in expanded form before programming in compressed form. Generally speaking expanded form is preferred because it is clearer to read.

Compressed form is like: afunction{y=(dothis(dothat(....)));}
Expanded form is like:

afunction
{
x = dothat();
y = dothis(x);
}

Learn the language's library but before using the library itself try creating the parts yourself.
 
Old 02-21-2011, 02:00 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by soplin View Post

Learn to program in expanded form before programming in compressed form. Generally speaking expanded form is preferred because it is clearer to read.

Compressed form is like: afunction{y=(dothis(dothat(....)));}
Expanded form is like:

afunction
{
x = dothat();
y = dothis(x);
}

Learn the language's library but before using the library itself try creating the parts yourself.
Python won't give you a choice there; spacing and layout is part
of the syntax.


Cheers,
Tink


P.S.: Moving this to programming.
 
1 members found this post helpful.
Old 02-21-2011, 02:14 PM   #8
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,226

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
http://www.linuxquestions.org/questi...python-860242/
 
1 members found this post helpful.
Old 02-21-2011, 02:29 PM   #9
dudeman41465
Member
 
Registered: Jun 2005
Location: Kentucky
Distribution: Debian
Posts: 794

Rep: Reputation: 56
Here's a book you may find useful. It's available for free if you just Google it so I'm not violating anybody's copyright. Just read, write programs, experiment, and have fun. I use the default python IDE called IDLE, but it's very basic. It does syntax highlighting and highlights unclosed brackets, but that's about it. One thing it does allow you to do is to run a check on the whole file before you try running it to look for problems. You can find it in the python-tools package I believe.

Last edited by dudeman41465; 02-21-2011 at 02:30 PM.
 
1 members found this post helpful.
Old 02-21-2011, 07:24 PM   #10
Bagration
LQ Newbie
 
Registered: Dec 2010
Location: Germany
Distribution: SuSe, Ubuntu
Posts: 12

Rep: Reputation: 0
Learning Python ... how. I would ask why? I have to admit that I like Perl. But I would be glad if somebody could describe advantages of Python.

Of course I do understand that people who learned Python like it as I like perl.

Greetings B.
 
Old 02-21-2011, 08:12 PM   #11
kurumi
Member
 
Registered: Apr 2010
Posts: 228

Rep: Reputation: 53
Quote:
Originally Posted by Bagration View Post
Learning Python ... how. I would ask why? I have to admit that I like Perl. But I would be glad if somebody could describe advantages of Python.

Of course I do understand that people who learned Python like it as I like perl.

Greetings B.
rather than asking someone to describe for you, why don't you sit down and try program with Python and see for yourself.?
 
Old 02-22-2011, 01:15 AM   #12
Dogs
Member
 
Registered: Aug 2009
Location: Houston
Distribution: Slackware 13.37 x64
Posts: 105

Rep: Reputation: 25
Python is awesome, man. Eclipse is a great IDE for python, but you'll want PyDev which you can get from sourceforge. Installation is easy, just extract the plugins and features folders to the root directory of eclipse, and then find the eclipse properties, locate the pydev list in the tree, and point the interpreter to the python binary.

From there, create files, name them something.py, and run them as python applications or whatever.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
learning python skripy Linux - Software 2 03-27-2009 10:13 PM
Python - worth learning? vharishankar Programming 39 07-08-2005 02:38 AM
Learning Zope (and Python) coolman0stress Programming 3 05-10-2004 04:01 PM
Newbie learning Python busbarn Programming 3 08-09-2002 10:50 PM
Try Python, O'reilly Learning Python haknot Programming 5 02-15-2002 08:27 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration