Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread Alan Gauld
On 17/01/13 02:10, Dave Angel wrote: I don't recall enough about Windows to be sure whether putenv would work, but the environment variable Windows uses to search for DLL's is certainly not LD_LIBRARY_PATH If you check the code Albert is actually using different variables per platform. For Wi

Re: [Tutor] learning to program in cython

2013-01-17 Thread Albert-Jan Roskam
>> With the help of an awesome python community I have been able to pick up the >> language and now willing to explore other cool extensions of it. > >Good work! > >> >> I routinely have large loops which could be ported to cython for speed. >> However I have never written a single line of cython

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread Albert-Jan Roskam
> Subject: Re: [Tutor] Set LD_LIBRARY_PATH and equivalents > platform-independently > > On 01/16/2013 07:05 PM, Alan Gauld wrote: >> On 16/01/13 21:06, Albert-Jan Roskam wrote: >> >>> Is there a builtin function that can set LD_LIBRARY_PATH or equivalents >>> platform-independently? >> >>

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread eryksun
On Wed, Jan 16, 2013 at 4:06 PM, Albert-Jan Roskam wrote: > > Is there a builtin function that can set LD_LIBRARY_PATH or equivalents > platform-independently? It would be nice use such a function in a setup > script. Modifying LD_LIBRARY_PATH only affects child processes (ld.so caches the search

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread eryksun
On Thu, Jan 17, 2013 at 7:14 AM, Albert-Jan Roskam wrote: > > Thanks for your replies. os.putenv() may be easier than os.environ because, > hopefully, it takes care of the OS-specific separators of the values (";" > for Windows, ":" for Linux, others I don't know but I'd guess they're all > ":").

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread Albert-Jan Roskam
Original Message - > From: eryksun > To: Albert-Jan Roskam > Cc: Python Mailing List > Sent: Thursday, January 17, 2013 3:21 PM > Subject: Re: [Tutor] Set LD_LIBRARY_PATH and equivalents > platform-independently > > On Wed, Jan 16, 2013 at 4:06 PM, Albert-Jan Roskam > wrote: >>

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread Alan Gauld
On 17/01/13 12:14, Albert-Jan Roskam wrote: Thanks for your replies. os.putenv() may be easier than os.environ because, > hopefully, it takes care of the OS-specific separators of the values > (";" for Windows, ":" for Linux, others I don't know I wouldn't count on it. Support for changing env

Re: [Tutor] learning to program in cython

2013-01-17 Thread Oscar Benjamin
On 17 January 2013 11:52, Albert-Jan Roskam wrote: > > I recently used Cython for the first time and I found it surprisingly easy. > The installation under Linux > is easy, but seems to be not really trivial under Windows (I never tried > installing it under windows though; I'd first try one of

Re: [Tutor] Json encode and decode on Puython 2.4

2013-01-17 Thread Dotan Cohen
On Thu, Jan 17, 2013 at 1:15 AM, Steven D'Aprano wrote: > Python 2.4 is no longer receiving security updates. If you're exposing a > web app on the Internet using Python 2.4, it's just a matter of time > before you're hacked. > > Time to change hosting companies, methinks. > The time to get rid o

[Tutor] Warning for users of the Python and Jython wiki

2013-01-17 Thread Steven D'Aprano
Hello all, Some time recently, the wiki at http://wiki.python.org/ was hacked. The vandal who broke in deleted all the wiki data. However, it is possible that before destroying the data, he may have gained access to user passwords. If you had an account on the wiki, and use the same password els

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread eryksun
On Thu, Jan 17, 2013 at 10:33 AM, Albert-Jan Roskam wrote: > > The goal is to load the C libraries (dll, so, dylib, etc) that my program > needs. > > Anyway, I looked up your two suggestions about library_dirs and > runtime_library_dirs. What is meant by "at link time"? library_dirs adds search p

Re: [Tutor] HELP- Regarding working with python

2013-01-17 Thread Gayathri S
hi... I am using principal component analysis for dimensionality reduction in python. am having this following error... >>> import numpy as np >>> import matplotlib.pyplot as plt >>> import mlpy >>> np.random.seed(0) >>> mean,cov,n=[0,0],[[1,1],[1,1.5]],100 >>> x=np.random.multivariate_no