You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
Had a look at the print_function bug. It appears to be related to the fact LightTable compiles each form in the file in sequence in py-src/ltmain.py:
forformintoExec:
code=form[1]
loc=form[0]
#conditional stuff for eval vs. execcode=compile(code, data[2]["name"], 'exec')
and the fact that the print_function is a monkey patch to syntax that exists only at runtime.
Attaching the from __future__ import print_function line to the code in py-src/ltmain.py allows something like print('spam', file=sys.stderr) to be evaluated successfully:
I'm not familiar with Python/LightTable internals, so can't propose an actual solution.
Edit: just realized that I've got an older version of the Python plugin installed, will need to check out the issue with the latest, but it looks like he basic problem remains the same.
Activity
hayd commentedon Jul 1, 2015
It's unclear if the stderr part is
Python/py-src/ltipy.py
Line 222 in 134751c
Python/py-src/ltipy.py
Line 199 in 134751c
The print_function bug is different... scoping of exec?
Edit: I can reproduce this locally:
dosmoc commentedon Sep 7, 2015
Had a look at the print_function bug. It appears to be related to the fact LightTable compiles each form in the file in sequence in
py-src/ltmain.py:and the fact that the print_function is a monkey patch to syntax that exists only at runtime.
Attaching the
from __future__ import print_functionline to the code inpy-src/ltmain.pyallows something likeprint('spam', file=sys.stderr)to be evaluated successfully:I'm not familiar with Python/LightTable internals, so can't propose an actual solution.
Edit: just realized that I've got an older version of the Python plugin installed, will need to check out the issue with the latest, but it looks like he basic problem remains the same.