Did I find the right examples for you? yes no

All Samples(13)  |  Call(13)  |  Derive(0)  |  Import(0)

        def isint(i):
	try:
		i=int(i)
	except:
		return False
	return True
        


src/u/4/u413-HEAD/api/edit.py   u413(Download)
		if u413.cmddata["step"]==1:
			u413.donttype('"'+args+'"')
			if util.isint(args):
				u413.cmddata["id"]=int(args)
				u413.cmddata["step"]=2
		#EDIT id
		elif len(params)==1:
			if util.isint(args):
				u413.cmddata["step"]=2
				u413.cmddata["context"]=u413.user.context
		#EDIT id body
		else:
			if util.isint(params[0]):
				post=int(db.query("SELECT owner FROM posts WHERE id=%i;"%int(params[0]))[0]["owner"])
				owner=int(db.query("SELECT access FROM users WHERE id=%i;"%post)[0]["access"])

src/u/4/u413-HEAD/api/topic.py   u413(Download)
def topic_func(args,u413):
	params=args.split(' ',2)
	if len(params)==0 or not util.isint(params[0]):
		u413.type("Invalid topic ID.")
		return
		else:
			page=1
			if util.isint(params[1]):
				page=int(params[1])
			elif params[1].upper()=='LAST':

src/u/4/u413-HEAD/api/board.py   u413(Download)
		if args[0].upper()=="ALL":
			args[0]=0
		if util.isint(args[0]):
			output_board(int(args[0]),1,u413)
		else:
			else:
				args[1]=math.ceil(args[1]/10.0)
		elif not util.isint(args[1]):
			args[1]=1
		else:

src/u/4/u413-HEAD/api/reply.py   u413(Download)
		#ID>
		elif u413.cmddata["step"]==1:
			if util.isint(args):
				u413.cmddata["step"]=2
				u413.cmddata["topic"]=int(args)
		#REPLY [id]
		elif len(params)==1:
			if util.isint(params[0]):
				u413.cmddata["step"]=2
				u413.cmddata["topic"]=int(params[0])
		#REPLY [[id] message]
		else:
			if util.isint(params[0]):
				if len(params)==2:
					db.query("INSERT INTO posts (topic,title,parent,owner,editor,post,locked,edited,posted) VALUES(FALSE,'',%i,%i,0,'%s',FALSE,NULL,NOW());"%(int(params[0]),u413.user.userid,db.escape(util.htmlify(params[1]))))

src/u/4/u413-HEAD/api/history.py   u413(Download)
		u413.user.history=[]
		u413.type("History cleared")
	elif util.isint(params[0]):
		u413.type("User command history (%i-%i of %i):"%(int(params[0]),int(params[0])+32,len(u413.user.history)))
		out='<br/><table>'

src/u/4/u413-HEAD/api/delete.py   u413(Download)
		#DELETE id
		else:
			if util.isint(args):
				post=int(db.query("SELECT owner FROM posts WHERE id=%i;"%int(args))[0]["owner"])
				owner=int(db.query("SELECT access FROM users WHERE id=%i;"%post)[0]["access"])

src/u/4/u413-HEAD/api/command.py   u413(Download)
			if a!=None:
				execalias(cli,a,u413)
			elif util.isint(cmd):
				if u413.user.context!='TOPIC' and 'TOPIC' in u413.user.context:
					cmds["TOPIC"].callback('%i %i'%(int(u413.user.context.split(' ')[1]),int(cmd)),u413)