Python Forum
Calling Variables from Other Files in Different Folders
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calling Variables from Other Files in Different Folders
#13
(Jul-31-2020, 05:23 PM)ndc85430 Wrote: As an aside, do you still need the empty __init__.py for Python 3? I thought it was only needed for 2.
Yes from Python 3.3 Implicit Namespace Packages are allowed without an __init__.py file.
A little more about in this post.
Doing it the way in this Thread with PYTHONPATH,i have had some trouble not using __init__.py in folders.
I usually don't do it this way,have usually one __init__.py in top level folder folder lifting sub-modules.
This to avoid long import statement(that i do not like) for users of package.
Reply


Messages In This Thread
RE: Calling Variables from Other Files in Different Folders - by snippsat - Jul-31-2020, 05:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using zipfile module - finding folders not files darter1010 2 504 Apr-06-2024, 07:22 AM
Last Post: Pedroski55
  Create new folders and copy files cocobolli 3 1,721 Mar-22-2023, 10:23 AM
Last Post: Gribouillis
  Copy only hidden files and folders with rsync Cannondale 2 1,174 Mar-04-2023, 02:48 PM
Last Post: Cannondale
  using variables with functions imported from different files. Scordomaniac 3 1,378 May-24-2022, 10:53 AM
Last Post: deanhystad
Question Calling on a Variable using other Variables jacknewport 4 2,120 Jul-23-2021, 04:18 PM
Last Post: jacknewport
  Moving files to Folders giddyhead 13 9,518 Mar-07-2021, 02:50 AM
Last Post: giddyhead
  code to read files in folders and transfer the file name, type, date created to excel Divya577 0 1,941 Dec-06-2020, 04:14 PM
Last Post: Divya577
  How do use data from csv files as variables? JUSS1K 1 2,260 Oct-25-2020, 08:31 PM
Last Post: GOTO10
  Passing Variables between files. victorTJ 3 2,374 Oct-17-2020, 01:45 AM
Last Post: snippsat
  sub-folders in folders from text line jenost 1 1,641 Mar-31-2020, 07:16 AM
Last Post: ndc85430

Forum Jump:

User Panel Messages

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