Skip to main content

A Python package to run objc code on python

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 Foundation framework).
  • 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


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.2.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

objconpython-0.2-cp39-cp39-macosx_10_9_universal2.whl (7.0 kB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file objconpython-0.2.tar.gz.

File metadata

  • Download URL: objconpython-0.2.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for objconpython-0.2.tar.gz
Algorithm Hash digest
SHA256 a9a701665f7df946cd6c028509b981b1a9b122ac5893771750d17ef4cfe95ea0
MD5 8273d411f12756f0a7809904fd9e1cdb
BLAKE2b-256 ea4f9ff73e0c55803320d9b08a80c0e0ed6c090b52b939f072b9d0725e8394fe

See more details on using hashes here.

File details

Details for the file objconpython-0.2-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for objconpython-0.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 bab41af70f34a1e75ac77fede7ddc3177b0bb2799f7add5104ca6825559a926d
MD5 9cee41592cf5de69fbdcb95e35e7537d
BLAKE2b-256 c0c05b86e01e4f74364310012401a46d439a664f6aea62994a0a1b53e9ba0787

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page