GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - openjdk/detroit-python: https://openjdk.org/projects/detroit

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
.jcheck
.jcheck
 
 
legal/Python
legal/Python
 
 
samples
samples
 
 
src
src
 
 
.gitignore
.gitignore
 
 
ADDITIONAL_LICENSE_INFO
ADDITIONAL_LICENSE_INFO
 
 
AddCopyright.java
AddCopyright.java
 
 
GetPythonEnvironment.java
GetPythonEnvironment.java
 
 
JextractPython.java
JextractPython.java
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
checkversion.ps1
checkversion.ps1
 
 
checkversion.sh
checkversion.sh
 
 
dist.sh
dist.sh
 
 
jpython.ps1
jpython.ps1
 
 
jpython.sh
jpython.sh
 
 
pom.xml
pom.xml
 
 
run.ps1
run.ps1
 
 
run.sh
run.sh
 
 
rundebug.ps1
rundebug.ps1
 
 
rundebug.sh
rundebug.sh
 
 

Repository files navigation

Project Detroit Python - a javax.script engine for Python

This branch requires Python 3.14.

Install pyenv https://github.com/pyenv/pyenv and pyenv-virtualenv https://github.com/pyenv/pyenv-virtualenv for your OS. Using pyenv and pyenv-virtualenv, you can install specific Python versions and create virtual environments within.

After installing pyenv and configuring your shell's environment variables (like ~/.zshrc or ~/.bashrc), you must restart your terminal session for the changes to take effect.

You can create install Python 3.14, create a virtual environment and activate it using the following commands:

pyenv install 3.14
pyenv virtualenv 3.14 mypyenv-3.14
pyenv activate mypyenv-3.14
  • You can skip the next two steps if you do not want to re-generate jextract binding classes from Python C API.

  • Download & extract jextract early access binary from

    https://jdk.java.net/jextract/

  • Put jextract in PATH

  • Install JDK 25 and define JAVA_HOME to be JDK 25 home

  • From the current directory

mvn clean verify surefire-report:report javadoc:javadoc

command builds and tests the project

  • From the current directory:
sh jpython.sh

runs a simple REPL. or

sh jpython.sh samples/squares.py

runs a sample script file

  • To run a java sample that uses Python script engine:
sh run.sh samples/Hello.java
  • Recommended usage note

The CPython runtime provides access to many operating system features and resources. As such, using detroit-python to run arbitrary or untrusted Python code is strongly discouraged.

Moreover, even when running trusted Python code, it is recommended that script code be not interpolated with user input arguments without proper validation.

About

https://openjdk.org/projects/detroit

Resources

Readme
GPL-2.0 license
Activity
Custom properties

Stars

27 stars

Watchers

2 watching

Forks

8 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.