Python Forum
Problem with importing Python file in Visual Studio Code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with importing Python file in Visual Studio Code
#7
(Jun-15-2022, 10:54 AM)DXav Wrote: but I have a "Menu" folder in my working directory

Just to be clear, when you say 'working directory', this is the directory from which the main app is being run?

For example, when I'm developing a script, I 'work' from /home/rob/python/dev/the_app.py

... so any custom modules that I need for said 'app', I create in /dev/modules/
If I've a module called 'test.py' I need to use import modules.test which works just fine.

n.b: I'm using a Linux OS

edit: if the above rings true, then it seems to me that the issue you have is more about VS than Python. Have you asked about this in a VS Forum?
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply


Messages In This Thread
RE: Problem with importing Python file in Visual Studio Code - by rob101 - Jun-15-2022, 11:40 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem Converting Tradingview Indicator to Python code kralxs 1 297 Apr-27-2024, 06:10 PM
Last Post: kralxs
  Python Coding in Power BI Visual vjrans 0 317 Jan-31-2024, 07:54 AM
Last Post: vjrans
  My code works on Jupyter Lab/Notebook, but NOT on Visual Code Editor jst 4 1,125 Nov-15-2023, 06:56 PM
Last Post: jst
  How to set PYTHONPATH in Visual Studio Code? aupres 5 4,514 Aug-15-2023, 03:51 PM
Last Post: snippsat
  how do I open two instances of visual studio code with the same folder? SuchUmami 3 948 Jun-26-2023, 09:40 AM
Last Post: snippsat
  Visual Studio Code NewPi 3 1,095 May-16-2023, 11:13 PM
Last Post: snippsat
  New2Python: Help with Importing/Mapping Image Src to Image Code in File CluelessITguy 0 742 Nov-17-2022, 04:46 PM
Last Post: CluelessITguy
  python standard way of importing library mg24 1 936 Nov-15-2022, 01:41 AM
Last Post: deanhystad
  Visual Studio Code venv ibm_db error mesi1000 7 2,895 Nov-13-2022, 12:36 AM
Last Post: snippsat
  Problem with importing python-telegram library into the project gandonio 1 1,622 Nov-01-2022, 02:19 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020