jverzani / PySide.jl

julia interface for accessing Qt via PyCall and PySide
MIT License
18 stars 6 forks source link

Doesn't work with Python 3 #9

Closed oprypin closed 10 years ago

oprypin commented 10 years ago

At least on Arch Linux the python executable is the latest version of Python. Apparently PyCall.jl uses the default python executable, and PySide.jl assumes that it is always python2, but it's not.

So when I try to use PySide.jl, I get an error, because execfile has been removed from Python.

julia> using PySide
ERROR: PyError (PyEval_EvalCode) <class 'NameError'>
NameError("name 'execfile' is not defined",)
  File "PyCall.jl", line 1, in <module>

while loading /home/blaxpirit/.julia/v0.3/PySide/src/qtutils.jl, in expression starting on line 24
while loading /home/blaxpirit/.julia/v0.3/PySide/src/PySide.jl, in expression starting on line 28
oprypin commented 10 years ago

Replacing execfile(f, ...) with exec(open(f, 'rb').read(), ...) in the 2 locations that it's used let me run the basic "hello world" example successfully.

jverzani commented 10 years ago

Just updated to check for this. Thanks. Let me know if there are other issues.