Okay, I realize that python is an interpreted language, so there's no compiling and therefore no linking, so I don't even know for sure if what I'm asking is possible.
If I write a script which uses a third-party module such as scipy and I would like to distribute that script, is it possible to do so in a way that the user can still execute it even if they don't have the numpy package installed?
Equivalent to static linking?
Page 1 of 13 Replies - 386 Views - Last Post: 30 January 2012 - 07:40 PM
Topic Sponsor:
Replies To: Equivalent to static linking?
#2
Re: Equivalent to static linking?
Posted 30 January 2012 - 08:21 AM
I do believe that you can simply include the .py or .pyc file in a directory that you distribute. Then, you simply do the following:
import sys
sys.path.append("path/to/modules/directory")
import module
#3
Re: Equivalent to static linking?
Posted 30 January 2012 - 01:23 PM
This may sound like a stupid question, but would that work on any OS?
#4
Re: Equivalent to static linking?
Posted 30 January 2012 - 07:40 PM
You may have to change the "/" to "\\" for windows or use the sys.path.sep characters.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|