problem of double import in python

  • Thread starter Mohsen Pahlevanzadeh
  • Start date
M

Mohsen Pahlevanzadeh

Dear all,

I remember to avoiding to confusing compiler for header, use
/////////////////
// in my include file
#define MYHEADER_H
// and in others code use:
#ifndef MYHEADER_H
#include blahblah
/////////////////////////

Unfortunately, i prevent to same error, double import to python, but i
don't know how to solve, Even i don't know policy of python programmers.

You'll make me happy if explain me...

Yours,
Mohsen
 
A

alex23

Unfortunately, i prevent to same error, double import to python, but i
don't know how to solve, Even i don't know policy of python programmers.

You don't need to do anything, Python takes care of this for you.

During execution, a module is only loaded the first time it is imported.
Every following import will notice that it has already been loaded and
return a reference to the module instead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,951
Messages
2,570,113
Members
46,698
Latest member
alexxx

Latest Threads

Top