Geoffrey Koech
Geoffrey Koech

Reputation: 21

How do you connecting a python module to a Swift file in a different directory?

I've been trying to learn how to build Swift programs. For my first Swift program, I decided to build a program where I could log my hours for work. In Swift, I've already made a user interface, but I wrote a python program that runs the clock and records the total time between the punch in and punch out.

I've been doing a log of research and I found that PythonKit is a good way to go about including Python code into a Swift program. But I'm having a hard time finding a way to integrate my Python code into the Swift program. If anyone has any suggestions, I would really appreciate them.

But here is a picture of the vscode that is meant to show the file structure. I want to run the run.py Python module inside the timestamP folder below the lib folder, and I want to run the run.py module from inside the ViewController.swift file that is open and being displayed. vscode image showing the file structure of the program

Upvotes: 2

Views: 68

Answers (0)

Related Questions