All pastes #837955 Raw Edit

Stuff

public text v1 · immutable
#837955 ·published 2007-12-30 00:39 UTC
rendered paste body
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import dbus
import sys
import os
import pickle
from dcopext import DCOPClient,DCOPApp
from random import randint

def getint(c1,c2,c3,c4,c5):
        n=0

        if (c1 >127) :
                c1 = c1-256

        if (c1==-128):
                n = c2
                n = n | c3<<8
        elif (c1==-127):
                n = c2
                n = n | c3<<8
                n = n | c4<<16
                n = n | c5<<24
        else:
                n = c1

        if (n > 2147483647):
            n = n - 4294967296;

        return n;

def __main__():
        val = getint(129,156,114,1,0)
        print val

__main__()