ANN: PyLogo 0.1

I

Ian Bicking

PyLogo 0.1
==========

This is the first public release of the still rough (but I think
functional) PyLogo interpreter. PyLogo interprets the Logo language,
an education Lisp-like language best known for its turtle graphics.

Found at:
http://pylogo.org

Who Is This For?
================

This release is primarily targeted at other developers. Though PyLogo
is a fairly complete Logo implementation, the programming environment
is still rough.

Because PyLogo is written in Python, this is a very easy interpreter to
work with -- the code is small, it's easy to create new primitives
using Python code, and there's already a wide array of interesting and
useful Python libraries which are easily made accessible to Logo
programs. It also inherits Python's rich object model (though it needs
more work to make Python objects easier to work with), which makes it
possible to avoid some of the more crude features of some Logo dialects
with respect to properties (dictionaries), files, etc.

What Does It Do Now?
====================

PyLogo implements all of the core Logo features (as far as I know),
generally trying to match UCBLogo (the de facto standard Logo
implementation). Like traditional Logo, it uses dynamic scoping and a
global namespace. Unlike many young language implementation, the
existence of bugs is given consideration -- errors produce tracebacks,
and room exists for even more helpful error diagnostics.

Turtle graphics are available, including multiple turtles. You can use
multiple, concurrent threads in your Logo programs. (You can't use
threads and turtles together -- yet)
 
U

user

Just tried it, and this is what I get
++++++++++++++++++
Traceback (most recent call last):
File "/usr/bin/pylogo", line 6, in ?
if os.path.basename(os.path.dirname(__file__)) == 'scripts':
NameError: name '__file__' is not defined
++++++++++++++++++

This is from both cvs and 0.1 release.
 
P

Peter Hansen

Just tried it, and this is what I get
++++++++++++++++++
Traceback (most recent call last):
File "/usr/bin/pylogo", line 6, in ?
if os.path.basename(os.path.dirname(__file__)) == 'scripts':
NameError: name '__file__' is not defined
++++++++++++++++++

Probably a sign that it requires Python 2.3 or something...

-Peter
 
F

Fredrik Lundh

Peter said:
Probably a sign that it requires Python 2.3 or something...

or, in older versions, that you're running something as a script when
it's designed to be imported as a module.

</F>
 
I

Ian Bicking

Just tried it, and this is what I get
++++++++++++++++++
Traceback (most recent call last):
File "/usr/bin/pylogo", line 6, in ?
if os.path.basename(os.path.dirname(__file__)) == 'scripts':
NameError: name '__file__' is not defined
++++++++++++++++++

This is from both cvs and 0.1 release.

Well, it's hard for me to follow up on this without your email address.
I'm not quite sure why this is happening (though I admit it has
happened to be before in other situations, it's not happening to me
now). I'm not sure why __file__ exists sometimes, and not other times.
I made a change to CVS to use sys.argv[0] is __file__ is missing
(since it seems like this only occurs when calling a file as a script,
as "pylogo" is called).
 
R

Ralf Schmitt

Ian Bicking said:
Just tried it, and this is what I get
++++++++++++++++++
Traceback (most recent call last):
File "/usr/bin/pylogo", line 6, in ?
if os.path.basename(os.path.dirname(__file__)) == 'scripts':
NameError: name '__file__' is not defined
++++++++++++++++++

This is from both cvs and 0.1 release.

Well, it's hard for me to follow up on this without your email
address. I'm not quite sure why this is happening (though I admit it
has happened to be before in other situations, it's not happening to
me now). I'm not sure why __file__ exists sometimes, and not other
times. I made a change to CVS to use sys.argv[0] is __file__ is
missing (since it seems like this only occurs when calling a file as a
script, as "pylogo" is called).

__file__ being defined in scripts is new in python 2.3.
 
E

Erik Max Francis

Ian said:
I'm not quite sure why this is happening (though I admit it has
happened to be before in other situations, it's not happening to me
now). I'm not sure why __file__ exists sometimes, and not other
times.

It's a 2.3 thing:

max@oxygen:~% python2.3 /usr/local/bin/pylogo
Importing pylogo.builtins
Importing logo_turtle
??? bye
max@oxygen:~% python2.2 /usr/local/bin/pylogo
Traceback (most recent call last):
File "/usr/local/bin/pylogo", line 5, in ?
if os.path.basename(os.path.dirname(__file__)) == 'scripts':
NameError: name '__file__' is not defined

--
Erik Max Francis && (e-mail address removed) && http://www.alcyone.com/max/
__ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/ \
\__/ It [freedom] must be demanded by the oppressed.
-- Dr. Martin Luther King, Jr.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,170
Messages
2,570,925
Members
47,468
Latest member
Fannie44U3

Latest Threads

Top