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 26 Nov 2014, 11:17
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Misc
Python
Moderators: Flash, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
Lobster
Official Crustacean


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

PostPosted: Tue 04 Nov 2008, 01:33    Post_subject:  Python
Sub_title: Programming intro
 



I was pleased that BarryK is experimenting with Python and may include it in 'Woof' his new puplet.
I did a lot of research into programming languages and concluded that ASQ (A real time AI programming ideology) is some way in the future.
Meanwhile Python is a widespread and widely used from beginner to serious programmer

Here is my intro to the programming language that was named after 'Monty Pythons Flying Circus' - yes really
http://peace.wikia.com/wiki/Python

Python 4 Puppy
http://www.murga-linux.com/puppy/viewtopic.php?p=209578#209578

Anyway I thought this would be a thread for those willing to learn and experiment and share . . .

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

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Thu 06 Nov 2008, 01:01    Post_subject:  

full python with Idle no cutting corners removing files
works on version 3 series puppy and version 4.00
http://www.murga-linux.com/puppy/viewtopic.php?search_id=13254954&t=31558


had to make a special tlc tk package to get the green light for all dependencies


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


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

PostPosted: Thu 06 Nov 2008, 03:10    Post_subject:  

thanks big_bass
eh . . . 'python' at console should run it right?
Does not seem to?

Smile

Will start reminding myself how 'most excellent'
Python is whilst also reminding myself how we used to have tcl ('tickle')
I found tcl an underated and underused language,
perhaps a bit complex

Barry has mentioned a Python compiler
any good ones (yep they tell you NOT to compile Python but then
someone writes a compiler anyway)

One other thing is this the new Python?
There have been some recent language revisions - or is that not out yet?

Anyway many thanks for that link Smile
Will keep me away from the dreaded XUL . . .

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


Joined: 30 Dec 2006
Posts: 1844
Location: South Australia

PostPosted: Thu 06 Nov 2008, 05:28    Post_subject:  

Hi Lobster,

I have been having a play with Python, looks pretty good.

I see the current version is 2.6 released on 10 Oct 2008.

Tutorial Here > http://docs.python.org/tutorial/

_________________
Puppy Software <-> Distros <-> Puppy Linux Tips
Back to top
View user's profile Send_private_message Visit_website 
steve_s


Joined: 26 May 2008
Posts: 1545
Location: Austin, TX, USA

PostPosted: Thu 06 Nov 2008, 12:01    Post_subject:  

Great thread! I've just started learning python myself as my first programming language...good job!

Edit: thanks to Puppy! With this forum and Puppy I threw together a 4.1 remaster with 2.5 Python, idle and all...very easy! Awesome!
python-screenshot.jpg
 Description   
 Filesize   63.56 KB
 Viewed   1585 Time(s)

python-screenshot.jpg


Edited_times_total
Back to top
View user's profile Send_private_message Visit_website 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Thu 06 Nov 2008, 12:09    Post_subject:  

Quote:
"Lobster"]thanks big_bass
eh . . . 'python' at console should run it right?
Does not seem to?


you were correct uninstall and install this one
I re uploaded the working pet
there was a mix up while uploading
but all is ok now

I just tested on puppy 4.1

# md5sum python-2.5.2.pet
344d156d4b40b95402e954e102b908b5


get it from this thread
http://www.murga-linux.com/puppy/viewtopic.php?search_id=13254954&t=31558
I added a menu entry to run the GUI IDLE
python installed on puppy 4.1.png
 Description   
 Filesize   20.76 KB
 Viewed   6639 Time(s)

python installed on puppy 4.1.png

python in menu.png
 Description   
 Filesize   60.7 KB
 Viewed   6659 Time(s)

python in menu.png

python idle.png
 Description   
 Filesize   10.69 KB
 Viewed   6648 Time(s)

python idle.png

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


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

PostPosted: Fri 07 Nov 2008, 08:42    Post_subject:  

Thanks Big_bass

I tried Psycho Shocked (against psychiatric advice)
(python speedup - jit type compiler)

unzip the enclosed zip file
then move the directory
psyco-dist
to
/usr/lib/python2.5/site-packages/psyco-dist

now put
Code:
try:
    import psyco
    psyco.full()
except:
    pass

at the top of your .py programs?

Faster?
How much any test code results?
psyco-snapshot.tar.gz
Description 
gz

 Download 
Filename  psyco-snapshot.tar.gz 
Filesize  354.98 KB 
Downloaded  540 Time(s) 

_________________
Puppy WIKI
Back to top
View user's profile Send_private_message Visit_website 
Lobster
Official Crustacean


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

PostPosted: Fri 07 Nov 2008, 12:27    Post_subject:  

This is a great and simple reminder for those with existing programming skills - a simple Python crib sheet image
http://tmxxine.com/wik/wikka.php?wakka=PythonASQ

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

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sun 09 Nov 2008, 23:37    Post_subject:  

Ipython is an enhanced interactive shell ( making life easier )

download ipython
http://www.puppylinux.ca/tpp/big_bass/ipython-0.9.1.pet

the picture will show you how to launch it

run it from geany

or if you like a launch script
#exec /root/ipython-0.9.1/ipython.py
run_from_geany.png
 Description   
 Filesize   116.93 KB
 Viewed   6430 Time(s)

run_from_geany.png

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


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

PostPosted: Mon 10 Nov 2008, 20:54    Post_subject:  

After reading the PDF here article about IPython
http://ipython.scipy.org/moin/Documentation
this makes me even more keen on Python.
A great find Big_Bass, many thanks for creating the .pet

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

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Tue 11 Nov 2008, 00:19    Post_subject:  

Lobster wrote:
After reading the PDF here article about IPython
http://ipython.scipy.org/moin/Documentation
this makes me even more keen on Python.
A great find Big_Bass, many thanks for creating the .pet



Hey Lobster

Glad to hear
I built the GUI wxPYthon today its here
if you need it has some nice demos also to have fun with
http://www.murga-linux.com/puppy/viewtopic.php?search_id=13254954&t=31558


big_bass
Back to top
View user's profile Send_private_message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7083
Location: Perth, Western Australia

PostPosted: Tue 11 Nov 2008, 06:44    Post_subject:  

Here's something new to play with, 'tinypy':

http://murga-linux.com/puppy/viewtopic.php?t=35446

_________________
http://bkhome.org/news/
Back to top
View user's profile Send_private_message Visit_website 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Tue 11 Nov 2008, 11:28    Post_subject:  

BarryK wrote:
Here's something new to play with, 'tinypy':

http://murga-linux.com/puppy/viewtopic.php?t=35446


Thanks Barry K
for the pet package




here is something to make python user friendly
ROX needs these MIME types to click launch

.py with geany
and .pyc to launch when clicked on in ROX

I made the correct MIME-types and made a patch pet here
http://www.puppylinux.ca/tpp/big_bass/python-MIME-ROX-1.0.pet

big_bass
Back to top
View user's profile Send_private_message 
Shep

Joined: 08 Nov 2008
Posts: 851
Location: GIRT-BY-SEA

PostPosted: Wed 19 Nov 2008, 23:23    Post_subject:  

big_bass wrote:
download ipython
http://www.puppylinux.ca/tpp/big_bass/ipython-0.9.1.pet
. . .

or if you like a launch script
#exec /root/ipython-0.9.1/ipython.py

I wanted a python I can run from the shell prompt, so ....

I installed as above and the install seemed to go okay. But when I open a terminal window and type

exec /root/ipython-0.9.1./ipython.py

the window instantly closes (i.e., disappears).

Can I find a log of error messages somewhere that will enlighten me as to why my python's not happy?

# ls -l /root/ipython-0.9.1/ipython.py
-rwxr-xr-x 1 33212 20665 420 2008-06-02 15:40 /root/ipython-0.9.1/ipython.p
Back to top
View user's profile Send_private_message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Fri 21 Nov 2008, 21:42    Post_subject:  

Quote:
I installed as above and the install seemed to go okay. But when I open a terminal window and type

exec /root/ipython-0.9.1./ipython.py

the window instantly closes (i.e., disappears).





you need the full python here first
http://www.murga-linux.com/puppy/viewtopic.php?search_id=13254954&t=31558
this has idle GUI pre installed in the menu


then if you want the ipython shell too add that after



big_bass
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Taking the Puppy out for a walk » Misc
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.0830s ][ Queries: 12 (0.0039s) ][ GZIP on ]