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
return n
elif (c1==-127):
n = c2
n = n | c3<<8
n = n | c4<<16
return n | c5<<24
else:
return c1
def __main__():
val = getint(129,51,110,1,0)
print val
__main__()
def uptime():
global iaddr, UDPInfo
UDPInfo.sendto("\0\0",iaddr)
UDPInfo.settimeout(10) #1.5)
data, iaddr = UDPInfo.recvfrom(buf)
data = data[4:]
print data
humans = ''
unhumans = ''
morsel = ''
map = '_default_'
gmode = 0
srvinf = []
contdisp = 1
data2 = []
for c in data:
o = ord(c)
data2.append(o)
data = data2[:]
if (len(data) < 4):
data[3] = 0
data[4] = 0
elif (len(data) < 5):
data[4] = 0
print data[2]
print getint(int(data[0]),data[1],data[2],data[3],data[4])