sphinx-execute-code icon indicating copy to clipboard operation
sphinx-execute-code copied to clipboard

Python3 support

Open lgarcin opened this issue 8 years ago • 9 comments

Could it be possible to support Python3 ?

lgarcin avatar Sep 11 '17 18:09 lgarcin

Sure, would be happy to. I'll let you know when this is done and pypi updated.

jpsenior avatar Sep 11 '17 19:09 jpsenior

This package looks perfect for me, but I also would need python 3 support.

Any update on progress towards this?

rabernat avatar Feb 13 '18 19:02 rabernat

Done with #3

cwirz avatar May 11 '18 19:05 cwirz

I think the code is not still python3 compatible

Running Sphinx v2.1.2

Exception occurred: File "/Users/joaquin/miniconda3/lib/python3.7/site-packages/sphinx/registry.py", line 473, in load_extension mod = import(extname, None, None, ['setup']) File "/Users/joaquin/miniconda3/lib/python3.7/site-packages/sphinx_execute_code/init.py", line 81 exec code ^ SyntaxError: Missing parentheses in call to 'exec' The full traceback has been saved in /var/folders/hq/3c54vd0s21911s3rjjj2csj00000gn/T/sphinx-err-xi7nygqb.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at https://github.com/sphinx-doc/sphinx/issues. Thanks! make: *** [html] Error 2

joamatab avatar Sep 23 '19 18:09 joamatab

I get this issue

    exec code
            ^
SyntaxError: Missing parentheses in call to 'exec'

I assume this is a python 2/3 issue?

wlievens avatar Jun 12 '20 14:06 wlievens

@wlievens use my fork: https://github.com/cwirz/sphinx-execute-code

cwirz avatar Jun 12 '20 14:06 cwirz

Exception occurred: File "/home/wzy/.local/lib/python3.10/site-packages/sphinx_execute_code/init.py", line 77, in execute_code output = StringIO.StringIO() AttributeError: type object '_io.StringIO' has no attribute 'StringIO'

Cannot work in python3.10?

Freed-Wu avatar Dec 09 '22 13:12 Freed-Wu

@Freed-Wu my version should work #3

cwirz avatar Dec 09 '22 14:12 cwirz

Thanks for your reply. :smile: But I found my requirement is beyond this package so I have to create a new package for myself.

Freed-Wu avatar Dec 10 '22 14:12 Freed-Wu