2

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

2
  • Seems like coding the entire project in Swift is the better option. But maybe I'm unclear on your requirements. Commented Jan 7, 2022 at 15:18
  • That would make it easier, but my goal is to try and understand how to interconnect different programming languages in an application Commented Jan 8, 2022 at 16:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.