From praveen.patil@silver-software.com Mon Sep 16 16:07:55 2002 From: praveen.patil@silver-software.com (Praveen Patil) Date: Mon, 16 Sep 2002 16:07:55 +0100 Subject: [DCPIGgies] Please help solving the problem In-Reply-To: Message-ID: 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.] From tismer@tismer.com Mon Sep 16 16:09:06 2002 From: tismer@tismer.com (Christian Tismer) Date: Mon, 16 Sep 2002 17:09:06 +0200 Subject: [DCPIGgies] Please help solving the problem References: Message-ID: <3D85F412.7080807@tismer.com> Praveen Patil 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 Simply change your project settings to produce x.pyd instead of x.dll. The associated .lib files will contain this name, and your static linkage will find the .pyd files at runtime. ciao - chris -- Christian Tismer :^) Mission Impossible 5oftware : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 89 09 53 34 home +49 30 802 86 56 pager +49 173 24 18 776 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/