Hi, thank you for your project it might save me a lot of time dealing with some js files that are essentially data that I'd rather work with in python.
I reduced a js file to:
var myvar = String('hello') // just using string in place of another function with dependencies for the moment
which I then converted to a python file
js2py.translate_file('short.js', 'short.py')
I then expected to be able to do this in ipython (following your example somewhat):
In [2]: import short
In [3]: short.myvar
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-bbe633c3c6a7> in <module>
----> 1 short.myvar
AttributeError: module 'short' has no attribute 'myvar'
I'm guessing I'm just a step away, but I wasn't able to filter all the intermediate variables needed for the conversion
Hi, thank you for your project it might save me a lot of time dealing with some js files that are essentially data that I'd rather work with in python.
I reduced a js file to:
which I then converted to a python file
I then expected to be able to do this in ipython (following your example somewhat):
I'm guessing I'm just a step away, but I wasn't able to filter all the intermediate variables needed for the conversion