On Thu, 2013-10-10 at 10:08 -0700, Sarvi Shanmugham wrote:
> 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. 

2.6 has also lib2to3 afaik

> 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

Yeah, that should definitely be 'lib2to3.pgen2'.

> 
> 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?
> 
Not ;-)

Probably, pgen/lib2to3/pygram.py is not used.

Maybe we can skip pgen in pip. We can always add this when needed.


-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to