Python

Puppy related raves and general interest that doesn't fit anywhere else
Post Reply
Message
Author
User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Python

#1 Post by Lobster »

Image

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/viewto ... 578#209578

Anyway I thought this would be a thread for those willing to learn and experiment and share . . .
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#2 Post by big_bass »

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/viewto ... 54&t=31558


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


big_bass

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#3 Post by Lobster »

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 . . .
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#4 Post by smokey01 »

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/

User avatar
steve_s
Posts: 1595
Joined: Mon 26 May 2008, 13:29
Location: Austin, TX, USA
Contact:

#5 Post by steve_s »

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!
Attachments
python-screenshot.jpg
(63.56 KiB) Downloaded 2137 times
Last edited by steve_s on Thu 06 Nov 2008, 16:18, edited 2 times in total.

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#6 Post by big_bass »

"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/viewto ... 54&t=31558
I added a menu entry to run the GUI IDLE
Attachments
python installed on puppy 4.1.png
(20.76 KiB) Downloaded 7248 times
python in menu.png
(60.7 KiB) Downloaded 7275 times
python idle.png
(10.69 KiB) Downloaded 7297 times

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#7 Post by Lobster »

Thanks Big_bass

I tried Psycho :shock: (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: Select all

try:
    import psyco
    psyco.full()
except:
    pass
at the top of your .py programs?

Faster?
How much any test code results?
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#8 Post by Lobster »

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 Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#9 Post by big_bass »

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
Attachments
run_from_geany.png
(116.93 KiB) Downloaded 7054 times

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#10 Post by Lobster »

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 Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#11 Post by big_bass »

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/viewto ... 54&t=31558


big_bass

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#12 Post by BarryK »

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

http://murga-linux.com/puppy/viewtopic.php?t=35446
[url]https://bkhome.org/news/[/url]

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#13 Post by big_bass »

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/p ... OX-1.0.pet

big_bass

Shep
Posts: 878
Joined: Sat 08 Nov 2008, 07:55
Location: Australia

#14 Post by Shep »

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

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#15 Post by big_bass »

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/viewto ... 54&t=31558
this has idle GUI pre installed in the menu


then if you want the ipython shell too add that after



big_bass

wosifat
Posts: 104
Joined: Sun 29 Jun 2008, 22:15
Location: Madison Heights, VA
Contact:

#16 Post by wosifat »

Whenever I try to download it, it gives me "Concurrent download limit exceeded."

Post Reply