[python-uk] Please help solving the problem

Tim Couper python-uk@python.org
Mon, 16 Sep 2002 16:33:37 +0100 (BST)


Python language questions should really be asked on
comp.python.lang. This has the advantage of being
viewed internationally, too.

Tim

 --- Praveen Patil <praveen.patil@silver-software.com>
wrote: > Hi,
> 
> 
> Please help me in solving the problem below.
> 
> 
> step 1: I have written three dlls :  a.dll , b.dll ,
> c.dll.
>                  a.dll contains  funct_A();
>                  b.dll contains  funct_B();
>                  c.dll contains  funct_C();
> 
> step 2: I am copying a.dll to directory C:\Program
> Files\Python\DLLs  and
> renaming as a.pyd
>         similarly
>            I am copying b.dll to directory
> C:\Program Files\Python\DLLs. I
> am not renaming as b.pyd
>            I am copying c.dll to directory
> C:\Program Files\Python\DLLs and
> renaming as c.pyd
>         So my  C:\Program Files\Python\DLLs 
> directory contain
>                          a.pyd , b.dll , c.pyd
> 
> step 3: a)Python function func_pyA() calls funct_A()
>         b)funct_A() call funct_B()
>         c)funct_B() call funct_C()
>         d)funct_C() call python  fuction  func_pyC()
> 
> step 4: I am importing a.pyd and c.pyd in python
> program.
>              import a
>              import c
> 
> step 5: I am having problem in importing 'a' because
>  'a' need to load b.dll
> and c.dll. But I copied c.dll as c.pyd.
>         Please suggest me some solution.
> 
> 
> here is my code :
> 
>  1)a.c (a.dll)
>    ----------
>          void func_A();
> 
> 
>  2)b.c (b.dll)
>    -----------
>           void func_B();
> 
>  3)c.c( c.dll)
>    -----------
>           void func_C();
> 
>  4) example.py
>     ---------
>    import a
>    import c
> 
>    G_Logfile  = None
>    def TestFunction():
>      G_Logfile = open('Pytestfile.txt', 'w')
>      G_Logfile.write("%s \n"%'I am writing python
> created text file')
>      G_Logfile.close
>      G_Logfile = None
> 
>    if __name__ == "__main__":
>    a.func_A();
>    .....
>    .....
> 
> 
> Please help me in solving the problem.
> 
> 
> Cheers,
> 
> 
> Praveen.
> 
> 
> [ The information contained in this e-mail is
> confidential and is intended for the named recipient
> only. If you are not the named recipient, please
> notify us by telephone on +44 (0)1249 442 430
> immediately, destroy the message and delete it from
> your computer. Silver Software has taken every
> reasonable precaution to ensure that any attachment
> to this e-mail has been checked for viruses.
> However, we cannot accept liability for any damage
> sustained as a result of any such software viruses
> and advise you to carry out your own virus check
> before opening any attachment. Furthermore, we do
> not accept responsibility for any change made to
> this message after it was sent by the sender.]
> 
> _______________________________________________
> python-uk mailing list
> python-uk@python.org
> http://mail.python.org/mailman/listinfo/python-uk 

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com