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


Download files

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

Source Distribution

wlab-1.1.5.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distributions

wlab-1.1.5.win32.exe (203.9 kB view hashes)

Uploaded Source

wlab-1.1.5.linux-x86_64.tar.gz (12.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page