This is a pip-installable package for executing java and python programs together.
Project description
Phoenix-python
This is a pip-installable package for executing java and python programs together.
- Use Java & Python Libraries Together.
- Executing Various Applications in Admin & Non-Admin Mode (Requires JDK Installation in the System).
- Can Use Virtual Java & Python Environment
Installation
pip install Phoenix-python
Phoenix-python requires Python 3.4.0 to run.
Importing Package
import Phoenix
import Phoenix as p
from Phoenix import App_Runtime_User,App_Execute_Admin,App_Execute_User,App_Execute_Admin
from Phoenix import Java_Path,Java_Execute,Java_Save,Java_Delete,VE_Java_Execute
from Phoenix import Python_Path,Python_Execute,Python_Save,Python_Delete,VE_Python_Execute
Usage
Example 1 (Python -> Python Execution)
import Phoenix as p
text="""
x=5
y=x+9
print('Hello From Phoenix-python',y)"""
print(p.Python_Path.getPythonLocation()[0])
p.Python_Save.Save_Py(text,"hello")
print("Hello from default python")
print(p.Python_Execute.ExecutePy("hello.py","")[0])
p.Python_Delete.DeleteFile("hello.py")
Output
C:\Python\
Hello from default python
Hello From Phoenix-python 14
Example 2 (Python -> Java Execution)
import Phoenix as p
text="""class hello{
public static void main(String a[]){
System.out.println("Hello From Java");
}
}"""
print(p.Java_Path.getJDKLocation()[0])
p.Java_Save.Save_Java(text,"hello")
print("Hello from Python")
p.Java_Execute.CompileJava("hello.java","")[0]
print(p.Java_Execute.ExecuteJava("hello","")[0])
p.Java_Delete.DeleteFile("hello")
Output
C:\Program Files\ojdkbuild\java-1.8.0-openjdk-1.8.0.252-2\
Hello from Python
Hello From Java
More Examples Coming Soon
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Phoenix-python-2020.7.3.tar.gz
(95.4 kB
view details)
File details
Details for the file Phoenix-python-2020.7.3.tar.gz.
File metadata
- Download URL: Phoenix-python-2020.7.3.tar.gz
- Upload date:
- Size: 95.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6c35edd77e4363fbe9eebfd7985cb64b871501aa96beb14e20152cbd31104be
|
|
| MD5 |
e010daca1d88a4af475f07d5b704feec
|
|
| BLAKE2b-256 |
903684d02ca3f0c1c4d7c82f2c15a81e953c0fe368ff9d4eb80c4b041b26e404
|