Python Forum
using self-developed modules
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
using self-developed modules
#7
Sorry, I misunderstood your reply. I thought with "3)..." you were referring to MY number 3), but you probably referred to your sys.path?

I cannot add your code (print (sys.path)?) in my program to see what the variable contains because the execution of main is stopped already during the initialization of the pseudo code.

Yes, I still am using the long paths. I agree that that is ugly and requires a lot of typing, but to organize the many files on the disk in a number of folders, it's not bad. And in the python manuals I see no mentioning of a limit on the path length? Additionally since the path is constructed by the python installer itself, I assume that also the long path should work? If that long pathname would not work, then there is an error in the default installer logic that creates the pathname, and that should then be corrected asap.

You were correct, a colon was missing in "selfwrittenmodule.py". It "fell of" while I copied the lines of code from the real python code into the reply on this forum. The real python code has that colon.

I will test with the other 2 methods and come back here.

If I understand your comment correctly, then you save the "main.py" module and the "selfwrittenmodule.py" in the same Win10 folder. Initially I worked in that same way: the modules dedicated to the system I was writing and the "general use" modules were in the same folder, and everything worked fine. But then I wanted to change the way I organize the folders so that they beter reflect their content. Because "main.py" is code dedicated to a specific application, and "selfwrittenmodule.py" contains code that is intended to be used by many different systems (= NOT dedicated to one particular system), I would like to store them in 2 different folders: 1 for modules dedicated to the specific application, and one for "general use" modules.

To be sure that the length of the path is not causing the problem: does anybody here on this forum know about a limit on the pathname in python?
Reply


Messages In This Thread
using self-developed modules - by wlp - Aug-28-2019, 03:04 PM
RE: using self-developed modules - by wlp - Aug-28-2019, 04:05 PM
RE: using self-developed modules - by snippsat - Aug-28-2019, 05:41 PM
RE: using self-developed modules - by wlp - Aug-29-2019, 10:36 AM
RE: using self-developed modules - by perfringo - Aug-29-2019, 11:22 AM
RE: using self-developed modules - by snippsat - Aug-29-2019, 03:29 PM
RE: using self-developed modules - by wlp - Aug-29-2019, 04:18 PM
RE: using self-developed modules - by snippsat - Aug-29-2019, 05:20 PM
RE: using self-developed modules - by wlp - Aug-30-2019, 02:18 PM
RE: using self-developed modules - by snippsat - Aug-30-2019, 03:17 PM
RE: using self-developed modules - by wlp - Aug-30-2019, 04:16 PM
RE: using self-developed modules - by snippsat - Aug-30-2019, 07:10 PM
RE: using self-developed modules - by wlp - Aug-31-2019, 01:45 PM
RE: using self-developed modules - by snippsat - Aug-31-2019, 05:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Developed App in VS2019 - Help with pyinstaller fioranosnake 0 1,629 Nov-11-2019, 09:12 PM
Last Post: fioranosnake
  Modules issue, pip3 download modules only to pyhton3.5.2 not the latest 3.6.1 bmohanraj91 6 8,516 May-25-2017, 08:15 AM
Last Post: wavic

Forum Jump:

User Panel Messages

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