Skip to main content

wlab::Wu Xuping's Python Distribution Utilities

Project description

# -*- coding: utf-8 -*-
#~ #----------------------------------------------------------------------------
#~ module:wlab
#~ 吴徐平的python科学计算文件
#~ Data: 2013-08-08,星期四
#~ Author:吴徐平
#~ Email:539688300@qq.com
#~ #----------------------------------------------------------------------------
#~ # main test program for __WPyQtInput__.py
#~ #----------------------------------------------------------------------------
if __name__ == '__main__':
from wlab import *
import sys
app = QtGui.QApplication(sys.argv)#创建Qt进程app
#---------------------------------------------------------------------------
#示例1
values={'String':'This is String','float':-3.5,'int':-15}
GroupBoxTitle='Please set values'
title='the first example of QInputBox '
rvalues=QInputBox(values=values,GroupBoxTitle=GroupBoxTitle,title=title)
print(rvalues)
#>>>{'int': -15, 'float': -3.5, 'String': 'This is String'}
#---------------------------------------------------------------------------
#示例2
from collections import OrderedDict
values=OrderedDict([('c', 1), (2, 2), ('a', 3)])
rvalues1=QInputBox(values=values)
print(rvalues1)
#>>>OrderedDict([('c', 1), (2, 2), ('a', 3)])
#---------------------------------------------------------------------------
#示例3
values={'String':'This is String','float':-3.5,'int':-15}
GroupBoxTitle='Please set values'
title='QInputBox'
rvalues2=QInputBox(values=values,GroupBoxTitle=GroupBoxTitle,title=title)
print(rvalues2)
#>>>{'int': -15, 'float': -3.5, 'String': 'This is String'}
#---------------------------------------------------------------------------
sys.exit(app.exec_())
#******************************************************************************************
#*可以方便的读写文本文件,对数据的格式几乎没有任何限制,只要里面有数据就可以读出
#******************************************************************************************
#~ #主程序测试
if __name__ == '__main__':
x=numpy.random.randn(3,4)
print(x)
Filename='x.txt'
header='look at this file'
dlmwrite(Filename,x,header=header)
y=dlmread(Filename)
print(y)

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
wlab-1.1.5.linux-x86_64.tar.gz (12.1 kB) Copy SHA256 hash SHA256 Dumb Binary any
wlab-1.1.5.tar.gz (6.2 kB) Copy SHA256 hash SHA256 Source None
wlab-1.1.5.win32.exe (203.9 kB) Copy SHA256 hash SHA256 Windows Installer any

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page