Re: ldap or active directory module

2016-09-09 Thread Shyam Parimal Katti
Sure, have you tried it and failed? I remember using this: https://www.python-ldap.org/docs.html year back and was able to do many operations including lookups. On Fri, Sep 9, 2016 at 5:41 AM, Robert Clove wrote: > Is it possible to find the following things using python ldap or active > direc

Code suggestion - List comprehension

2013-12-12 Thread Shyam Parimal Katti
Hello, I have a list of sql queries, some which are split across multiple list elements e.x. ['drop table sample_table;', 'create table sample_test', '(col1 int);', 'select col1 from', ' sample_test;'] A semi-colon in the string value indicates the termination of a sql query. So the expected out

Tracking the status of python script execution

2013-12-11 Thread Shyam Parimal Katti
Hello All, I am looking for a library that can help me trace the status of a live python script execution. i.e if I have a python script `x.py` with 200 lines, when I execute the script with `python x.py`, is there a way to trace the status of this execution in terms of number of lines executed so

Re: Converting hex data to image

2013-11-14 Thread Shyam Parimal Katti
Perfect. Thank you @Ben and @Tim On Thu, Nov 14, 2013 at 4:29 PM, Ben Finney wrote: > Ben Finney writes: > > > To turn a byte string into a file-like object for use with PIL, extract > > the byte string as ‘image_data’, use the standard library ‘io.StringIO’ > > class http://docs.python.org/3/l

Converting hex data to image

2013-11-14 Thread Shyam Parimal Katti
I am implementing an authentication system(in Django) using LDAP as the backend(django-auth-ldap). When we fetch the data from the LDAP server for a particular valid user, the data associated with the user contains the thumbnail photo in hex representation. E.x.: [('CN=XX,OU=Users,OU=Accounts,DC=t

Iterate through a list of tuples for processing

2013-09-20 Thread Shyam Parimal Katti
I have a list of tuples where the number of rows in the list and the number of columns in tuples of the list will not be constant. i.e. list = [(a1,b1, …z1), (a2,b2, …, z2),…. ,(am,bm, … , zm )]. It can be compared to the SQL results, as the number of columns change in the sql, the number of col