Python ver 2.4 - programming language

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
keenerd
Posts: 176
Joined: Sat 20 Aug 2005, 19:24

Python ver 2.4 - programming language

#1 Post by keenerd »

Highly packed but barely cut, this is nearly all of Python crammed into 2.7Mb.

Python is an entirely opensource language. The code is highly readable and very powerful. It comes with an interactive environment.

I haven't included any demonstation scripts, but to get an idea of how powerful this language is, try the following:
Open a console and run 'python'. Interactive Python will start.
Enter 2**100000
You just raised 2 to the one hundred thousandth power. The resulting number is roughly 10 pages long. It only took a minute to calculate this monster on my P2.

There are only a few things missing. You won't notice them unless you are writing programs (IDLE was cut) and you really won't notice anything is gone unless you are working to develop the next version of Python. (All of the sources were removed.)

I would like to get the package under 1Mb, but I am uncertain of which libraries to cut. (Any experienced Python hackers?) Also, there is one bug in the package: the menu item is not added. So you'll need to open a console and type "idle" or "python".

Stay tuned to this thread, I'll be releasing any good Python scripts I find here.

(The file size limit on the forums is too low, hosting the dotpup from my own webspace. And if the server does something dumb like change it to a .zip, just change the extension back to .pup I'll get it sorted out eventually.)
http://www.pages.drexel.edu/~kmk592/python2.4.pup

Mirror:
http://dotpups.de/dotpups/Programming/python2.4.pup
Last edited by keenerd on Wed 19 Apr 2006, 16:53, edited 1 time in total.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

Re: Python ver 2.4

#2 Post by rarsa »

Great!

I actually outside puppy do most my scripting in Python (mostly in Windows).

It's a sweet and powerful language to work with. Unlike Perl, the syntax just feels natural to me.

Although you can write spaguetti code, and procedural, It is a full OO programming language that implements "smalltalk-like" duck typing.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#3 Post by MU »


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

#4 Post by Lobster »

Many thanks ;)
Maybe I will finish the tutorial I started here (on the basis of learn and teach)

http://peace.wikia.com/wiki/Python - some good links to tutorials there . . .

Just tried adding some Python code to Geany in Puppy 1.09 (Alpha) - I believe Beaver also has Python support. Getting it to 1 meg would be great.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#5 Post by Dougal »

I there a chance of getting an additional "developers" dotpup, containing the header files needed for compiling (probably found /usr/local/include)?

MU: any chance of getting Python in usr_devx in the future? Or is Barry responsible for that?

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#6 Post by MU »

Barry is responsible. I just converted one to work with puppy2 (different basefolder).
Basically, usr_devx just contains files needed by Puppy itself.
For example Perl is needed for this wireless stuff I think.

I also don't plan to make a programming-addon, as programming languages have quick release-cycles, so such an addon would be out of date shortly after it appears.
Mark

keenerd
Posts: 176
Joined: Sat 20 Aug 2005, 19:24

#7 Post by keenerd »

I dropped those - from what I heard they were only necessary for C++ apps that used Python.

I can include them, its only 326K. If you need anything else, just say.

Here they are as tar.gz, just extract to /
Attachments
python_headers.tar.gz
(88.74 KiB) Downloaded 442 times

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

Small

#8 Post by raffy »

That is really a small package, as the one prepared here is 10 MB.

User avatar
kwiller
Posts: 21
Joined: Thu 13 Apr 2006, 10:29
Location: Scotland

Re: Small

#9 Post by kwiller »

raffy wrote:That is really a small package, as the one prepared here is 10 MB.
I trust you were comparing the 10MB with the 2.7MB dotpup - and not the 89KB of the headers add-on archive! :D
But yes, this dotpup is a space saver and I'm using it as the basis of the PupGet Python package I'll be including in the next release of KwillerPup.
Now what I need is a way to reduce the size of the TeTeX package! :wink:

keenerd
Posts: 176
Joined: Sat 20 Aug 2005, 19:24

#10 Post by keenerd »

I may also release a less-trimmed version. I think that was about 4.3 Mb, compressed.

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#11 Post by Dougal »

keenerd wrote:I dropped those - from what I heard they were only necessary for C++ apps that used Python.

I can include them, its only 326K. If you need anything else, just say.

Here they are as tar.gz, just extract to /
Thanks, mate.

User avatar
RobertB
Posts: 145
Joined: Tue 03 Jan 2006, 01:06
Location: Big D
Contact:

#12 Post by RobertB »

This may not be directly related to Python (slap me down if it's not), but hopefully it's close.

I downloaded pyRadar, a Python app that downloads NOAA radar data. I followed the readme instructions and "make install" appeared to run successfully. But when I run the program (from any of the possible paths), I get this error:

Code: Select all

File "/usr/local/lib/pyRadar/pyRadar.py", line 28, in ?
import gobject
ImportError: No module named gobject
A quick Googling for "gobject" turned up some links (including a Wikipedia article) that point to gobject being a pretty low-level library... not the sort of thing I'd want to install in Puppy without some sort of warm fuzzy that I won't break anything. No results in searching the forums for "gobject", unfortunately.

Is this something that's a common part of a typical Python program, or is it something a bit more exotic? More importantly, am I on the right track for finding the module I would need to install, and can I be reasonably sure it won't upset my Puppy?

r__hughes
Posts: 359
Joined: Thu 13 Apr 2006, 04:14
Location: Montreal, Canada

#13 Post by r__hughes »

RobertB wrote: .... when I run the program (from any of the possible paths), I get this error:

Code: Select all

File "/usr/local/lib/pyRadar/pyRadar.py", line 28, in ?
import gobject
ImportError: No module named gobject
Is this something that's a common part of a typical Python program, or is it something a bit more exotic? More importantly, am I on the right track for finding the module I would need to install, and can I be reasonably sure it won't upset my Puppy?
GObjects are rather exotic graphic subclasses of Python's PyGTK (never used them myself) - see if this makes it all clear -

http://www.sicem.biz/personal/lgs/docs/ ... html#d0e93

User avatar
RobertB
Posts: 145
Joined: Tue 03 Jan 2006, 01:06
Location: Big D
Contact:

#14 Post by RobertB »

Good reference. It explains the concept nicely, and in a way that I could probably decipher the code from it. What's missing, though, is a link to a handy .gz file that I can pop into Puppy to make it work...

In the "bibliography" section, though, there's a link to a page that in turn contains this info:
http://www.le-hacker.org/papers/gobject/ch07s03.html
GLib 2.6.x releases

This version is under development and temporary snapshots can be found in the Gnome CVS server under the version name 2.5.x.
This makes me wonder if I would be spinning my wheels trying to tease this bit out of Gnome, only to have it choke on other dependencies. I don't have enough experience with the various windowing systems in Linux to know my way around yet. I guess I'll hang back and see if anything develops.

pythoncoder
Posts: 59
Joined: Thu 09 Mar 2006, 17:53
Location: UK

#15 Post by pythoncoder »

In my opinion gobject is not part of the standard Python library. I have the full Active Python distribution here, and it's not included. More to the point, as far as I can see it doesn't appear in the official Python Library Reference.
http://docs.python.org/lib/lib.html

So I suspect it's an extension developed by an independent programmer.

Most Python libraries are written in Python and installation is simply a matter of putting the gobject.py file in one of the folders specified in sys.path, which is Python's search path for modules.

Pete

Post Reply