*gadjo.requestprovider* solves the problem of accessing django's HTTPRequest object whenever is needed, without explicitely passing it down the path of code.read more at pypi django requestprovider's home
Showing posts with label python. Show all posts
Showing posts with label python. Show all posts
django request object provider
python subtypes
- published: pypi (cheeseShop)
- svn: loophole's repository
- documentation can be found on packages.python.org
- currently implemented: weaktuple
- coming soon: weakbools, typed lists
playground: python safeint type
safeint.py source
safeint type is supposed to help simplifying the logic of computations with integers explicitly defined within some boundaries when you want the results of safeint algebraic operations to also respect the defined boundaries.
safeint type is supposed to help simplifying the logic of computations with integers explicitly defined within some boundaries when you want the results of safeint algebraic operations to also respect the defined boundaries.
google appengine python sdk startup problems
if you have any google eggs in your system (like protobuf for example) and you are trying to start the google appengine sdk you will get a "could not find version file" error. this is mainly caused by coding outside python peps guidelines (more exactly, package namespaces) and some more bad coding style.
I reported this bug just after last year's christmas but I guess the appengine has so many bugs they are busy with something else more important :-P
I gave detailed infos on the appengine bugtracker. The patch that fixes the problem is also available here.
if the live appengine is written the same way ...
i wish you happy hacking.
I reported this bug just after last year's christmas but I guess the appengine has so many bugs they are busy with something else more important :-P
I gave detailed infos on the appengine bugtracker. The patch that fixes the problem is also available here.
if the live appengine is written the same way ...
i wish you happy hacking.
getting exotic socket options in python
note: this post appeared here because of me not reading the documentation properly.
more specifically, after reading python's socket module documentation i understood that you can't get to read socket options that are not defined in the libc headers. more, i concluded that you can't get to read anything else than integers either, once i also missed the explanation for bufflen argument. ofcourse, this is totally false but by the time i figured i'm stupid i already had two other ways of getting one of the exotic socket options installed by third party system software. specifically, the SO_ORIGINAL_DST option defined by linux netfilter. one way was by writing a C extension (not gonna talk about it here as i don't have anything new on the subject) and the other was by using ctypes module to load and call libc' s getsockopt. however i will provide in the end the correct one-liner that does it right without any headache... if you know your weapon.
more specifically, after reading python's socket module documentation i understood that you can't get to read socket options that are not defined in the libc headers. more, i concluded that you can't get to read anything else than integers either, once i also missed the explanation for bufflen argument. ofcourse, this is totally false but by the time i figured i'm stupid i already had two other ways of getting one of the exotic socket options installed by third party system software. specifically, the SO_ORIGINAL_DST option defined by linux netfilter. one way was by writing a C extension (not gonna talk about it here as i don't have anything new on the subject) and the other was by using ctypes module to load and call libc' s getsockopt. however i will provide in the end the correct one-liner that does it right without any headache... if you know your weapon.
implicit, may-be-safe super.__init__ call on derived class instantiation: a starting point
What do I really understand by inheritance? I mean, what is to be inherited?
I would say it is behavior ... and that would be enough. It's a sane way to propagate knowledge. You don't want to inherit data from your ancestors other way than compiled as carefully selected behaviors that will eventually help you interpret a live information stream and that you can upgrade to something well suited for your existence.
I would say it is behavior ... and that would be enough. It's a sane way to propagate knowledge. You don't want to inherit data from your ancestors other way than compiled as carefully selected behaviors that will eventually help you interpret a live information stream and that you can upgrade to something well suited for your existence.
Subscribe to:
Comments (Atom)