 |
30-05-2008, 12:49 AM
|
#1 (permalink)
|
|
The Smaller Bang
Join Date: Sep 2007
Location: Gautham City
Posts: 7,490
|
Wannabe Python Programmer - Please Help !
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 ?
__________________
http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
|
|
|
|
Advertisements. Register and be a member of the community to get rid of them.
|
|
Advertisement
|
|
30-05-2008, 01:05 AM
|
#2 (permalink)
|
|
Google Bot
Join Date: Aug 2005
Posts: 9,772
|
Re: Wannabe Python Programmer - Please Help !
The first step : Goto IRC and ask Qwerty or Sykora.
__________________
My new blog: www.pathikshah.com
|
|
|
30-05-2008, 01:06 AM
|
#3 (permalink)
|
|
The Smaller Bang
Join Date: Sep 2007
Location: Gautham City
Posts: 7,490
|
Re: Wannabe Python Programmer - Please Help !
Quote:
Originally Posted by Pathik
The first step : Goto IRC and ask Qwerty or Sykora.
|
Sykora ? I thought Qwerty was the only Python geek around ?
__________________
http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
|
|
|
30-05-2008, 01:10 AM
|
#4 (permalink)
|
|
Google Bot
Join Date: Aug 2005
Posts: 9,772
|
Re: Wannabe Python Programmer - Please Help !
1. Its installed already
3. $ python script.py
7. Use IDLE
6. A byte of python, Dive into python
__________________
My new blog: www.pathikshah.com
|
|
|
30-05-2008, 01:27 AM
|
#5 (permalink)
|
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
Re: Wannabe Python Programmer - Please Help !
Quote:
Originally Posted by MetalheadGautham
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.
Quote:
Originally Posted by MetalheadGautham
Questions:
1. What else should I install to start writing and running programs in Python ?
|
Start with the interpreter
Quote:
Originally Posted by MetalheadGautham
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
Quote:
Originally Posted by MetalheadGautham
3. How do I run python scripts in the terminal ?
|
Just create a python script beginning with a she-bang and execute it.
Quote:
Originally Posted by MetalheadGautham
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
Quote:
Originally Posted by MetalheadGautham
5. What is the difference between the architecture, speed of running and advantages of binary python programs and python scripts ?
|
Depends on various factors.
Quote:
Originally Posted by MetalheadGautham
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.
Quote:
Originally Posted by MetalheadGautham
7. Whats the actual scope of learning python ? How can it be benifitial to me ?
|
You should know, you decided to select python.
Quote:
Originally Posted by MetalheadGautham
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.
Quote:
Originally Posted by Pathik
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.
__________________
http://www.bash.org/?258908
|
|
|
30-05-2008, 01:37 AM
|
#6 (permalink)
|
|
हॉर्न ओके प्लीज़
Join Date: Sep 2007
Posts: 1,493
|
Re: Wannabe Python Programmer - Please Help !
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!
__________________
विक्टर रॅंबो - चाणकया प्रभावित व्यक्ति
गीक होना माँगता
|
|
|
30-05-2008, 01:39 AM
|
#7 (permalink)
|
|
Who stole my Alpaca!
Join Date: Jan 2005
Location: Kerala
Posts: 2,020
|
Re: Wannabe Python Programmer - Please Help !
Quote:
|
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  . 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.
Quote:
|
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.
Quote:
|
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.
__________________
The Ultimate Chess Strategy : "Hit Hard, Hit Fast and Hit Often"
|
|
|
30-05-2008, 01:48 AM
|
#8 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
Re: Wannabe Python Programmer - Please Help !
Quote:
|
Originally Posted by MetalheadGautham
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
http://gambas.sourceforge.net/
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
|
|
|
30-05-2008, 01:49 AM
|
#9 (permalink)
|
|
The Smaller Bang
Join Date: Sep 2007
Location: Gautham City
Posts: 7,490
|
Re: Wannabe Python Programmer - Please Help !
@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.
__________________
http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
Last edited by MetalheadGautham; 30-05-2008 at 02:06 AM.
Reason: typo :x
|
|
|
30-05-2008, 01:52 AM
|
#10 (permalink)
|
|
हॉर्न ओके प्लीज़
Join Date: Sep 2007
Posts: 1,493
|
Re: Wannabe Python Programmer - Please Help !
Thanks FilledVoid
__________________
विक्टर रॅंबो - चाणकया प्रभावित व्यक्ति
गीक होना माँगता
|
|
|
30-05-2008, 02:01 AM
|
#11 (permalink)
|
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
Re: Wannabe Python Programmer - Please Help !
Quote:
Originally Posted by rohan_shenoy
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.
Quote:
Originally Posted by rohan_shenoy
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.
__________________
http://www.bash.org/?258908
|
|
|
30-05-2008, 02:03 AM
|
#12 (permalink)
|
|
Who stole my Alpaca!
Join Date: Jan 2005
Location: Kerala
Posts: 2,020
|
Re: Wannabe Python Programmer - Please Help !
#!/usr/bin/env python
Quote:
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.
|
http://wiki.python.org/moin/GuiProgramming . Further you might want to clarify what you meant by " I wanted to know if I mixed something,"
No problem.
__________________
The Ultimate Chess Strategy : "Hit Hard, Hit Fast and Hit Often"
|
|
|
30-05-2008, 02:05 AM
|
#13 (permalink)
|
|
The Smaller Bang
Join Date: Sep 2007
Location: Gautham City
Posts: 7,490
|
Re: Wannabe Python Programmer - Please Help !
Quote:
Originally Posted by FilledVoid
#!/usr/bin/env python
|
I use that on all python programs I wrote. Miracle I don't know what its for.
Quote:
Originally Posted by FilledVoid
|
typo. Its missed something. double oops
__________________
http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
|
|
|
30-05-2008, 02:17 AM
|
#14 (permalink)
|
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
Re: Wannabe Python Programmer - Please Help !
Quote:
Originally Posted by MetalheadGautham
@mehulved:
1. Whats she-bang ?
|
Here's what it actually is http://en.wikipedia.org/wiki/Shebang_(Unix)
__________________
http://www.bash.org/?258908
|
|
|
30-05-2008, 05:06 AM
|
#15 (permalink)
|
|
The Smaller Bang
Join Date: Sep 2007
Location: Gautham City
Posts: 7,490
|
Re: Wannabe Python Programmer - Please Help !
Quote:
Originally Posted by praka123
|
thanks, will try.
(sry 4 late reply, me not a link checker)
__________________
http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
|
|
|
30-05-2008, 08:54 AM
|
#16 (permalink)
|
|
I see right through you.
Join Date: Sep 2005
Location: Chennai
Posts: 597
|
Re: Wannabe Python Programmer - Please Help !
@Metalhead :
Quote:
|
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.
__________________
I didn't make the world, I only try to live in it.
http://lucentbeing.com
-- Sykora --
|
|
|
30-05-2008, 09:14 AM
|
#17 (permalink)
|
|
In The Zone
Join Date: Sep 2005
Posts: 227
|
Re: Wannabe Python Programmer - Please Help !
^true, as far as i know, python is self executing, the .py files execute.
I have an ebook that answered all my python questions. http://www.ibiblio.org/swaroopch/byteofpython/read/
__________________
Our deepest fear is not that we are inadequate Our deepest fear is that we are powerful beyond measure
|
|
|
06-06-2008, 11:34 PM
|
#18 (permalink)
|
|
Commander in Chief
Join Date: Jul 2005
Posts: 6,658
|
Re: Wannabe Python Programmer - Please Help !
Quote:
Originally Posted by rohan_shenoy
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.
Quote:
Originally Posted by rohan_shenoy
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.
Quote:
|
Originally Posted by karmanya
^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.
__________________
Harsh J
www.harshj.com
|
|
|
07-06-2008, 10:38 AM
|
#19 (permalink)
|
|
Thinking Different
Join Date: Dec 2005
Location: Bangalore, India
Posts: 156
|
Re: Wannabe Python Programmer - Please Help !
Quote:
Originally Posted by QwertyManiac
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.
__________________
There is nothing more powerful than an idea whose time has come.
|
|
|
07-06-2008, 02:34 PM
|
#20 (permalink)
|
|
Commander in Chief
Join Date: Jul 2005
Posts: 6,658
|
Re: Wannabe Python Programmer - Please Help !
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.
__________________
Harsh J
www.harshj.com
|
|
|
13-08-2008, 06:53 AM
|
#21 (permalink)
|
|
The Smaller Bang
Join Date: Sep 2007
Location: Gautham City
Posts: 7,490
|
Re: Wannabe Python Programmer - Please Help !
Hey I need hard copy of Core Python Programming. Is it available ? Where in bangalore ?
And I need dennis ritchie's C programming book too.
__________________
http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
|
|
|
13-08-2008, 08:43 AM
|
#22 (permalink)
|
|
Wahahaha~!
Join Date: Dec 2006
Location: Pune/there
Posts: 7,676
|
Re: Wannabe Python Programmer - Please Help !
Quote:
Originally Posted by MetalheadGautham
4. Gedit and Kate
|
me so loves kate but damn gnome !
|
|
|
13-08-2008, 11:27 AM
|
#23 (permalink)
|
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
Re: Wannabe Python Programmer - Please Help !
Quote:
Originally Posted by MetalheadGautham
Hey I need hard copy of Core Python Programming. Is it available ? Where in bangalore ?
And I need dennis ritchie's C programming book too.
|
Both should be available at the book stores. KnR is available quite easily at any decent book store in Mumbai, atleast.
The C Programming Language - http://www.sapnaonline.com/MoreInfoB...cID=EBK0011990
Core Python Programming - http://www.sapnaonline.com/MoreInfoB...cID=EBK0067672
__________________
http://www.bash.org/?258908
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|