Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Can you manipulate bits and memory directly using Python? If yes, wouldn't that be a best option to dealing with performance-critical spots than C bindings?

share|improve this question
3  
Based on what I've read about python, I think this is the one thing that python can't do, almost by design. – joshin4colours Mar 10 '12 at 3:39
3  
Manipulating bits and memory is low level, but that doesn't mean it will improve performance much. – Pubby Mar 10 '12 at 4:26

1 Answer

You can write your own extension in C and there manipulate bits and memory.

http://docs.python.org/extending/

Are you sure you are cpu-bound and need this?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.