Re: [BangPypers] Need help understanding -9 >> 1

2012-06-29 Thread Anand Chitipothu
On Fri, Jun 29, 2012 at 3:40 PM, Varun Narang wrote: > Hi all, > > I need some help understanding the right shift operation on -9. To my > understanding, it's represented as -0b1001, Now, if I shift it one place to > right, it should give me -0b0100, which is decimal equivalent of 4. but > running

Re: [BangPypers] Need help understanding -9 >> 1

2012-06-29 Thread Navin Kabra
Varun Narang writes: > I need some help understanding the right shift operation on -9. To my > understanding, it's represented as -0b1001, No. Integers are represented using 2s complement integers. So -9 will actually be represented by 0xfff7. When you shift it to the right, a '1' is shifted

[BangPypers] Need help understanding -9 >> 1

2012-06-29 Thread Varun Narang
Hi all, I need some help understanding the right shift operation on -9. To my understanding, it's represented as -0b1001, Now, if I shift it one place to right, it should give me -0b0100, which is decimal equivalent of 4. but running this on python console gives me -5. Please help me out here. T

Re: [BangPypers] virdual drive

2012-06-29 Thread Noufal Ibrahim
Nitin Kumar writes: > windows 7/xp [...] That's out of my province but I expect you'll have to tie into the file system drivers to implement something like this and that's not something you do in pure python. You'll either have to implement some low level parts in C and then wrap that in Python

Re: [BangPypers] virdual drive

2012-06-29 Thread Nitin Kumar
windows 7/xp On Fri, Jun 29, 2012 at 3:00 PM, Noufal Ibrahim wrote: > Nitin Kumar writes: > > > Hi All, > > > > I want to create a virtual drive (floppy or CD) on my machine using > > Python. Can anyone please suggest me? > > What platform? > > -- > Cordially, > Noufal > http://nibrahim.net.in

Re: [BangPypers] virdual drive

2012-06-29 Thread Noufal Ibrahim
Nitin Kumar writes: > Hi All, > > I want to create a virtual drive (floppy or CD) on my machine using > Python. Can anyone please suggest me? What platform? -- Cordially, Noufal http://nibrahim.net.in ___ BangPypers mailing list BangPypers@python.or

[BangPypers] virdual drive

2012-06-29 Thread Nitin Kumar
Hi All, I want to create a virtual drive (floppy or CD) on my machine using Python. Can anyone please suggest me? -- Nitin K ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers