-
-
Save sturdysturge/9e11b222b8b11c3370e47f52686efcfb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import PythonKit | |
struct ContentView: View { | |
let myPythonScript = PythonObject(contentsOfFile: "MyPythonScript") | |
var helloWorld: String { | |
return myPythonScript.hello().description | |
} | |
func multiplyString(string: String, number: Int) -> String { | |
return myPythonScript.multiplyString(string, number).description | |
} | |
var body: some View { | |
VStack { | |
Text(helloWorld) | |
Text(multiplyString(string: "Multiplied ", number: 3)) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment