⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pysig.py

📁 The major functionality added in this release includes: - Rootless mode in X11 - Widget Templt
💻 PY
字号:
import stringimport sysimport reens = ""bbreak = re.compile ("[^A-Z]*,?([A-Z_0-9]+)[^A-Z]*,?")def process(l):	global ens		ens = ens + l[:-1]processing = 0l = sys.stdin.readline ()while (l != ""):	if (string.find (l, "//STOP") != -1):		processing = 0	if (processing == 1):		process(l)	if (string.find (l, "//START") != -1):		processing = 1	l = sys.stdin.readline ()#print ensparts1 = []parts2 = []parts1 = bbreak.split (ens)for x in range (len(parts1)):	if (x & 1 == 1):		parts2.append (parts1[x])print parts2print """/* XChat   This file was generated by sigextract.py by Adam Langley   agl@linuxpower.org   It should *not* be edited by hand!   AGL*/struct signalmapping{   char *name;   int num;};static struct signalmapping signal_mapping[] = {"""# This is the start of the numbers, in this case the signals start at 1count = 1for x in parts2:	print "   {\"" + x + "\", " + str(count) + "},"	count = count + 1print """   {NULL, 0}};#define NUM_SIGNALS_LOOKUP """,print str(count)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -