Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we explicitly add a python3 supported code language. #222

Open
s-retlaw opened this issue Mar 9, 2023 · 4 comments
Open

Can we explicitly add a python3 supported code language. #222

s-retlaw opened this issue Mar 9, 2023 · 4 comments

Comments

@s-retlaw
Copy link

s-retlaw commented Mar 9, 2023

Is your feature request related to a problem? Please describe.
I have a system where I would like to be able to show a python 2.x version and a python 3.x version of a code sample.
They are installed as python and python3 on my system. I would like to add python3 as an option to execute code.

Describe the solution you'd like
Keep python to call whatever is mapped to python but also add python3 to allow the use of systems with both versions installed and mapped to the 2 options.

Describe alternatives you've considered
I can create a bash file work around but it would be nice to support it directly

Additional context
I have multiple systems (Linux and Mac) that have python running python 2.x and python3 running python 3.x simultaneously.

@vext01
Copy link

vext01 commented Apr 15, 2024

Related to this, I'm porting slides to OpenBSD and I'm looking at the interpreter dispatch code for code blocks.

On OpenBSD some interpreters (e.g. ruby) are always suffixed with a version number. I can patch that away, but it would be nice if the user could somehow provide their own command to use to evaluate the code block with?

Something like:

!!!awk -f blah.awk
input for awk

(I didn't think hard about !!!, there may be a better prefix)

@vext01
Copy link

vext01 commented Apr 16, 2024

Or maybe the languages can be configured via a config file?

@maaslalani
Copy link
Owner

Hey @vext01, I do want to support custom languages: #122

@s-retlaw Happy to accept a PR for python3 as well!

@vext01
Copy link

vext01 commented Apr 16, 2024

For now I've just patched the python block to invoke python3. OpenBSD has almost killed python2 support across the board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants