Re: set environmental variable from python

2014-10-30 Thread Artur Bercik
I have to set several variables so it would be easier if I could set them from Python. On Fri, Oct 31, 2014 at 11:36 AM, Rustom Mody wrote: > On Friday, October 31, 2014 8:01:08 AM UTC+5:30, Zachary Ware wrote: > > On Thursday, October 30, 2014, Artur Bercik wrote: > > >

Re: set environmental variable from python

2014-10-30 Thread Artur Bercik
could you please elaborate 'setx <...>'? On Fri, Oct 31, 2014 at 11:30 AM, Zachary Ware < zachary.ware+pyl...@gmail.com> wrote: > On Thursday, October 30, 2014, Artur Bercik wrote: > >> Dear Dave Angel >> >> Thanks for your answer. >> >>

Re: set environmental variable from python

2014-10-30 Thread Artur Bercik
Dear Dave Angel Thanks for your answer. I am using Python 2.7 I want to set it permanently. I have to set several variables so it would be easier if I could set them from Python. Hearing the solution. On Fri, Oct 31, 2014 at 10:50 AM, Dave Angel wrote: > On 10/30/2014 09:22 PM, Artur Ber

set environmental variable from python

2014-10-30 Thread Artur Bercik
I have to set environmental variable in my windows PC as follows: variable name: GISBASE value: C:\GRASS-64 Is it possible to set it from python? import sys sys.path.append("C:\\GRASS-64") But how to give variable name? I have to set both the variable name and value. Thanks in the advance.

Re: Extract Indices of Numpy Array Based on Given Bit Information

2014-10-18 Thread Artur Bercik
On Sat, Oct 18, 2014 at 4:10 PM, Chris Angelico wrote: > On Sat, Oct 18, 2014 at 6:02 PM, Artur Bercik wrote: > > So, the Bit No. 2-5 for the following case is '1101', right? > > > > 1073741877: 1110101 > > > > If my requir

Re: Extract Indices of Numpy Array Based on Given Bit Information

2014-10-18 Thread Artur Bercik
18, 2014 at 3:50 PM, Chris Angelico wrote: > On Sat, Oct 18, 2014 at 5:42 PM, Artur Bercik wrote: > > I got some sense, but could not imagine if required Bit No. 2–5, and Bit > > Combination . > > > > I hope example with the new case would make me more sense. &g

Re: Extract Indices of Numpy Array Based on Given Bit Information

2014-10-18 Thread Artur Bercik
PM, Artur Bercik wrote: > > I want to get the index of my data where the following occurs: > > > > Bit No. 0–1 > > Bit Combination: 00 > > So, what you want to do is look at each number in binary, and find the > ones that have two zeroes

Extract Indices of Numpy Array Based on Given Bit Information

2014-10-17 Thread Artur Bercik
Dear Python and Numpy Users: My data are in the form of '32-bit unsigned integer' as follows: myData = np.array([1073741824, 1073741877, 1073742657, 1073742709, 1073742723, 1073755137, 1073755189,1073755969],dtype=np.int32) I want to get the index of my data where the following occurs: Bit No.