Author |
Message |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Tue 04 Nov 2008, 01:33 Post subject:
Python Subject description: 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 . . .
_________________ YinYana AI Buddhism
|
Back to top
|
|
 |
big_bass
Joined: 13 Aug 2007 Posts: 1742
|
Posted: 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
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Thu 06 Nov 2008, 03:10 Post subject:
|
|
thanks big_bass
eh . . . 'python' at console should run it right?
Does not seem to?
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
Will keep me away from the dreaded XUL . . .
_________________ YinYana AI Buddhism
|
Back to top
|
|
 |
smokey01

Joined: 30 Dec 2006 Posts: 2682 Location: South Australia
|
Posted: 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/
_________________ Software <-> Distros <-> Tips <-> Newsletters
|
Back to top
|
|
 |
steve_s

Joined: 26 May 2008 Posts: 1576 Location: Austin, TX, USA
|
Posted: 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!
Description |
|
Filesize |
63.56 KB |
Viewed |
2041 Time(s) |

|
Last edited by steve_s on Thu 06 Nov 2008, 12:18; edited 2 times in total
|
Back to top
|
|
 |
big_bass
Joined: 13 Aug 2007 Posts: 1742
|
Posted: 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
Description |
|
Filesize |
20.76 KB |
Viewed |
7148 Time(s) |

|
Description |
|
Filesize |
60.7 KB |
Viewed |
7174 Time(s) |

|
Description |
|
Filesize |
10.69 KB |
Viewed |
7206 Time(s) |

|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Fri 07 Nov 2008, 08:42 Post subject:
|
|
Thanks Big_bass
I tried Psycho (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?
_________________ YinYana AI Buddhism
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: 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
_________________ YinYana AI Buddhism
|
Back to top
|
|
 |
big_bass
Joined: 13 Aug 2007 Posts: 1742
|
Posted: 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
Description |
|
Filesize |
116.93 KB |
Viewed |
6954 Time(s) |

|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: 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
_________________ YinYana AI Buddhism
|
Back to top
|
|
 |
big_bass
Joined: 13 Aug 2007 Posts: 1742
|
Posted: Tue 11 Nov 2008, 00:19 Post subject:
|
|
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
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 8529 Location: Perth, Western Australia
|
Posted: 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
|
|
 |
big_bass
Joined: 13 Aug 2007 Posts: 1742
|
Posted: Tue 11 Nov 2008, 11:28 Post subject:
|
|
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
|
|
 |
Shep
Joined: 08 Nov 2008 Posts: 880 Location: Australia
|
Posted: Wed 19 Nov 2008, 23:23 Post subject:
|
|
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
|
|
 |
big_bass
Joined: 13 Aug 2007 Posts: 1742
|
Posted: 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
|
|
 |
|