Python question: I have a .py file in another folder in the same directory how do I import that file into another .py file? For example, my directory folder is called "School_Work" I have 2 folders: Helper_Functions Main_Driver In my Helper_Functions folder I have the file called helper_functions.py and in my main driver I have a file called main.py. I want to import helper_functions.py into main.py. How do I do that?

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter14: Files And Streams
Section: Chapter Questions
Problem 2E: Create a program named FileComparison that compares two files. First, use a text editor such as...
icon
Related questions
Question
100%

Python question: I have a .py file in another folder in the same directory how do I import that file into another .py file?

For example, my directory folder is called "School_Work"

I have 2 folders:

Helper_Functions

Main_Driver

In my Helper_Functions folder I have the file called helper_functions.py and in my main driver I have a file called main.py. I want to import helper_functions.py into main.py. How do I do that?  

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 2 images

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:
9781337569798
Author:
ECKERT
Publisher:
CENGAGE L