A Python package to print colored messages in terminal using Objective-C
Project description
objconpython - Execute Objective-C Code from Python
This Python package allows you to execute Objective-C code directly within Python using a simple function call.
Features
- Execute inline Objective-C code from Python using
objconpython.run(). - Supports basic Objective-C expressions and code evaluation.
- Handles Objective-C exceptions and returns error messages to Python.
- Easy-to-use integration in Python projects.
Requirements
- macOS (required for Objective-C execution via
Foundationframework). - Python 3.x or higher.
- pip (for installing the package).
Installation
To install the package, run the following command:
pip install objconpython
import objconpython
objc_code = """
#import <Foundation/Foundation.h>
int main() {
@autoreleasepool {
NSLog(@"Hello from Objective-C!");
}
return 0;
}
"""
# Gọi hàm run trong module
result = objconpython.run(objc_code)
print(result)
Explanation: objconpython.run("<objc_code>"):
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
objconpython-0.1.tar.gz
(2.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file objconpython-0.1.tar.gz.
File metadata
- Download URL: objconpython-0.1.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dce1b2335a4757ad2b96025b642e69332956de3908ebbc8f9b27159a3f341b5c
|
|
| MD5 |
7f1918d4bc3c97bae3a2d195eb4da35e
|
|
| BLAKE2b-256 |
e8e9a1bb8813cdea9244be102044ec72a028947aa19c3ebe3df3bee0b5217f7f
|
File details
Details for the file objconpython-0.1-cp39-cp39-macosx_10_9_universal2.whl.
File metadata
- Download URL: objconpython-0.1-cp39-cp39-macosx_10_9_universal2.whl
- Upload date:
- Size: 7.0 kB
- Tags: CPython 3.9, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0ccca2b10ca3f96854bc40218a84a0c9893ded9e81d2d0a56f4fb45f458e679
|
|
| MD5 |
7e5ea44738df165dad29411db26689c0
|
|
| BLAKE2b-256 |
692e3ea8a0a29e693e46a815febbad7ff8cc8d35c00963788c2ebbf6bd982ef2
|