All Samples(464) | Call(0) | Derive(0) | Import(464)
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/s/h/shedskin-HEAD/examples/bh.py shedskin(Download)
""" from time import clock from sys import stderr, maxint, argv from copy import copy from math import sqrt, pi, floor
src/p/y/pyobjc-framework-Cocoa-2.3/Examples/AppKit/CocoaBindings/GraphicsBindings/GraphicsArrayController.py pyobjc-framework-Cocoa(Download)
# The original version was written in Objective-C by Malcolm Crawford # http://homepage.mac.com/mmalc/CocoaExamples/controllers.html from sys import maxint from Foundation import * from AppKit import * from random import random
src/p/r/practice_python-HEAD/bookexample/src/bvista/b15_2_gendata.py practice_python(Download)
'''
from random import randint, choice
from string import lowercase
from sys import maxint
from time import ctime
doms = ('com', 'edu', 'net', 'org', 'gov')
src/j/y/jython-HEAD/sandbox/tobias/jython/CPythonLib/idlelib/CodeContext.py jython(Download)
import Tkinter
from configHandler import idleConf
import re
from sys import maxint as INFINITY
BLOCKOPENERS = set(["class", "def", "elif", "else", "except", "finally", "for",
"if", "try", "while", "with"])
spaces, firstword = getspacesfirstword(text)
opener = firstword in BLOCKOPENERS and firstword
if len(text) == len(spaces) or text[len(spaces)] == '#':
indent = INFINITY
else:
indent = len(spaces)
return indent, text, opener
assert stopline > 0
lines = []
# The indentation level we are currently in:
lastindent = INFINITY
# For a line to be interesting, it must begin with a block opening
# keyword, and have less indentation than lastindent.
for linenum in xrange(new_topvisible, stopline-1, -1):
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/idlelib/CodeContext.py ironruby(Download)
import Tkinter from Tkconstants import TOP, LEFT, X, W, SUNKEN import re from sys import maxint as INFINITY from idlelib.configHandler import idleConf BLOCKOPENERS = set(["class", "def", "elif", "else", "except", "finally", "for",
spaces, firstword = getspacesfirstword(text)
opener = firstword in BLOCKOPENERS and firstword
if len(text) == len(spaces) or text[len(spaces)] == '#':
indent = INFINITY
else:
indent = len(spaces)
return indent, text, opener
assert stopline > 0
lines = []
# The indentation level we are currently in:
lastindent = INFINITY
# For a line to be interesting, it must begin with a block opening
# keyword, and have less indentation than lastindent.
for linenum in xrange(new_topvisible, stopline-1, -1):
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/idlelib/CodeContext.py ironruby(Download)
import Tkinter from Tkconstants import TOP, LEFT, X, W, SUNKEN import re from sys import maxint as INFINITY from idlelib.configHandler import idleConf BLOCKOPENERS = set(["class", "def", "elif", "else", "except", "finally", "for",
spaces, firstword = getspacesfirstword(text)
opener = firstword in BLOCKOPENERS and firstword
if len(text) == len(spaces) or text[len(spaces)] == '#':
indent = INFINITY
else:
indent = len(spaces)
return indent, text, opener
assert stopline > 0
lines = []
# The indentation level we are currently in:
lastindent = INFINITY
# For a line to be interesting, it must begin with a block opening
# keyword, and have less indentation than lastindent.
for linenum in xrange(new_topvisible, stopline-1, -1):
src/j/y/jython-HEAD/jython/CPythonLib/idlelib/CodeContext.py jython(Download)
import Tkinter
from configHandler import idleConf
import re
from sys import maxint as INFINITY
BLOCKOPENERS = set(["class", "def", "elif", "else", "except", "finally", "for",
"if", "try", "while", "with"])
spaces, firstword = getspacesfirstword(text)
opener = firstword in BLOCKOPENERS and firstword
if len(text) == len(spaces) or text[len(spaces)] == '#':
indent = INFINITY
else:
indent = len(spaces)
return indent, text, opener
assert stopline > 0
lines = []
# The indentation level we are currently in:
lastindent = INFINITY
# For a line to be interesting, it must begin with a block opening
# keyword, and have less indentation than lastindent.
for linenum in xrange(new_topvisible, stopline-1, -1):
src/p/y/pypy3-HEAD/lib-python/2.5.2/idlelib/CodeContext.py pypy3(Download)
import Tkinter
from configHandler import idleConf
import re
from sys import maxint as INFINITY
BLOCKOPENERS = set(["class", "def", "elif", "else", "except", "finally", "for",
"if", "try", "while", "with"])
spaces, firstword = getspacesfirstword(text)
opener = firstword in BLOCKOPENERS and firstword
if len(text) == len(spaces) or text[len(spaces)] == '#':
indent = INFINITY
else:
indent = len(spaces)
return indent, text, opener
assert stopline > 0
lines = []
# The indentation level we are currently in:
lastindent = INFINITY
# For a line to be interesting, it must begin with a block opening
# keyword, and have less indentation than lastindent.
for linenum in xrange(new_topvisible, stopline-1, -1):
src/p/y/pypy-HEAD/lib-python/2.5.2/idlelib/CodeContext.py pypy(Download)
import Tkinter
from configHandler import idleConf
import re
from sys import maxint as INFINITY
BLOCKOPENERS = set(["class", "def", "elif", "else", "except", "finally", "for",
"if", "try", "while", "with"])
spaces, firstword = getspacesfirstword(text)
opener = firstword in BLOCKOPENERS and firstword
if len(text) == len(spaces) or text[len(spaces)] == '#':
indent = INFINITY
else:
indent = len(spaces)
return indent, text, opener
assert stopline > 0
lines = []
# The indentation level we are currently in:
lastindent = INFINITY
# For a line to be interesting, it must begin with a block opening
# keyword, and have less indentation than lastindent.
for linenum in xrange(new_topvisible, stopline-1, -1):
src/s/p/spike-HEAD/vendor/stackless/v2.5.1/Lib/idlelib/CodeContext.py spike(Download)
import Tkinter
from configHandler import idleConf
import re
from sys import maxint as INFINITY
BLOCKOPENERS = set(["class", "def", "elif", "else", "except", "finally", "for",
"if", "try", "while", "with"])
spaces, firstword = getspacesfirstword(text)
opener = firstword in BLOCKOPENERS and firstword
if len(text) == len(spaces) or text[len(spaces)] == '#':
indent = INFINITY
else:
indent = len(spaces)
return indent, text, opener
assert stopline > 0
lines = []
# The indentation level we are currently in:
lastindent = INFINITY
# For a line to be interesting, it must begin with a block opening
# keyword, and have less indentation than lastindent.
for linenum in xrange(new_topvisible, stopline-1, -1):
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next