Ok,
Here are the details of application.
- I am using cython to create .pyd files out of my .py files.
- Compilation is simple process. .py to .c and then compile using mingw32.
- Instead of .pyc file, I am using .pyd file. For example “import Node” will import my “Node.pyd” file.
- I do have two directiory structures of my application.
- One with .pyc file, and another one with .pyd files.
- When creating an .exe using .pyc structure, I am getting a working .exe file and no problems.
- When creating an .exe using .pyd structure, no errors, no logs, exe is out but it’s not getting executed.
- You can download the application from here and have a look. (I would really apperciate this favour :-))
http://pantheon-studios.in/shaderbox/Download.html
Thanks
Prashant
···
----- Original Message ----
From: Andrea Gavana andrea.gavana@gmail.com
To: wxpython-users@lists.wxwidgets.org
Sent: Tuesday, 7 October, 2008 8:08:36 PM
Subject: Re: [wxpython-users] GUI2EXE Problem
Hi,
On Tue, Oct 7, 2008 at 3:25 PM, Prashant Saxena wrote:
Ok, I am getting a working exe when I am creating it using .pyc modules and
everything is working fine. When I am building same project using
.pyd files(replacing .pyc with .pyd), my .exe is not working.
Could you please clarify what does “is not working” mean? Are you
getting a traceback in your exefile.exe.log file? If yes, which
traceback? And how
are you replacing *.pyc files with *.pyd files?
*.pyd files are Python “dlls” (in Windows language, let’s say), so in
which way are you building the *.pyd files? Are they C extensions?
Fortran extensions? Something else?
Andrea.
“Imagination Is The Only Weapon In The War Against Reality.”
http://xoomer.alice.it/infinity77/
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Add more friends to your messenger and enjoy! Invite them now.
Hi,
Hi,
Ok,
Here are the details of application.
- I am using cython to create .pyd files out of my .py files.
- Compilation is simple process. .py to .c and then compile using mingw32.
As I answered in the other thread on the py2exe list, it suddenly dawned on my that the cause of your problem probably is that you use the wrong compiler. Try compiling with the free edition of MS C compiler; make sure to use the same version as was used for compiling your Python version.
And later again I realized that this answer is incorrect, because the compiled extensions do work when imported from the ‘normal’ interpreter.
I suspect that the answer is something to do with the way that py2exe changes the way imported functions are looked up.
I suspect that the normal hooks which py2exe utilizes & overrides for this, are not properly overridden when called from the cython-compiled code and that therefore imports fail, and that therefore the app fails.
I think that it’s better to enquire with the cython mailing lists; the more knowledgeable people are more likely to be found there.
Regards,
–Tim
···
On Wed, Oct 8, 2008 at 7:24 AM, Tim van der Leeuw tnleeuw@gmail.com wrote:
On Tue, Oct 7, 2008 at 7:22 PM, Prashant Saxena animator333@yahoo.com wrote:
Regards,
–Tim
Hi,
Ok,
Here are the details of application.
1. I am using cython to create .pyd files out of my .py files.
2. Compilation is simple process. .py to .c and then compile using mingw32.
3. Instead of .pyc file, I am using .pyd file. For example "import Node"
will import my "Node.pyd" file.
4. I do have two directiory structures of my application.
5. One with .pyc file, and another one with .pyd files.
6. When creating an .exe using .pyc structure, I am getting a working .exe
file and no problems.
7. When creating an .exe using .pyd structure, no errors, no logs, exe is
out but it's not getting executed.
8. You can download the application from here and have a look. (I would
really apperciate this favour :-))
http://pantheon-studios.in/shaderbox/Download.html
I have managed to compile your application using py2exe, the
executable is created but I get this traceback when running it:
Traceback (most recent call last):
File "main.py", line 8, in <module>
File "ShaderBox.pyc", line 12, in <module>
File "ShaderBox.pyc", line 10, in __load
File "ShaderBox.py", line 17, in ShaderBox (ShaderBox.c:12952)
NameError: sys
In order to compile it with GUI2Exe, add all your subdirectories in
the data_files list control, selecting the option "Options" =>
"Recurse subdirs for data files option" and then adding your
subdirectories.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
···
On Tue, Oct 7, 2008 at 6:22 PM, Prashant Saxena wrote: