sgzwiz / brython

Automatically exported from code.google.com/p/brython
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

SyntaxError: Unsupported Python keyword 'from' #84

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. from <module> import <function>
2.
3.
SyntaxError: Unsupported Python keyword 'from'

What is the expected output? What do you see instead?
no syntax error

What version of the product are you using? On what operating system?
20130218

Please provide any additional information below.
trying to import unittest module, which contains from keywords.

Original issue reported on code.google.com by billy.earney@gmail.com on 19 Feb 2013 at 1:16

GoogleCodeExporter commented 9 years ago
"from" is in the list of not yet supported Python keywords

Original comment by pierre.q...@gmail.com on 19 Feb 2013 at 2:57

GoogleCodeExporter commented 9 years ago
Fixed in revision 536 - needs more testing

Original comment by pierre.q...@gmail.com on 22 Feb 2013 at 10:07

GoogleCodeExporter commented 9 years ago
relative imports are not supported..  I'm thinking we could implement __file__ 
for each module, which if we know which module is requesting the relative 
import, we could figure out the appropriate path via the callers __file__ 
variable.  I've added a couple of lines of code to ps_import.js to add __file__ 
but I'm stuck to go further since brython catches the from .result as a syntax 
error..

Hope this file helps..

Original comment by billy.earney@gmail.com on 23 Feb 2013 at 1:34

Attachments: