You are right I do see that traslator_dict.py seems to be importing stuff 
from lib2to3 which is in python
from lib2to3 import pygram, pytree
But this seems to work for regular python which means its part of the 
standard python. 
I am using python2.7 and lib2to3 exists in there

So I am guessing its needed by older python 2.6 and likes. 
So I thought I'd package it with pyjs anyway but ran into a issue I don't 
understand, or rather don't see how its working code.

Trying to package and install pgen causes the following error
processing pyjsc-0.8.1-py2.7.egg
creating 
/Users/sarvi/Workspace/pyjs/lpython/lib/python2.7/site-packages/pyjsc-0.8.1-py2.7.egg
Extracting pyjsc-0.8.1-py2.7.egg to 
/Users/sarvi/Workspace/pyjs/lpython/lib/python2.7/site-packages
  File 
"/Users/sarvi/Workspace/pyjs/lpython/lib/python2.7/site-packages/pyjsc-0.8.1-py2.7.egg/pyjs/pgen/lib2to3/pygram.py",
 
line 10
    from lib2to3/pgen2 import token
                ^
SyntaxError: invalid syntax

Adding pyjsc 0.8.1 to easy-install.pth file

>From what I understand "lib2to3/pgen2" should be "lib2to3.pgen2" and 
slashes are not permitted in python import statements.
Can't find any documentation that explains the use of "/" and python2.7 
doesn't like it which tells me it is not a supported syntax.

What am I missing here. How can this be working code?

Sarvi



On Thursday, October 10, 2013 1:35:54 AM UTC-7, Kees Bos wrote:
>
>
> On Thu, 2013-10-10 at 10:12 +0200, Kees Bos wrote: 
> > On Thu, 2013-10-10 at 00:52 -0700, Sarvi Shanmugham wrote: 
> > > Thanks for the description. 
> > > 
> > > 
> > > Question on pgen. Is it still being used? 
> > 
> > I think it's optionally used (when lib2to3 is not available) 
>
> It will definitely be needed when implementing things like 'eval' 
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Pyjs.org Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyjs-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to