import/from import question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Artur M. Piwko

    import/from import question

    Is there a way to detect if module was imported by 'from <mod> import <sth>'
    or by 'import <mod>'?

    Artur

    --
    Before the Goat of Mendes... we all must take our turn | Artur M. Piwko
    Into the magic circle... where still the fire burns | mailto:s/_/./
    We're spinning round and round... until one takes a fall | -- Mercyful Fate
    The fallen one will not return, the fallen one must burn | "Witches' Dance"
  • Peter Hansen

    #2
    Re: import/from import question

    "Artur M. Piwko" wrote:[color=blue]
    >
    > Is there a way to detect if module was imported by 'from <mod> import <sth>'
    > or by 'import <mod>'?[/color]

    Why do you want to do that? It's likely to be a bad idea...

    Comment

    • Peter Hansen

      #3
      Re: import/from import question

      "Artur M. Piwko" wrote:[color=blue]
      >
      > Is there a way to detect if module was imported by 'from <mod> import <sth>'
      > or by 'import <mod>'?[/color]

      Why do you want to do that? It's likely to be a bad idea...

      Comment

      Working...