Wannabe Python Programmer - Please Help !

Status
Not open for further replies.
Hello Everybody.

After studying C when I was 12 in a crash course, learning Visual Basic 6.0 for a tiny period at school(and hating it), studying C++ at school (Turbo C++), experimenting a lot with Glade interface designer by making simple GUIs, and finally trying QT4 for a very short time, I decided that my next destination should be Python, and like C++, I must learn this one completely.

My Current Programming Tools:

1. Ubuntu Hardy Heron with default kernel and Gnome/KDE/Xfce/IceWM/FluxBox
2. Wikibooks edition of how to program with Python
3. PyPE - Python Program Editor
4. Gedit and Kate

Questions:

1. What else should I install to start writing and running programs in Python ?

2. Upto what scale is python's GUI programmable ?

3. How do I run python scripts in the terminal ?

4. How do I compile python scripts and make binaries, instead of letting them remain as .py files and running them ?

5. What is the difference between the architecture, speed of running and advantages of binary python programs and python scripts ?

6. What are the other resources(sites, programs, books, ebooks, etc) available to help me learn python programming ?

7. Whats the actual scope of learning python ? How can it be benifitial to me ?

8. Is it possible to compile python programs under windows environment for windows without using MinGW ? I need something like a drag and drop GUI prog that just accepts a python script and attempts to compile it. If successful, a binary is created. Else error message. Its really great if the program allows me to specify an icon for the executable.

9. Any GUI designer using (and only using) python for linux ? I want something that acts like a visual IDE, where I can drag and drop widgets in a window, create buttons, assign tasks for buttons, make text boxes, input areas, etc.


10. How long will it take me to learn python scripting/programming completely ? I heard some say that it can be learnt to a good level in 6 months ? Is it true ?
 

Pathik

Google Bot
1. Its installed already
3. $ python script.py
7. Use IDLE
6. A byte of python, Dive into python
 

mehulved

18 Till I Die............
1. Ubuntu Hardy Heron with default kernel and Gnome/KDE/Xfce/IceWM/FluxBox
2. Wikibooks edition of how to program with Python
3. PyPE - Python Program Editor
4. Gedit and Kate
Python Interpreter and a text editor are good to begin with, you don't need IDE's now.
For books, there's also Core Python Programming.
Questions:

1. What else should I install to start writing and running programs in Python ?
Start with the interpreter

2. Upto what scale is python's GUI programmable ?
Python has no GUI capabilities on it's own, it can use various GUI toolkits like GTK, Qt, tk, etc. You can also use Java's UI by using jython
3. How do I run python scripts in the terminal ?
Just create a python script beginning with a she-bang and execute it.

4. How do I compile python scripts and make binaries, instead of letting them remain as .py files and running them ?
Python can only be byte-compiled. Look for compilers like psyco

5. What is the difference between the architecture, speed of running and advantages of binary python programs and python scripts ?
Depends on various factors.

6. What are the other resources(sites, programs, books, ebooks, etc) available to help me learn python programming ?
wikipedia, byte of python, CPP, dive into python, docs.python.org are some to start with.

7. Whats the actual scope of learning python ? How can it be benifitial to me ?
You should know, you decided to select python.

8. Is it possible to compile python programs under windows environment for windows without using MinGW ? I need something like a drag and drop GUI prog that just accepts a python script and attempts to compile it. If successful, a binary is created. Else error message. Its really great if the program allows me to specify an icon for the executable.
Well python runs on windows too, it has native windows executable too.

The first step : Goto IRC and ask Qwerty or Sykora.

There's also #python and a lot of python users on linux channels. And devmodem doesn't visit #think-digit, else he's another python geek.
 

victor_rambo

हॉर्न ओके प्लीज़
Guyz, I am completely alien to python. Can you give some preliminary info about it.

1. Is Python a client-side(like javascript), server side(like PHP/PERL) or is it desktop(like C/C++)

2. If I make a python program and give it away to someone, do I need its interpreter to be installed on that other person's computer?

Thank you!
 

FilledVoid

Who stole my Alpaca!
For books, there's also Core Python Programming.
On IRC I think Mehulved and me are at the same pace although hes starting to overtake me now :D. I'm kind of stuck with some assignments now but other than that we both are learning Python when we get free time and we both use Core Python programming as well.

1. Is Python a client-side(like javascript), server side(like PHP/PERL) or is it desktop(like C/C++)
if I understand correctly all of them together.
2. If I make a python program and give it away to someone, do I need its interpreter to be installed on that other person's computer?
Yes.
 

praka123

left this forum longback
MetalheadGautham said:
9. Any GUI designer using (and only using) python for linux ? I want something that acts like a visual IDE, where I can drag and drop widgets in a window, create buttons, assign tasks for buttons, make text boxes, input areas, etc.
@gowtham:you may be interested in gambas although it isnt related ;)
*gambas.sourceforge.net/
 
@mehulved:

1. Whats she-bang ?

2. I only know that python is usable for websites, linux programming, scripting and making simple GUIs. I wanted to know if I missed something,

3. If I remember the wikibooks page right, python does have simple GUI capabilities. You can create buttons, windows, etc.
 
Last edited:

mehulved

18 Till I Die............
Guyz, I am completely alien to python. Can you give some preliminary info about it.

1. Is Python a client-side(like javascript), server side(like PHP/PERL) or is it desktop(like C/C++)
For desktop scripting, you have python interpreter and for apache there's mod_python, mod_cgi, etc. Not sure of other web servers. Then I believe frameworks like Django, Turbogears, etc have their inbuilt web servers.
2. If I make a python program and give it away to someone, do I need its interpreter to be installed on that other person's computer?
I believe, yes.
 

FilledVoid

Who stole my Alpaca!
1. Whats she-bang ?

#!/usr/bin/env python

2. I only know that python is usable for websites, linux programming, scripting and making simple GUIs. I wanted to know if I mixed something,

3. If I remember the wikibooks page right, python does have simple GUI capabilities. You can create buttons, windows, etc.
*wiki.python.org/moin/GuiProgramming . Further you might want to clarify what you meant by " I wanted to know if I mixed something,"

Thanks FilledVoid
No problem.
 

Sykora

I see right through you.
@Metalhead :

4. How do I compile python scripts and make binaries, instead of letting them remain as .py files and running them ?

You can't. There is no such thing as a "python binary". There are some ways a making a pseudo-binary, but what that amounts to is bundling the interpreter along with the script.

As far as GUI is concerned, python is shipped with TK, which can do most of the basic GUI stuff. If you want anything which is more production-grade, You can try the other toolkits. As you said that you've done QT before, you should go for pyqt first.

@mehulved : psyco is a jit compiler, not a general-purpose one.
 

karmanya

Journeyman
^true, as far as i know, python is self executing, the .py files execute.
I have an ebook that answered all my python questions. *www.ibiblio.org/swaroopch/byteofpython/read/
 

QwertyManiac

Commander in Chief
1. Is Python a client-side(like javascript), server side(like PHP/PERL) or is it desktop(like C/C++)
Its server side and you can use it for web-dev just like you use PHP. Except that you might need a framework or build your own ways.

2. If I make a python program and give it away to someone, do I need its interpreter to be installed on that other person's computer?

Not quite the "yes". Programs like py2exe for Windows package the required DLLs and files all together so that the computer its distributed to doesn't even need Python or the imported modules installed locally. Its all bundled. Not sure if this is also the case with other platforms.

karmanya said:
^true, as far as i know, python is self executing, the .py files execute.
Nope they are not executed and are interpreted instead. Setting them to executable does not help unless there are environment variables or hash-bangs and such set to direct the file to the python interpreter for being interpreted.

Python is PERL with readability and is Java without the syntax nightmare. In a way of course. Just stop eval()ing and get exec()ing already.
 

sourav123

Thinking Different
Python is PERL with readability and is Java without the syntax nightmare. In a way of course. Just stop eval()ing and get exec()ing already.

That's not fair. Perl is highly readable if coded properly. But Perl programmers are lazy like me. :)
 

QwertyManiac

Commander in Chief
Even if you are lazy you write readable code in Python. The language itself is built on readable grounds, I know its not fair to say it, but many do when asked for a comparision, I did say "in a way".

Also what it implied was PERL could do the same what Python can and perhaps even more but the readability factor makes it better in areas where you need to maintain it over long time. Its not only from me, but also from various books and online exchanges.

Do read the Zen of Python for more information. ("import this") in Python.
 
Status
Not open for further replies.
Top Bottom