Нахождение порта apache (верно для mod_python) req.connection.local_addr[1] Стандартный результат будет «80»
Monthly Archives:: Август 2010
Проверка на тип в Python
d={} if type(d)==type(dict()): print ‘Its dict!’ else: print ‘Its not dict’ 2 способ (более лучший ИМХО): d={} if type(d) is dict: print ‘Its dict!’ else: print ‘Its not dict’
Свежие комментарии