本文整理汇总了Python中WConio.settitle方法的典型用法代码示例。如果您正苦于以下问题:Python WConio.settitle方法的具体用法?Python WConio.settitle怎么用?Python WConio.settitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WConio
的用法示例。
在下文中一共展示了WConio.settitle方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import settitle [as 别名]
def setup():
#setup the screen
log.debug('setting up screen')
import os
if 'nt' in os.name:
import subprocess
subprocess.call(['mode', 'con', 'lines=%i' % (C.height+1), 'cols=%i' % C.width], shell=True)
else:
W.resize(C.height+1,C.width)
W.settitle('On The Run! (LD#21: Escape)')
W.textmode()
示例2: download
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import settitle [as 别名]
import urllib
import WConio
from shutil import copy2, rmtree
from sys import exit
import os
WConio.settitle('MiniServ :: Update Tool')
WConio.textmode()
WConio.textcolor(7)
def download(url):
webFile = urllib.urlopen(url)
filename = url.split('/')[-1]
localFile = open(filename, 'w')
print '\n Downloading File:',filename,'...',
localFile.write(webFile.read())
webFile.close()
localFile.close()
WConio.textcolor(2)
print 'done'
WConio.textcolor(7)
def goto_dir(dir):
if not os.path.exists(dir):
os.mkdir(dir)
os.chdir(dir)
ini = open('settings.ini','r')
ini = ini.readlines()
示例3: open
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import settitle [as 别名]
######################################
# MiniServ - First-Run-Setup #
# by Frank Adler, 2010 #
######################################
import WConio
import win32crypt
import binascii
WConio.settitle('MiniServ :: First-Use-Configuration')
WConio.textmode()
WConio.textcolor(2)
ini = open('settings.ini','r')
inidat = ini.readlines()
ini.close()
version = inidat[0].split()
version = version[0]
print("\n\nPlease enter some letters and numbers and press ENTER: ", end=" ")
text = WConio.cgets(512)
print("\n\nPlease give me some more letters and numbers and press ENTER: ", end=" ")
textb = WConio.cgets(512)
string = text + textb
pwdHash = win32crypt.CryptProtectData(string.encode(),'psw',None,None,None,0)
pwdHashStr = str(binascii.hexlify(pwdHash)).upper()
print('\n\nSecurity Login Hash: ' + pwdHashStr)
print("\n\nWriting settings.ini ...")
示例4: GetConnections
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import settitle [as 别名]
import socket
import string
import os
import io
import time
import random
import urllib2
import re
import WConio
import threading
import sys
#(2,24)
old_setting = WConio.gettextinfo()[4] & 0x00FF
WConio.clrscr()
WConio.settitle("PyBot Control Center")
WConio.gotoxy(2,2)
WConio.cputs("Welcome to the PyBot Control Center\n\r")
f = open('C:\\PyBot\\connections.txt', 'w')
j = open('C:\\PyBot\\update.txt', 'w')
p = open('C:\\PyBot\\cmd.txt', 'w')
f.write('')
j.write('')
p.write('')
f.close()
j.close()
class GetConnections ( threading.Thread ):
def run ( self ):
WConio.textcolor(WConio.LIGHTRED)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
示例5: Kernel
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import settitle [as 别名]
r'''
CLI Kernel ([email protected])
'''
import os,sys
import WConio as console
import config
v_cmd_history = []
v_cmd_history_current = 0
# append command search path
for v_path in config.cmd_search_path:
sys.path.append(os.getcwd() + v_path)
console.settitle(config.cli_prompt + ' ' + config.cli_version)
while True:
b_restart = False
sys.stdout.write(config.cli_prompt + '>')
v_cmd_buf = []
while True:
v_key = console.getkey()
if v_key == None:
continue
if (len(v_key) == 1) and (v_key >= '\x20') and (v_key < '\x7F'):
sys.stdout.write(v_key)
v_cmd_buf.append(v_key)
else:
# move cursor left
if v_key == 'left':
示例6: open
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import settitle [as 别名]
################################################
# MiniServ - Multithreading Version #
# by Frank Adler, 2010 #
################################################
import time
import WConio
import os
import socket
import stat
import re
import threading
import queue
WConio.settitle('MiniServ :: Server Window')
WConio.textmode()
# Loading settings
auth = 0
ready = 0
wready = 1
connections = 0
services = 0
transfered = 0
inidat = open('settings.ini','r')
ini = inidat.readlines()
inidat.close()
version = ini[0].split('=')
示例7: print
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import settitle [as 别名]
auth = 1
print('\n Successfully logged in!')
else:
auth = 1
print('\n Already logged in')
except:
WConio.textcolor(4)
print('\n Connection Error!')
ini = open('settings.ini','r')
ini = ini.readlines()
# version = ini[0].split('=')
# version = version[1]
version = ini[0]
WConio.settitle('MiniServ :: Service Console')
WConio.textmode()
WConio.textcolor(9)
print('>>>>> MiniServ :: Service Console %s\n'%version)
WConio.textcolor(15)
print('Enter "help" for a list of commands \n')
commands = 'help','check update','connect','say hello','get server time','get server info','set logging min','set logging max','close server','close console','close all','disconnect'
auth = 0
while 1:
示例8: open
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import settitle [as 别名]
# MiniServ Terminal #
# by Frank Adler, 2010 #
#####################################
import WConio
import socket
# Load Settings.ini
ini = open("settings.ini", "r")
inidat = ini.readlines()
ini.close()
version = inidat[0]
pwdHashStr = inidat[1]
WConio.settitle("MiniServ :: Service Terminal")
WConio.textmode()
WConio.textcolor(9)
print("MiniServ :: Service Terminal %s\n" % version)
WConio.textcolor(15)
print('Enter "help" for a list of commands \n')
# Setup Server Connection
WConio.textcolor(2)
print("\nPlease enter Server IP: ", end=" ")
IP = WConio.cgets(20)
try:
SPORT = 10104
ssock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
示例9: settitle
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import settitle [as 别名]
def settitle( chaine ) :
"""Modifie le titre de la console, ou l'affiche dans l'interpreteur"""
if sys.flags.interactive == 0 :
WConio.settitle(chaine)
else :
print "TITRE :", chaine
示例10: type
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import settitle [as 别名]
WConio.gotoxy(20, 14)
WConio.cputs(' Reconnect retry attempts: %5i '%
recon_count)
except Exception, e:
WConio.gotoxy(5, 16)
print "Unexpected exception during reconnect:", type(e)
print e
raw_input("Press enter to exit ->")
exit()
else:
return
########## Main Routine ##########
if __name__=='__main__':
try:
WConio.settitle("TestRCS -- Test the RC Servo Controller")
# Initial Page, Select and Open the Serial Port
WConio.textattr(0x07)
WConio.setcursortype(2)
rcs = get_rcs() # select a port and open the rcs
WConio.setcursortype(0)
WConio.cputs("\nCommunications port is open!\n")
time.sleep(0.5)
# disable servos, configure analog, read: USB report, servo status, analog
usb, all_servos, analog_channels = rcs.robust_read('CA0USM', 3)
firmware_version = usb[2]
disabled = (all_servos[-1][-1] == -1)
# Servo and Analog Display Page
servo_mode = IDLE # Set up variables for running servos
command_mode = INIT
示例11: int
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import settitle [as 别名]
ini = ini.readlines()
version = ini[0].split("=")
version = version[1]
logging = ini[2].split("=")
logging = logging[1].split()
logging = logging[0]
uname = ini[3].split()
uname = uname[2]
pw = ini[4].split()
pw = pw[2]
WConio.settitle("MiniServ :: Server Window")
WConio.textmode()
HOST = ""
IP = socket.gethostbyname(socket.gethostname())
PORT = ini[1].split("=")
PORT = int(PORT[1])
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT))
exit = 0
WConio.textcolor(9)
示例12: PrintStockInfoTitleWithColor
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import settitle [as 别名]
def PrintStockInfoTitleWithColor():
import WConio
WConio.settitle("My Stock Info")
WConio.clrscr()
ColorConsole.PrintStockInfoTitle()
示例13: settitle
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import settitle [as 别名]
def settitle(title):
W.settitle(title)
示例14: show
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import settitle [as 别名]
return buf
if __name__ == "__main__":
import WConio as W
x = 0
def show(filename):
global x
f = open(filename)
buf = read_to_buffer(f)
buf.x = x
x += buf.width
buf.draw()
try:
import sys
if not len(sys.argv) > 1:
print "nom nom need argument"
else:
term.init()
show(sys.argv[1])
if len(sys.argv) > 2:
show(sys.argv[2])
term.flip()
W.settitle("Mutants Of Melimnor")
term.getkey()
except:
raise
finally:
W.textmode()
W.textcolor(W.LIGHTGREY)