DirkS
Posts: 9944
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: How to call another import on this module

Sun Feb 28, 2016 5:27 pm

Essentially, that should work.
But you're importing an empty class. Not sure if that's valid.

Do you get error messages when you try that construction?

DirkS
Posts: 9944
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: How to call another import on this module

Sun Feb 28, 2016 5:37 pm

supra wrote:There is no error. The testing had been successfully
Sorry, you lost me there.
So it's working and there's no problem?

User avatar
RogerW
Posts: 285
Joined: Sat Dec 20, 2014 12:15 pm
Location: London UK

Re: How to call another import on this module

Sun Feb 28, 2016 5:40 pm

Unless I have missed something that should work. The two files should be in the same directory.

User avatar
RogerW
Posts: 285
Joined: Sat Dec 20, 2014 12:15 pm
Location: London UK

Re: How to call another import on this module

Sun Feb 28, 2016 6:01 pm

But i don't know how to add parameter or not on connection_server module.
Again - not sure I understand what you want. import is executable so you can do:

Code: Select all

if condition:
    from x import import X

Return to “Python”