tinypy

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

tinypy

#1 Post by sc0ttman »

Tinypy is available on this forum somewhere, and I installed it, but not sure how to use it.

Everytime I type 'tinypy' in the terminal, I get this:

Code: Select all

Exception:
tp_get: KeyError: 0
If I do 'tinypy --help', I get this:

Code: Select all

Exception:
tp_load(--help)
I have installed the full package as offered by Barry K, in Puplite 5.0.

Any ideas? I don't need to be an expert, just need a little help to make it do something different!
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#2 Post by technosaurus »

It sounds like it may be looking for .py files in some directory. For more info try running
strings /pathto/tinypy
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#3 Post by sc0ttman »

technosaurus wrote:It sounds like it may be looking for .py files in some directory. For more info try running
strings /pathto/tinypy
I get a long list of incomprehensible garbage, lots of special characters in there.... Only 1 line had any info I could understand (if at all), and it says my binary is UPX'd... Would it make a difference? I guess I need one not UPX'd for 'strings' to work... Right?

This is part of what I get:

Code: Select all

UPX!
T$ éî
Ûsïu	
Ûsä1É
ðÿtv
Éu A
Ûsïu	
GIu÷é^ÿÿÿ
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#4 Post by rjbrewer »

Type tinypy up in the "search" box.

The thread by Barry has a .pet.

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#5 Post by sc0ttman »

rjbrewer wrote:Type tinypy up in the "search" box.

The thread by Barry has a .pet.
That's what I have.. But never mind all, it seems it will only accept files, not commands... it prints the help doc example fine (just a hello world .py).. so must be working.. in part at least..

I did this

Code: Select all

cd /usr/share/dos/tinypy
tinypy hello.py
and it echoed "Hello World" fine...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#6 Post by amigo »

You can use upx to decompress the binary and may get more info from it with strings.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#7 Post by technosaurus »

Thanks amigo, mi amigo.
What I was looking to see, was a file or directory name. Sometimes a directory path is hard- coded at compile time.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#8 Post by sc0ttman »

technosaurus wrote:Thanks amigo, mi amigo.
What I was looking to see, was a file or directory name. Sometimes a directory path is hard- coded at compile time.
aha... no paths in there, upx'd or not... I guess it just takes files.... And only a limited set of functions at that...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

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

#9 Post by Lobster »

limited set of functions
Part of Python is having access to a great many functions.
When this is lost, unless you are very experienced with Python,
you almost immediately have difficulties. I always found tinypy
ran only the most basic code. Even trying to use tutorial examples,
it failed.

You probably need the full Python version . . . :(
Genie which is Python like is in the dev-x
and may be of interest to some Python users
http://bkhome.org/genie/index.html
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

#10 Post by big_bass »

Hey sc0ttman
take a look here for some more tips

http://code.google.com/p/tinypy/wiki/Index?tm=6

source code -- and anything readable
http://code.google.com/p/tinypy/downloads/list

looks like it got forked
https://github.com/HarryR/tinypy-panda

The current maintainer seems to be nowhere to be found


Harry Roberts
I forked it on github for some changes I've had sitting around for a while:
https://github.com/HarryR/tinypy-panda

It'd be nice to get some more ongoing development going.

Joe

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#11 Post by amigo »

I also found references to tinypyc(++), but this seems to be the original work of the author who later settled on the name 'tinypy'. While looking around I saw 'pyvm' which is something similar.

It looks like pymite might be more interesting -it's still being developed and can run interactively.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#12 Post by sc0ttman »

Thanks for the info guys... I'll have a look.. I only really need it for making some tiny simple python scripts for testing, I had the list of stuff that tinypy does NOT support, but it mean nearly nothing to me anyway...

My bro pointed me at pyvm a while back, which does indeed look to be half-way between python and tinpy (but still more on the side of tinypy)..
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

Post Reply