Python Forum
newbie question....importing a created class
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
newbie question....importing a created class
#6
I prefer not to move the files....my files exist at /home/pi/my_Python/Radar

the python path is:

Output:
>>> print('\n'.join(sys.path)) /usr/lib/python37.zip /usr/lib/python3.7 /usr/lib/python3.7/lib-dynload /usr/local/lib/python3.7/dist-packages /usr/lib/python3/dist-packages
I have included
#! /usr/bin/python
at the front end of the module containing the class

Would like to add the directory to the python path so that I can just use import?
Reply


Messages In This Thread
RE: newbie question....importing a created class - by ridgerunnersjw - Oct-01-2020, 07:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  question about __repr__ in a class akbarza 4 525 Jan-12-2024, 11:22 AM
Last Post: DeaD_EyE
  How is pandas modifying all rows in an assignment - python-newbie question markm74 1 652 Nov-28-2023, 10:36 PM
Last Post: deanhystad
  newbie question - can't make code work tronic72 2 626 Oct-22-2023, 09:08 PM
Last Post: tronic72
  Newbie question about switching between files - Python/Pycharm Busby222 3 543 Oct-15-2023, 03:16 PM
Last Post: deanhystad
  Some help with my first python class and importing ....im making a lidar program jttolleson 7 1,144 Jul-28-2023, 08:34 AM
Last Post: jttolleson
  Initiating an attribute in a class __init__: question billykid999 8 1,247 May-02-2023, 09:09 PM
Last Post: billykid999
  Newbie.... run for cover. OpenCV question Stevolution2023 2 921 Apr-12-2023, 12:57 PM
Last Post: Stevolution2023
  numpy newbie question bcwilly_ca 4 1,127 Feb-10-2023, 05:55 PM
Last Post: jefsummers
  My code displays too much output when importing class from a module lil_e 4 1,102 Oct-22-2022, 12:56 AM
Last Post: Larz60+
  [Solved] Novice question to OOP: can a method of class A access attributes of class B BigMan 1 1,267 Mar-14-2022, 11:21 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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