Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Basic Python "import" question
Forum Updated to NodeBB v4.3 + New Features

Basic Python "import" question

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 264 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by Anonymous_Banned275
    #1

    Voluntary removed
    Posted in wrong forum

    S 1 Reply Last reply
    0
    • A Anonymous_Banned275

      Voluntary removed
      Posted in wrong forum

      S Offline
      S Offline
      StarterKit
      wrote on last edited by
      #2

      @AnneRanch, this is for sure not Qt but pure python question so first of all you need to go to relevant community.
      Im not a python expert but in general import statement defines a scope that you import.
      I.e. if you have Module1 with ClassA, ClassB withing then:

      1. If you have
        import Module1
        you get access to all its content with dot-notation. You may use Module1.ClassA and Module1.ClassB in your code.
      2. if you have
        from Module1 import ClassB
        Then you limit your import scope and can use ClassB only while ClassA won't be available for you.

      How to do it depends on your project and architecture.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved