#!/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(zahl): c3 = int(zahl) & 0xFF c2 = (int(zahl) >> 8) & 0xFF c1 = (int(zahl) >> 16) & 0xFF c4 = (int(zahl) >> 24) & 0xFF n=0 if (c1 >127) : c1 = c1-256 print 'c1=',c1, 'c2=', c2, 'c3=', c3, 'c4=', c4 if (c1==-128): n = c2 n = n | c3<<8 return n elif (c1==-127): n = c2 n = n | c3<<8 n = n | c4<<16 return n | c1<<24 else: return c1 def __main__(): val = getint(8434451) print val __main__()