开发者

Using Crypto by placing folder in python path? - Python

I'm using Django in order to serve a web service. I have only access to FTP and code refresh at the moment. No access to command-line or executing any kind of executable.

I am using a Windows 开发者_StackOverflow中文版Server 2005 machine.

Would I be able to use Crypto just by placing the folder within my Django project?

Are there any good alternatives if not?


Help would be amazing guys!!!


You'll need to build pycrypto before you upload it. This will need to be done on a machine with as similar an environment to your server as possible.

To build, run python setup.py build from inside the pycrypto-2.1.0 directory. This will create build\lib.win32-2.6\Crypto (the name of the libxxx directory might be a little different).

FTP the Crypto folder to somewhere on your server's python path. Inside the Django project folder may or may not work. A safe bet is to put it right in your site-packages folder, if you have access to it.

I don't know much about deploying on Windows, but usually you need to restart the server to reload the application whenever you make any changes. Hopefully that's what you meant by 'code refresh'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜