flake that does import from another file
- User
flake that does import from another file
- Assistant
In Python, when you mention "flake," it sounds like you might be referring to "flake8," which is a tool for style guide enforcement. However, if you want to perform an import from another file, that's a separate concern from what flake8 handles.
To import from another file in Python, the file you're importing from must be a Python module, which is any file with a
.pyextension. Assuming you have a directory structure like this:codemy_project/ |-- my_module.py `-- my_script.pyAnd you want to import a function or a class from
my_module.pyintomy_script.py, you would do the following in :