关于正则表达式的问题
有这样一段文本:datademog;.........run;procdata=demog;.........run;dataecg;.........run;datapk;.........output;run;我想写一段程序输出含有output的那一段data...run;文本,这是我写的正则:/(^(data).*?(.*?\s*output;?){1,
作者: potato1234 发布时间: 07-28
十万火急的问题。。。。。关于python或者perl解决http请求
posturl是:http://16.157.53.22:8080/HPCC/rest/monitoring/alert.APPLICATION_XML?instancekey=a由于发送post之后需要进入login页面进行登录才可以成功发送,login页面表单:<formaction="j_spring_security_check"><labelfor="
作者: lansiluo12 发布时间: 07-27
如何抓取dos命令窗口里的内容
例如一个已经在dos窗口里面运行的进程:while(1){ print"hello\n"; sleep2;}有办法抓到这个窗口里显示的内容吗?假设不能控制何时启动这个进程,如果它被启动就抓窗口里面的内容。
作者: hugokung 发布时间: 07-26
Python3.2 tkinter使用
[code=Python][/code]#!/usr/bin/envpythonimporttkinter top=tkinter.TK()lable=tkinter.Label(top,text='hello,world')label.pack()tkinter.mainloop()使用的是Python3.2是因为版本不兼容哪出错了吗,运行时报错:&
作者: belindalong 发布时间: 07-26
pygtk关闭button控件
我在学习pythongtk,Pythoncode#!/usr/bin/envpython#examplehelloworld2.pyimportpygtkpygtk.require('2.0')importgtkclassHelloWorld2:#Ournewimprovedcallback.Thedatapassedtoth
作者: fnzh0003 发布时间: 07-26
求助 为什么代码不能运行 少了什么么
LAYOUT="{!s:10}{!s:14}{!s:4}{!s:10}"yourList=["Ford","Mustang",1966,"Red"]printLAYOUT.format("Brand","Modell","Year","Color")printLAYOUT.format(*yourList)
作者: shungk 发布时间: 07-14
python中的反斜杠问题
字符串string=‘aabb022022';1.我想要把这个字符串转换成str='\xaa\xbb\x02\x20\x22';2.或者转换成tuper=(0xaa,0xbb,0x02,0x20,0x22);把这个字符串切片后采用第一种方法有两个问题,一是'\x'+'aa'报错,二是'\\x'+'aa'结果是'\\xaa',虽然打印出来是'\xaa';采用第二种方法得出的元组是tuper=
作者: Lythons 发布时间: 07-25
python 三位数组 如何读取一列
我想在三位数组中读取出特定的column,形成一个一维数组。使用list实现,如何读取?例如:list=[[['a','b','c'],['d','f','g']],[['h','i','j'],['k','l','m']]]list是一个三围数组我要求读出'b''f''i''l'用下标操作符如何实现?用list[:][:][1]可以吗?
作者: liuxialong 发布时间: 07-25
如果用到的module不在默认目录下怎么设置eclipse?
我在eclipse里写Python的程序,我现在要调用googleappengine的google.appengine.api模块,但这个模块不在默认路径中,我应该怎么设置eclipse才能让Python找到这个模块?
作者: facat 发布时间: 07-25