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 Thu 27 Nov 2014, 05:39
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
tinypy
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Tue 01 Mar 2011, 08:44    Post_subject:  tinypy
Sub_title: small python interpreter
 

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:

Exception:
tp_get: KeyError: 0


If I do 'tinypy --help', I get this:

Code:
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!

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4380

PostPosted: Tue 01 Mar 2011, 21:39    Post_subject:  

It sounds like it may be looking for .py files in some directory. For more info try running
strings /pathto/tinypy

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Wed 02 Mar 2011, 07:35    Post_subject:  

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:
UPX!
T$ éî
Ûsïu   
Ûsä1É
ðÿtv
Éu A
Ûsïu   
GIu÷é^ÿÿÿ
ÏéHÿÿÿ
T$(9Öt
H+|$,
QPRÃ
$Info: This file is packed with the UPX executable packer http://upx.sf.net $
$Id: UPX 3.03 Copyright (C) 1996-2008 the UPX Team. All Rights Reserved. $
PROT_EXEC|PROT_WRITE failed.
ðÿÿP1Éjÿj2µ
ãjZXÍ
áPQR­P­
Ä,Ã]èµÿÿÿB
·oÿÿS)ɺx
ç)Ûèµ   
Ñêîîþÿ

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send_private_message 
rjbrewer


Joined: 22 Jan 2008
Posts: 4422
Location: merriam, kansas

PostPosted: Wed 02 Mar 2011, 10:08    Post_subject:  

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

Back to top
View user's profile Send_private_message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Wed 02 Mar 2011, 11:43    Post_subject:  

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:
cd /usr/share/dos/tinypy
tinypy hello.py


and it echoed "Hello World" fine...

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send_private_message 
amigo

Joined: 02 Apr 2007
Posts: 2279

PostPosted: Wed 02 Mar 2011, 13:30    Post_subject:  

You can use upx to decompress the binary and may get more info from it with strings.
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4380

PostPosted: Wed 02 Mar 2011, 17:14    Post_subject:  

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.

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Thu 03 Mar 2011, 06:40    Post_subject:  

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...

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send_private_message 
Lobster
Official Crustacean


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

PostPosted: Thu 03 Mar 2011, 07:43    Post_subject:  

Quote:
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 . . . Sad
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 WIKI
Back to top
View user's profile Send_private_message Visit_website 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Thu 03 Mar 2011, 10:08    Post_subject:  

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
Quote:
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

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send_private_message 
amigo

Joined: 02 Apr 2007
Posts: 2279

PostPosted: Thu 03 Mar 2011, 16:08    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Sat 05 Mar 2011, 16:16    Post_subject:  

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)..

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
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.0726s ][ Queries: 11 (0.0061s) ][ GZIP on ]