Re: [Tutor] Distributing Python Code for Commercial Porpoises?

2010-08-06 Thread j ram
>
> My intent though is really not to produce a commercial product. My question
> relates to difficulty my partner and I have to exchanging py programs w/o
> him stumbling. I send him a py program written using Windows Python 2.5. He
> has the same. I've executed it IDLE and it works fine. He executes, and it
> squawks per my post here on finding a version #, showing his output. We need
> to make sure we are on the same playing ground with numpy and scipy.
>
>
Why not try bundling your .py modules in a zip file and then importing the
run modules from this zip file? In that way, the package integrity is
ensured. You'd just have to ship your collaborator the zip archive and also
make sure that both of you are running the same versions of numpy, scipy,
python and other packages.

http://docs.python.org/library/zipimport.html

http://www.doughellmann.com/PyMOTW/zipimport/

Regards,
Iyer
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Converting .pyd to .so

2011-02-28 Thread j ram
> Wine is a good suggestion, but it takes up 3.53 MB. Is there a lighter
>> alternative?
>>
>
> So far, you didn't state whether the DLL actually uses Windows calls, but I
> would imagine it does, and if so, you can't use it on anything but Windows
> without emulating those calls, thus using Wine.
>
>
Sorry for not being more specific, the DLL actually uses Windows calls.



> If it's available in source form (C? C++? What else?), you can extract the
> part that's interesting to you and wrap that using Cython or ctypes (with
> Cython being substantially faster than SWIG or ctypes).
>
>
The Source is C. I've heard of Cython, would Cython be a more portable
alternative?


> However, you didn't give us any hints about what the DLL actually does, so
> we can't know if you really need to go that path or if you just failed to
> find the obvious portable alternative.
>
>
>
The DLL wraps a device driver, and the library of the SWIG wrapped device
driver calls is invoked from a Python app. I was trying to find how this
device driver (DLL) could be used on Linux without having to re-write the
whole driver code for Linux.

Thanks,
Iyer
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor