Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1247

Python • Main file @ Desktop/startup import files in Documents

$
0
0
I have a Python program - /home/rpi/Desktop/startup/myProg.py - so that it starts when I boot up.
Due to not really knowing what I'm doing and scope creep, everything is in myProg.py, but I would like to take some of it, like function definitions, and put them in a different file. Something like /home/rpi/Documents/funcs.py

How would I add /home/rpi/Documents to the import search path?

Statistics: Posted by evanmars — Thu May 09, 2024 2:04 pm



Viewing all articles
Browse latest Browse all 1247

Trending Articles