Re: Byte-operations.

2005-05-19 Thread Dan Bishop
Dave Rose wrote: > I hope someone can please help me. A few months ago, I found a VBS file, > MonitorEDID.vbs on the internet. ...[snip]... > Anyway, the functions from VBS I don't know how to translate to Python are: > > #location(0)=mid(oRawEDID(i),0x36+1,18) > #location(1)=mid(o

Re: Byte-operations.

2005-05-19 Thread GMane Python
For anyone who cares out there, I tried a slice with hex values: IDLE 1.0.3 >>> a =['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17 ','18','19','20'] >>> print a[3:4] ['4'] >>> print a[0xa:0xc] ['11', '12'] >>> print a[0xa:0xa+5] ['11', '12', '13', '14', '15'] -Dave "J

Re: Byte-operations.

2005-05-19 Thread Jeff Epler
In Python, "chr" gives a 1-byte string from a small integer, "ord" does the reverse. Strings are concatenated with "+" and substrings are taken with the slice operator, s[pos1:pos2]. I'm not a visual basic expert, but it looks like these are the operations the code below performs. Jeff pgpWpqb

Byte-operations.

2005-05-18 Thread Dave Rose
I hope someone can please help me. A few months ago, I found a VBS file, MonitorEDID.vbs on the internet. It is great in that it will extract from the registry of Windows the serial number of the attached monitor. (System Administration / PC Inventory usage is obvious) Standalone, it works fi