Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Oct 2014, 23:09
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Starting out with Python programming
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
sarakay

Joined: 22 Aug 2009
Posts: 20

PostPosted: Mon 26 Oct 2009, 23:46    Post_subject:  Starting out with Python programming
Sub_title: Do I have all, or at least, enough libraries?
 

An app that I wanted to run required Python, so I downloaded and installed the following pets:

python-2.5.2.pet
libdb-4.4.pet
pycairo-1.4.12.pet
pygobject-2.14.1.pet
pygkt-2.12.pet
TclTk-patched4py-8.4.pet

So now that I have these, I'm thinking, why not dabble in a little Python? Just wondering if I have most of what I need to get started. (Not sure whether the libdb pet is required for Python or just for the application.)

Thanks!
Sara
Back to top
View user's profile Send_private_message 
disciple

Joined: 20 May 2006
Posts: 6439
Location: Auckland, New Zealand

PostPosted: Tue 27 Oct 2009, 00:38    Post_subject:  

Quote:
why not dabble in a little Python?

Only because you want to make something generally useful to the Puppy community Smile, in which case you would try Genie instead.

Quote:
Just wondering if I have most of what I need to get started.

Yes, you have what you need to create simple applications with python and pygtk, and all those other things. The trouble with Python is just that most programs use all sorts of extra libraries and bindings that you need to install to use them.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send_private_message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Tue 27 Oct 2009, 07:10    Post_subject:  

You could use Python
http://puppylinux.org/wikka/Python

Genie has advantages
http://puppylinux.org/wikka/GenieProgramming

_________________
Puppy WIKI
Back to top
View user's profile Send_private_message Visit_website 
sarakay

Joined: 22 Aug 2009
Posts: 20

PostPosted: Wed 28 Oct 2009, 15:27    Post_subject:  

Thanks for your replies, disciple and Lobster.

Could I ask a couple more questions? I have a lot of experience with procedural languages - assembler, COBOL, Basic (yes, I know), and a little bit of C, but I am a complete newbie to object oriented programming. Would Genie be good to learn OOP? Do you guys know of a good tutorial or book for learning OOP concepts?

I found some books on Amazon that teach OOP using C++. Would it be better to learn C++ first and then go on to Genie?

Sara
Back to top
View user's profile Send_private_message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Wed 28 Oct 2009, 22:46    Post_subject:  

Quote:
Would it be better to learn C++ first and then go on to Genie?


You are still thinking procedurally
Do both Wink

_________________
Puppy WIKI
Back to top
View user's profile Send_private_message Visit_website 
caleb72

Joined: 15 May 2009
Posts: 57

PostPosted: Thu 29 Oct 2009, 02:17    Post_subject:  

I taught myself OO by using Smalltalk, I have many books that I collected on Smalltalk in that time.

But I found Python was a wonderfully forgiving teacher of OO especially as you can freely blend procedural with OO. Personally, I think the ability to do both in one development tool is the best of both worlds.

The reason I think Python might be a better start to learning OO is that Genie is pretty fresh/raw right now - not much good documentation, limited examples. Whereas Python not only has huge piles of documentation on the subject, it also has a wonderful interactive interpreter that allows you to tap out and test all sorts of constructions as you're learning without going through the whole source file, compile business.

If you can become comfortable with the white-space sensitive Python, it will also make a smoother transition to Genie.

This is just the perspective of a mediocre hobby programmer and I never went down the Jave, C#, C++ route so that's a whole experience that I can't balance against the route that I took, so take my ramblings with a grain of salt.

Regards
Caleb
Back to top
View user's profile Send_private_message 
ITAmember

Joined: 13 Sep 2009
Posts: 168
Location: The middle of a cornfield

PostPosted: Tue 03 Nov 2009, 21:40    Post_subject:  

Python really is a fantastic language and you should do your best to learn it, despite what some other python haters say. When you become proficient with it I recommend learning vala which should be reasonably mature by the time you learn Python. I personally don't like genie as it's a hybrid of C++ and Python syntax which leads to rather strange abomination. If genie was to be less C++ and more Python it would be much nicer.
Back to top
View user's profile Send_private_message 
sarakay

Joined: 22 Aug 2009
Posts: 20

PostPosted: Wed 04 Nov 2009, 23:56    Post_subject:  

Thanks guys. It seems that the big advantage to Python is that there's lots of help available in the form of tutorials, books, forums etc. So it makes sense to start there, and apply that knowledge later on to Vala and Genie. I'm all set with a Python sfs (learned how to make one out of a pet today! My newbie-self is so proud!) and a tutorial so with any luck will be able to get beyond "Hello, world!" soon.

Lobster said:
Quote:
You are still thinking procedurally

(Sigh.) What can I say? I'm one of those people who organizes grocery lists by store aisle to increase efficiency. Object oriented programming may be a huge challenge.
Back to top
View user's profile Send_private_message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Thu 05 Nov 2009, 01:35    Post_subject:  

Quote:
My newbie-self is so proud!


Smile
You have made a good choice.
Good luck.

Even though I finally understand why object orientated programming is clever, I still can not make use of it (that would take real skill).

It is something like this.
Imagine a procedure that was designed to
work across a range of potentaial calls
The ability to recognise patterns would enabe it to recognise patterns
in sound, voice and a database of saved files.
In effect one procedure is doing 3 very different things.
The thread can be used simultaneously.

Efficient and cool if you can create such a procedure . . .

_________________
Puppy WIKI
Back to top
View user's profile Send_private_message Visit_website 
Minnesota

Joined: 11 Sep 2008
Posts: 313

PostPosted: Thu 05 Nov 2009, 19:46    Post_subject: VB
Sub_title: is Python anything like vb
 

I have a question... I used to teach vb5 and vb6... yes from the other folks...of course a very oo language, frankly seemed easy to learn and use once you understand it is more or less an interrup or focus language. "Basic" in the background.

Is Python anywhere similar? I would like to do some programming in Puppy.. have followed the various suggestions for several years, downloaded some of the documentation.. still have not dropped my feet into the waters. Have done a ton of programming systems with Access and vb in the background... are we talking about any similar capabilities?

I really don't at my age, want to bit twiddle... and learn complex syntax.

Thanks,
Back to top
View user's profile Send_private_message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Thu 05 Nov 2009, 21:41    Post_subject:  

You could try out the pets for Python here:
http://www.murga-linux.com/puppy/viewtopic.php?p=358618#358618

Python syntax should be easy enough.
However Python requires 30MB of support files to run.
Those support files are not in Puppy.
Genie is the nearest equivalent.

Gambas may suit you and apparently the support run time file required is
about 250k and Gposil has flirted with making this available for
Dpup (the run time not the complete Gambas) Smile

_________________
Puppy WIKI
Back to top
View user's profile Send_private_message Visit_website 
ITAmember

Joined: 13 Sep 2009
Posts: 168
Location: The middle of a cornfield

PostPosted: Thu 05 Nov 2009, 22:17    Post_subject:  

@minnesota

Python bears some resemblance to basic on the syntax level but the inner workings are very different. I do think you will find yourself presently surprised with the power of Python however.



A few definitions...

Procedural: executing statements in a linear nature. (lots of variable assignments)
OOP: a way of abstracting and encapsulating procedures. (invaluable on large projects)
Functional: the entire program is made of nested expressions. Very few variable assignments. None of the languages discussed thus far are functional btw.
Back to top
View user's profile Send_private_message 
edexter

Joined: 25 Nov 2009
Posts: 8

PostPosted: Wed 25 Nov 2009, 17:17    Post_subject:  

hopefully this isn't to late to be useful. I use python alot on windows and will probably see what wine would do to the windows version first. On your list you probably want wxpython it is very useful and you will want pygame (sdl). it is possible pygame will not work on some older laptop graphics cards.

you might try pysh a shell with python embeded in it, I was going to add that as one of my very first items to my setup.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0766s ][ Queries: 12 (0.0066s) ][ GZIP on ]