Welcome, Guest. Please login or register.
April 17, 2014, 06:36:41 AM
Home Help Search Calendar Login Register
Show unread posts since last visit.
News: Let Pardus-Anka become #1: Pardus-Anka Bug ReportPardus-Anka World Google+ | The Pardus wiki  | Visit Pardus-Anka official website  | Register as forum member?  Email the moderator!

+  Pardus Worldforum
|-+  General
| |-+  General topics
| | |-+  Python programming
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Python programming  (Read 1846 times)
highenergy
Pardus fellow craft
**
Gender: Male
Posts: 134


View Profile
« on: December 10, 2007, 18:27:57 PM »

Hello,

I want to learn python programming from scratch. What do you advise to me? From which book I should start to learn?

One more question. I also want to know if python can produce web based applications like java applets?
Logged

Acer Aspire 5520G-402G16, AMD Turion 64 x2 TL-58 1.9GHz, Nvidia Geforce 8400M G 128MB
pettersolberg
Newbie
*
Gender: Male
Posts: 28


View Profile
« Reply #1 on: December 11, 2007, 21:15:58 PM »

http://docs.python.org/tut has a tutorial written by Guido van Rossum ( the creator of the language ) which is a nice starting point.

http://diveintopython.org/ - is an open book, with a wide look at using python. It's from 2004, but very useful.

Hope it helps,
Good luck!
Logged
Caesar Tjalbo
Pardus fellow craft
**
Posts: 33


View Profile
« Reply #2 on: December 12, 2007, 00:35:20 AM »

Hello,

I want to learn python programming from scratch. What do you advise to me? From which book I should start to learn?
You're asking two things, I don't know how much experience you have so I'll answer both:
- Learning Python: for learning the Python language my personal favorite is 'Core Python Programming (second edition)' by Wesley J. Chun. This book covers a lot of Python in a good, readable way. It made it easy for me to step into Python from a programming background but it's geared to people new to programming; I found plenty of useful tips on programming in general. I still use the book to as a reference, to learn about areas I previously wasn't interested in, and a refresher on syntax or language intricacies. If you're more experienced with Python I can also recommend 'Pyhton in a nutshell' by Alex Martelli as a desktop reference guide, a very compact overview on the language and important libraries.
The previously mentioned docs.python site has everything too but these books make it a little easier to get into, in my personal experience.

- Learning programming: Python is great for experienced programmers and people new to programming. If you're experienced in programming, learning the language is something that can keep you occupied for a long time because Python has a lot of options one can master.
For learning to program there's practice, practice and a lot more practice. Smiley There are books on the subject but a fun way of learning to program is by programming games. Knowing a (little) bit of Python is recommended but then you can perhaps look into 'Game Programming, The express way to learning' by Andy Harris or 'Game development with Python and Pygame' by Will McGugan.
You won't change the world (anymore) by writing your own Pong, Space Invaders, Astroids or Pac-Man but it's fun and educational!

One more question. I also want to know if python can produce web based applications like java applets?
Yes, no.
Web based apps: yes, Python modules are often based on C/C++ libraries and there's a wealth of web related functionality available. Python can function similar to PHP (there's a Python module for Apache) and there are frameworks available in Python to help you to easily create your own website, like Django, Turbogears and others.
Java applets run in your browser, I think it's possible to create browser extensions in Python to extend the functionality of your browser (Konqueror can be extended with Python afaik) but there's no Python plug-in comparable to Java. For that you need to look at Java, Flash or Javascript, I think.
Logged
highenergy
Pardus fellow craft
**
Gender: Male
Posts: 134


View Profile
« Reply #3 on: December 13, 2007, 07:18:58 AM »

@pettersolberg&Caesar Tjalbo:
Wow thanks for detailed help both of you.

Quote
there's no Python plug-in comparable to Java
Don't you think it's a weak point of phyton over java? If phyton had phyton applets then I wouldn't need java any more! Most people use java because it can produse applets which can run in your browser. It's suitable especially for client-server applications. For example the company I work for prefer java of the native code for clients and c/c++ for server applications. Java clients connects server in any browser in any platform.

Quote
I don't know how much experience you have so I'll answer both
I don't have experince in coding too much but I know a lot about C&Assembly. I don't often use them but sometimes I need C for math calculations.
 
regards
« Last Edit: December 13, 2007, 07:31:13 AM by highenergy » Logged

Acer Aspire 5520G-402G16, AMD Turion 64 x2 TL-58 1.9GHz, Nvidia Geforce 8400M G 128MB
Caesar Tjalbo
Pardus fellow craft
**
Posts: 33


View Profile
« Reply #4 on: December 14, 2007, 10:46:31 AM »

Quote
there's no Python plug-in comparable to Java
Don't you think it's a weak point of phyton over java? If phyton had phyton applets then I wouldn't need java any more! Most people use java because it can produse applets which can run in your browser. It's suitable especially for client-server applications. For example the company I work for prefer java of the native code for clients and c/c++ for server applications. Java clients connects server in any browser in any platform.
I'm not very knowledgeable on this particular subject so I might be wrong.

It's not really a weak point of Python but a unique feature of Java. A lot of people have a plug-in for Java installed in their browser but that's about Java, there's no plug-in for Python, C, Ruby, Cobol or any other language, that I know of. I think Java is mostly used to develop ordinary programs that are relatively easy portable to a different architecture as Java runs in a virtual machine which does the platform dependent work for you. But that's similar to Python or Ruby where you can take a program written on a Linux system and use it on a Windows or OSX system because you take your program code and run it with a platform specific interpreter.
You can't take the Java browser plug-in for granted either: lots of people have Java disabled for security reasons or not even installed at all, I'm not sure but I think there's no browser plug-in for 64 bit Linux available yet. Again: I don't know that much about this subject; it's just that I've never heard of a Python applet or a Ruby applet so I don't know if they exist but I've seen Java applets before.

Now, that's the simple world I understood. However, there's a Java based version of Python: JPython or Jython. It allows you to write Python and translate to Java so you can have a Python program function like a Java program and hence like an applet. It works and Python code is a lot more compact and readable than Java but it doesn't change the basic that browser applets are a unique feature of Java, just that you get Java disguised as Python.

As a general programming language Python is fine: you can write GUI apps and commandline scripts with it but in that respect it's similar to Perl, Ruby, C, C++, etc. and Java. I think Python is THE BEST PROGRAMMING LANGUAGE IN THE WORLD Wink (but really not that different from Ruby, C++ or Java). For applets there's only Java afaik alternatively you can use Flash or webpages with JavaScript (which has no relation to Java) but that's different.
Quote
I don't know how much experience you have so I'll answer both
I don't have experince in coding too much but I know a lot about C&Assembly. I don't often use them but sometimes I need C for math calculations.
With only a background in C and Assembly, you'll be shocked how easy it is to write complex programs in languages like Python (or Java). The hardest part is to get to know the libraries, with C you know most of them, and understanding object-oriented programming, although that's not strictly necessary in Python and if you know Java you're probably familiar with it allready.
I didn't know your entry level but nowadays Python is also used for people who are learning what a 'if ... else ...' construct or a 'for' loop is, people who are starting to learn programming.
Logged
shudde
Newbie
*
Posts: 19


View Profile
« Reply #5 on: December 23, 2007, 21:54:00 PM »

Core Python Programming 2nd edition by Wesley Chun.

That is the best intro to intermediate Python book I've found, also purchased Rapid Gui Programming with Python and QT recently which is the only book out dealing with PyQT4 (online tutorials are also somewhat sparse atm since QT4 hasn't been widely adopted in distros yet).

Python book reviews: http://www.awaretek.com/book.html
Logged
Willem
M.D.
Administrator
Pardus Guru
*****
Gender: Male
Posts: 1020



View Profile WWW
« Reply #6 on: March 06, 2008, 22:09:27 PM »

Did you know that Python was developed by a dutchman, Guido van Rossum who now works at Google?
http://www.python.org/~guido/
Logged

For freedom...
Eren.Turkay
Global Moderator
Pardus Master
*****
Posts: 262



View Profile WWW
« Reply #7 on: March 07, 2008, 09:18:19 AM »

Did you know that Python was developed by a dutchman, Guido van Rossum who now works at Google?
http://www.python.org/~guido/
Yeah, and he is my best idol Tongue
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!