Skip to content

gabrielPeart/PythonKit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PythonKit

Swift framework to interact with Python.

Requirements

PythonKit requires recent Swift 4.2 toolchains and has been tested both on macOS and Linux.

Usage

Some Python code like this:

import sys

print("Python {}.{}".format(sys.version_info.major, sys.version_info.minor))
print("Python Path: {}".format(sys.path[0]))
print("Python Version: {}".format(sys.version))

Can be implemented in Swift through PythonKit with the following code:

import PythonKit

let sys = try Python.import("sys")

print("Python \(sys.version_info.major).\(sys.version_info.minor)")
print("Python Path: \(sys.path[0])")
print("Python Version: \(sys.version)")

Notes

About

Swift framework to interact with Python.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Swift 99.9%
  • C 0.1%