Re: Binary Decimals in Python

2010-03-30 Thread Grant Olson
rammers...) On 3/30/2010 11:43 AM, Shashwat Anand wrote: > The conversion is not supported for decimal integers AFAIK, however > '0b123.456' is always valid. I guess you can always get a decimal number > convertor onto Python-recipes > > > > On Tue, Mar 30,

Re: Binary Decimals in Python

2010-03-30 Thread Grant Olson
On 3/30/2010 11:13 AM, aditya wrote: > To get the decimal representation of a binary number, I can just do > this: > > int('11',2) # returns 3 > > But decimal binary numbers throw a ValueError: > > int('1.1',2) # should return 1.5, throws error instead. > > Is this by design? It seems to me tha

ANN: Pyasm version 0.3

2010-03-28 Thread Grant Olson
Pyasm is a full-featured dynamic assembler written entirely in Python. By dynamic, I mean that it can be used to generate and execute machine code in python at runtime without requiring the generation of object files and linkage. It essentially allow 'inline' assembly in python modules on x86 platf

ANN: Compyler 0.1

2007-08-11 Thread Grant Olson
Compyler is a pre-alpha x86 native code compiler. So far it can generate primitive .pyds but not standalone executables. It can run some simple test cases including pystones (although there is a memory leak there). And no, I don't expect it'll ever be much faster than Cpython . I was primarily i

Does the world need another v0.1 python compiler?

2007-02-07 Thread Grant Olson
I'm feeling a little guilty here. I spent a lot of my free time last year working on an x86 compiler for python. I made a reasonable amount of progress, but my interests wandered off into other areas. I basically just got bored and stopped working on the thing maybe 6 months ago. So today, I we

[ANN] pyasm 0.2 - dynamic x86 assembler for python

2005-03-08 Thread Grant Olson
PyASM by Grant Olson = PyASM is a dynamic x86 assembler for python. By "dynamic", I mean that it can be used to generate inline assembly functions in python at runtime without requiring object file generation or linkage. New in v

Safe string escaping?

2005-03-07 Thread Grant Olson
I have a data file that has lines like "foo\n\0" where the \n\0 is acutally backslash+n+backslash+0. I.E. a repr of the string from python would be "foo\\n\\0". I'm trying to convert this string into one that contains actual newlines and whatnot. I feel like there has to be a better and safer wa

[ANN] pyasm 0.1 - x86 assembler for Python

2005-02-28 Thread Grant Olson
pyasm 0.1 - x86 assembler for Python This release is for early adopters only. It is not properly packaged and doesn't have very good documentation. It is however a functional assembler that should be of interest to some people. Current output targets include Windows-style COFF files that can be