All Samples(8463) | Call(7746) | Derive(0) | Import(717)
int(x[, base]) -> integer Convert a string or number to an integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of a floating point number!) When converting a string, use the optional base. It is an error to supply a base when converting a non-string. If base is zero, the proper base is guessed based on the string content. If the argument is outside the integer range a long object will be returned instead.
src/p/y/pyserial-HEAD/trunk/pyserial/examples/rfc2217_server.py pyserial(Download)
options.verbosity = 3
level = (
logging.WARNING,
logging.INFO,
logging.DEBUG,
logging.NOTSET,
)[options.verbosity]
logging.basicConfig(level=logging.INFO)
logging.getLogger('root').setLevel(logging.INFO)
src/p/y/pyserial-HEAD/pyserial/examples/rfc2217_server.py pyserial(Download)
options.verbosity = 3
level = (
logging.WARNING,
logging.INFO,
logging.DEBUG,
logging.NOTSET,
)[options.verbosity]
logging.basicConfig(level=logging.INFO)
logging.getLogger('root').setLevel(logging.INFO)
src/p/y/pyogp.apps-0.1dev/pyogp/apps/examples/parse_packets.py pyogp.apps(Download)
import traceback
from pyogp.lib.base.message.udpdeserializer import UDPMessageDeserializer
from pyogp.lib.base.settings import Settings
from logging import getLogger, StreamHandler, Formatter, CRITICAL, ERROR, WARNING, INFO, DEBUG
logger = getLogger('parse_packet')
src/p/y/pyserial-2.5/examples/rfc2217_server.py pyserial(Download)
options.verbosity = 3
level = (
logging.WARNING,
logging.INFO,
logging.DEBUG,
logging.NOTSET,
)[options.verbosity]
logging.basicConfig(level=logging.INFO)
logging.getLogger('root').setLevel(logging.INFO)
src/s/l/SleekXMPP-HEAD/examples/echo_client.py SleekXMPP(Download)
# Output verbosity options.
optp.add_option('-q', '--quiet', help='set logging to ERROR',
action='store_const', dest='loglevel',
const=logging.ERROR, default=logging.INFO)
optp.add_option('-d', '--debug', help='set logging to DEBUG',
action='store_const', dest='loglevel',
const=logging.DEBUG, default=logging.INFO)
optp.add_option('-v', '--verbose', help='set logging to COMM',
action='store_const', dest='loglevel',
const=5, default=logging.INFO)
src/s/l/SleekXMPP-HEAD/examples/config_component.py SleekXMPP(Download)
# Output verbosity options.
optp.add_option('-q', '--quiet', help='set logging to ERROR',
action='store_const', dest='loglevel',
const=logging.ERROR, default=logging.INFO)
optp.add_option('-d', '--debug', help='set logging to DEBUG',
action='store_const', dest='loglevel',
const=logging.DEBUG, default=logging.INFO)
optp.add_option('-v', '--verbose', help='set logging to COMM',
action='store_const', dest='loglevel',
const=5, default=logging.INFO)
src/c/h/changingsong-HEAD/trunk/samples/debug_mode/debugmode.py changingsong(Download)
elif level == "warning":
level = logging.WARNING
elif level == "info":
level = logging.INFO
elif level == "debug":
level = logging.DEBUG
file = options.debugfile
src/c/h/changingsong-HEAD/samples/debug_mode/debugmode.py changingsong(Download)
elif level == "warning":
level = logging.WARNING
elif level == "info":
level = logging.INFO
elif level == "debug":
level = logging.DEBUG
file = options.debugfile
src/n/o/notmm-0.4.1/examples/satchmo_store/contrib/satchmo/projects/base/local_settings.py notmm(Download)
fileLog.setFormatter(formatter)
# add the handler to the root logger
logging.getLogger('').addHandler(fileLog)
logging.getLogger('keyedcache').setLevel(logging.INFO)
logging.info("Satchmo Started")
src/p/y/python-ogre-HEAD/trunk/python-ogre/demos/SampleFramework.py python-ogre(Download)
filemode='w')
# define a Handler which writes INFO messages or higher to the sys.stderr
console = logging.StreamHandler()
console.setLevel(logging.INFO)
# set a format which is simpler for console use
formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s')
# tell the handler to use this format
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next