tinyshell - an interactive tinypy shell

35 views
Skip to first unread message

Denis Kasak

unread,
Aug 7, 2008, 3:05:18 AM8/7/08
to tin...@googlegroups.com
I've hacked up a quick and dirty interactive tinypy shell. I dubbed it
tinyshell, in an extreme lack of creativity. It's got limitations but
it serves its purpose for quick testing and demonstrations. I've
included the tinyshell.c file itself and a patch for the trunk; three
small changes to the source were necessary to make it work. I've also
added an option to setup.py to help building it, but it only probably
works for Linux (maybe Windows with mingw). Type "python setup.py
tinyshell" to build it.

Enjoy!

P.S. No automatic evaluation of arbitrary expression like Python has,
though. Also, maximum line length is set to 100 characters.

--
Denis Kasak

tinyshell.patch
tinyshell.c

Denis Kasak

unread,
Aug 7, 2008, 1:23:18 PM8/7/08
to tinypy
Also, is it just me, or are googlecode and Google Groups a bit
sluggish with their email updates for the last few days? Whenever I do
something, the email report seems to arrive quite a bit late.

Seth Lemons

unread,
Aug 7, 2008, 3:52:09 PM8/7/08
to tin...@googlegroups.com
Builds fine in OSX. Import statements don't work and the results of
evaluations aren't displayed (like "x=3; x" should show 3 on the next
line.) I'll try to help with these when I get a chance. How should we
handle bugs/tests for "extras" like this, Phil?

Seth

PS: I haven't taken time to look at the code yet, but I imagine I'll
probably be stealing some of your code to add an IO library to tinypy.
Thanks in advance. ;)

Phil Hassey

unread,
Aug 7, 2008, 4:12:31 PM8/7/08
to tin...@googlegroups.com
I think we should put all this stuff into

examples/shell

And the project can live there without "messing" with the rest of tinypy.  I think it would even be good if it had its own setup.py in there, instead of being part of the top-level setup.py

I think it's a great thing to have, but I want to be sure that if we add goodies like this, which are nice, but won't weigh down tinypy at all.

Thanks!
-Phil

--- On Thu, 8/7/08, Seth Lemons <ulf...@gmail.com> wrote:

Seth Lemons

unread,
Aug 7, 2008, 4:25:36 PM8/7/08
to tin...@googlegroups.com
Should we do anything special when filing bugs for "goodies"?

Seth

Denis Kasak

unread,
Aug 7, 2008, 4:37:33 PM8/7/08
to tin...@googlegroups.com
On Thu, Aug 7, 2008 at 9:52 PM, Seth Lemons <ulf...@gmail.com> wrote:
>
> Builds fine in OSX. Import statements don't work and the results of
> evaluations aren't displayed (like "x=3; x" should show 3 on the next
> line.) I'll try to help with these when I get a chance. How should we
> handle bugs/tests for "extras" like this, Phil?

Actually, import statements do work, but modules didn't get correctly
built in into the shell. We'll have to do something about setup.py
eventually, because it's going spaghetti.

And yes, I couldn't come up with a clean way to do automatic
evaluations so I just left them out for now.

> Seth
>
> PS: I haven't taken time to look at the code yet, but I imagine I'll
> probably be stealing some of your code to add an IO library to tinypy.
> Thanks in advance. ;)

If you can reuse something, feel free to do so. I don't think it'll be
of much help, though. :)

--
Denis Kasak

Denis Kasak

unread,
Aug 7, 2008, 6:30:00 PM8/7/08
to tin...@googlegroups.com
Here's a revised patch for tinyshell so it works correctly with
modules. This is only temporary until we get it sorted out in a
separate example folder.
tinyshell.patch
tinyshell.c
Reply all
Reply to author
Forward
0 new messages