Re: [python-cffi] Fwd: Re: Progress migrating cffi and pycparser to libclang

2018-01-06 Thread Eli Bendersky
On Fri, Jan 5, 2018 at 1:15 AM, Etienne Robillard wrote: > Forwarding this thread to the CFFI developers... > > Re Paul: Thanks for your feedback. > > My intended audience are developers who can use hg to fetch/build source > code without pip. > > Best regards, > > Etienne > I'd like to underst

Re: [Python-Dev] [RELEASED] Python 3.3.0

2012-09-29 Thread Eli Bendersky
On Sat, Sep 29, 2012 at 5:18 AM, Georg Brandl wrote: > On behalf of the Python development team, I'm delighted to announce the > Python 3.3.0 final release. > Yay :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling super() in __init__ of a metaclass

2011-08-06 Thread Eli Bendersky
On Sat, Aug 6, 2011 at 11:04, Chris Rebert wrote: > On Sat, Aug 6, 2011 at 12:34 AM, Eli Bendersky wrote: >> Consider this standard metaclass definition: >> >> class MyMetaclass(type): >>    def __init__(cls, name, bases, dct): >>        super(MyMetaclas

Calling super() in __init__ of a metaclass

2011-08-06 Thread Eli Bendersky
Consider this standard metaclass definition: class MyMetaclass(type): def __init__(cls, name, bases, dct): super(MyMetaclass, cls).__init__(name, bases, dct) # do meta-stuff class Foo(object): __metaclass__ = MyMetaclass The call "super(MyMetaclass, cls)" should returns t

stopping a thread with _Thread__stop

2011-08-05 Thread Eli Bendersky
This recipe: http://code.activestate.com/recipes/576780-timeout-for-nearly-any-callable/ Claims that a Python thread can be stopped by executing the private method "Thread._Thread__stop". I don't think this is true, since _Thread__stop doesn't really stop or kill the thread. In conformance to the

Re: Bit fields in python?

2010-09-14 Thread Eli Bendersky
> Hi, > > I'm trying to use the construct library, but encountered a problem. May I > know how do I implement the following using the construct library? > > typedef struct > { > unsigned short size; > . > . > }CodecInfo; > > typedef struct > { > unsigned short size; > CodecInfo

Re: Bit fields in python?

2010-09-07 Thread Eli Bendersky
> > > I'm trying to rewrite a c program in python & encountered several problems. > I have some data structures in my c program like below: > > typedef struct > { > unsigned short size; > > unsigned short reserved:8; > unsigned short var_a1:2; > unsigned short var_a2:2; > unsign

Re: Python library for Sequence Matching/Comparison

2010-08-07 Thread Eli Bendersky
On Sat, Aug 7, 2010 at 12:32, Sohail wrote: > Hi, > > Is there any sequence matching library in (apart from difflib) to > compare sequences of natural text? > > thanks > -- > http://mail.python.org/mailman/listinfo/python-list > Are you aware of NLTK? It has a lot of sub-libraries for almost any

Re: parsing a c project

2010-08-04 Thread Eli Bendersky
On Wed, Aug 4, 2010 at 14:33, Aitor Garcia wrote: > Hi, > > I need to know the memory locations of all variables in a C project > including > variables allocated inside structs. > Aitor, try the pycparser project (http://code.google.com/p/pycparser/) - it's a complete ISO C parser in pure Python

co_firstlineno on decorated functions

2010-08-01 Thread Eli Bendersky
Hello, I've been tinkering with __code__.co_firstlineno for testing the trace.py module (Python Issue 9315), and ran into an interesting problem. Consider this code: def dummydecorator(f): return f def foo(a): return a @dummydecorator def bar(a): return a if __name__ == "__main__

Re: Basic Information about Python

2010-07-30 Thread Eli Bendersky
On Fri, Jul 30, 2010 at 16:55, Durga D wrote: > Hi JM, > > Thanks alot for your prompt response. > > If I include into windows setup, what will be setup size (assume > before include 10 MB)? i mean, python supporting dlls/libs size for > python exe. > IIRC, the size of a simple "hello world"

Re: Hello

2010-07-10 Thread Eli Bendersky
On Fri, Jul 9, 2010 at 19:31, Dani Valverde wrote: > Hello! > I am new to python and pretty new to programming (I have some expertise wit > R statistical programming language). I am just starting, so my questions may > be a little bit stupid. Can anyone suggest a good editor for python? > Cheers!

Re: ipython problem in opening a file

2010-07-09 Thread Eli Bendersky
On Fri, Jul 9, 2010 at 16:07, Youngung Jeong wrote: > Thank you for your kindness. > I found you're right. It's running in that folder. > What should I do for making this work? > Could you please tell me a bit more... > > Youngung You can change the "current directory" ipython executes in, by eit

Re: ipython problem in opening a file

2010-07-09 Thread Eli Bendersky
> One of the many things I tried, is as below. > > * > > > f=open('od.txt','w') > --- > IOError                                   Traceback (most recent call > last) > > C:\Window

Re: Sorting dicts inside dicts

2010-07-03 Thread Eli Bendersky
On Sat, Jul 3, 2010 at 03:34, MRAB wrote: > abhijeet thatte wrote: > >> Hi, >> I have a huge dict structure like below: >> >> /*{'module':{'reg_dict_0':{'name':'abc','reg_addr':'2004'},'reg_dict_1':{'name':'xyz','reg_addr':'2002'},'reg_dict_2':{'name':'pqr','reg_addr':'2008'}}*/ >> >> Module dict