Thanks, Chris I will send my simple example to you later on Zhi Christopher Barker <[EMAIL PROTECTED]> wrote: On Tuesday 13 December 2005 7:24 pm, Zhi Peng wrote:> I would like> to have a small C code and then compile and linked as dynamic library so> that it can be imported by python
On Tuesday 13 December 2005 7:24 pm, Zhi Peng wrote:
> I would like
> to have a small C code and then compile and linked as dynamic library so
> that it can be imported by python code as we had in Linux platform.
Are you doing exactly the same thing on OS-X and Linux? Are you using
distutils to c
If part of all code can be compiled as .so library on Mac and also be imported by python, it will be ideal case. As I tried swig utility, it seems it does not work well on Mac. It does not show the error message. I do not know the reason. The compile and ld linker seems fine. I would like to have
On Dec 13, 2005, at 4:45 PM, Zhi Peng wrote:
> See if I go the right direction.
>
> On Wed, I will use my old code to build .so file which is run on
> Linux. See what happen.
>
> I used swig and get name.so file and get rid of error message. When
> I start python or pythonw and import name
>
See if I go the right direction. On Wed, I will use my old code to build .so file which is run on Linux. See what happen. I used swig and get name.so file and get rid of error message. When I start python or pythonw and import name from command line, it just hang there. It is interesting
On Dec 13, 2005, at 3:59 PM, Zhi Peng wrote:
> As I tried to make shared dynamic library, ld command shows some
> error message
>
> ld: Undefined symbols:
> dyld_stub_binding_helper
>
> I do not know which lib including this "dyld_stub_binding_helper"
> even though I used "nm" to find it. The
Hi! Bob As I tried to make shared dynamic library, ld command shows some error message ld: Undefined symbols: dyld_stub_binding_helper I do not know which lib including this "dyld_stub_binding_helper" even though I used "nm" to find it. The list libs that I used is -L/usr/lib -L/usr
On Dec 13, 2005, at 1:30 PM, Zhi Peng wrote:
> Actually there is only one step away, that is, pythonw and python.
> With python, I can import modules by using PyImport_ImportModule
> ("name"). But I have to use pythonw since I used appscript. Then I
> can not import modules sucessfully with
Bob Actually there is only one step away, that is, pythonw and python. With python, I can import modules by using PyImport_ImportModule("name"). But I have to use pythonw since I used appscript. Then I can not import modules sucessfully with same commands. If converting C code to python, th
You don't have to change it all to Python, you just need to refactor it a bit. Instead of embeding Python from C, you embed C from Python. Of course, it's better to prefer Python code because there will be less of it, it's not always a good idea to just throw all the old code away.-bobOn Dec 13,
Hi! Bob What you suggested is right. The interesting thing is that I have a lot of old c code which will try to call python code. It is true that I can write pure python code and use py2app (I use py2exe on windows) to make an executable. That will make life easy. But .. I think tha
On Dec 13, 2005, at 12:18 PM, Zhi Peng wrote:
> If we use pythonw, then there may be problem in C code to call the
> python code with appscript inside because it seems
> PyImport_ImportModule("ModuleName") only works with python instead
> of pythonw.
pythonw is just a shell script. You're
First of all, Thanks 'Has"'s help during past months. If we use pythonw, then there may be problem in C code to call the python code with appscript inside because it seems PyImport_ImportModule("ModuleName") only works with python instead of pythonw. By the way, I have another question fo
Kevin Walzer wrote:
>Not sure if appscript modules can be run interactively with the Python
>interpreter/shell--has can chime in here.
Sure, as long as you use pythonw. An interactive shell can be quite handy when
learning your way around an application's object model; appscript's built-in
help
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Zhi Peng wrote:
> Hi! All
>
> I posted a few items in a few days. I think the first
> problem I had is that it can not import python module
> when I used "from appscrpt import *" inside modue
> because appscript need pythonw instead of python. Here
>
On Dec 13, 2005, at 10:02 AM, Zhi Peng wrote:
> I posted a few items in a few days. I think the first
> problem I had is that it can not import python module
> when I used "from appscrpt import *" inside modue
> because appscript need pythonw instead of python. Here
> is the error message:
--
>
Hi! All
I posted a few items in a few days. I think the first
problem I had is that it can not import python module
when I used "from appscrpt import *" inside modue
because appscript need pythonw instead of python. Here
is the error message:
Hi! All
I posted a few items in a few days. I think the first
problem I had is that it can not import python module
when I used "from appscrpt import *" inside modue
because appscript need pythonw instead of python. Here
is the error message:
18 matches
Mail list logo