最新评论
Re:portable linux python Morya 2012-04-01 17:32
http://www.voidspace.org.uk/python/configobj.html
ConfigObj 功能点
- 支持多层嵌套块
- 支持列表数据
- 支持单值占据多行的数据
- 支持字符串变量代换
- 可以集成一个强大的配置验证系统
- 自动类型检查、转换
- 重复名称的块
- 支持默认值
- 向外部写出时,支持保留读取的注释和读取顺序
- 大量好用的辅助函数和配置值
- 全方位Unicode支持
ConfigObj is a simple but powerful config file reader and writer: an ini file round tripper. Its main feature is that it is very easy to use, with a straightforward programmer's interface and a simple syntax for config files. It has lots of other features though :
Nested sections (subsections), to any level
List values
Multiple line values
String interpolation (substitution)
Integrated with a powerful validation system
including automatic type checking/conversion
repeated sections
and allowing default values
When writing out config files, ConfigObj preserves all comments and the order of members and sections
Many useful methods and options for working with configuration files (like the 'reload' method)
Full Unicode support
Re:portable linux python Morya 2012-03-20 18:06
diff with svn 3 of mevent part 2 of 2
[code=python]594b527079497a374741744b4f387a69333072525531595445666f6d674e64502f4d637a7a5477
6345306f6564767251726e4b2f44316c666356557442564c646830744b68723459524b6e2b6259
525a6848694244775735544a2f3065416d396550557a7a66464b343844362f6f34673042617761
424b70314b546368616c73754f4a7457324b467369426d3975723937645839332f616c3164764c
712f6d642f64616657702b4b303238652f2f32356258306676332b4477302b696c4a7061715a42
70644a6b46624f4333375a6a33693256746b304b35726264336e5862314f625a2f3343506e5174
6e79656e6d7449576f356b71355139393374657577634861617a612f4e384564785a4c497a6f76
2f77715548514a6b6b415257384b5041553358724d6b774f38396e4362624a677859624f677930
747a656a584b324e636b337976616648364b715979374f6b41686e55686a4e374b394653623552
4e58796c303446557363424f7736506262626131764e75565379796a75496f6f5a31452b72436c
30574a6e654957556f497a5333324c46315634596371437076464e44654378532b6e3170715773
71753351517074573933373470727848436b575154763055437a6a6f413347302f555069457656
3432384b6861345774564f7a54706347566d417061437156302f3550745a6b7542472b4b666c71
676a6b6d57616b78362f4b6f686f756c38334d59474d61734c6c3165705252717447686372424e
772b3633474e43376a755539464d59727a42314a552f6a6d694562733631306e446d4e4e543841
6d70764e3636795a70334a33574b6e645a50716d5674336d71574e5835303257385675366a6264
5248715a612f596e653161564232782b674843376837534f735254444f4e48354e5253635a5542
3073796b4c433179515a537153696a73535463634472496c464a69364e65325756426130394134
43426f6576394b68585056664c585835627863517848452b304557397378386364516d364c4b49
6c3536726a493269646c4c7a43525833777177754c4759354d794c4164756c61502b7071325272
514f564f61636f796b7a59536265466f2b62416a33514e67776966416a2b695270463449772f69
4a662f3974513650302b4f326134636d3739774f59724e5369426f6b7864516e2b6c6750733031
47585a68754b4d702f736c574243673d3d
[/code]
Re:portable linux python Morya 2012-03-20 18:05
diff with svn 3 of mevent part 1 of 2
[code=python]
654e713157487476327a59512f312b663470436773447a4c7169532f596d4d5a3271354f457942
74737954444d4c53464945746e523574656b2b536b5274667676694d70795a517375793647456f
6b746b586648652f7834642f5246476f6377637364444e4e456254617a4a65447064754d625173
68625469584747787369624c685a44627a7a31526d4e344730647768776d59457a434d47663844
797a424d35594c457a43434d30343044503463765174324e666c46654f7a6e4f3448364e476848
425779656c4c394d433832786d44476247454872476d57456f642b7646582b6a6d4d2f6877382f
4c2b3138745034506e4c4a547a352b514e6b6a7845732f51417a585648362f623443495435696c
442f5055766535683247734a78766734312f3674797a6f6c614d766a786f62667972354f4e7430
79395979577269444f453659424d59396d427a696c6e5559434576416658436946586f616a4966
6752786d6d755239486d6472726b704f473447474159714c66565254756958352f356566675047
2b78666445797166695268352f424d3465573651313133526f37302f4853414e4d7778734d6863
324f724c495855625a6633346758307a5a466d6a6148487669796743546477736778654a6f6b61
382b42315a77715549384e6771516678616f55706e4d4d4b3832762b724a34512b556c58415548
70345a496347313673493964554751754a364a63693272694a65456e454a4b456957385970724b
4e31687037746b7938685a5a35564237496b4e6e492f5244304c45425056304966642b714c5953
766477735636704a316b6349716d565a63344b616166654551715a753352743073427374643071
6259636a74724c2b722f4857306359443763556f6a6a4c4e7170755772714d64717a676f384a47
6648624a747a6c423254632b71704a4853507930666964496b737463594f42744f71776f4a4a57
4930554f6d385444546f536b7a79486e6f535a376e675a4c4b59666e314a75485641754357456a
356a77336e3646577653784e496e6a6f4461396d6d5272762b52436d51464a686d394c6c754e4c
653278426b47366b574f7a4943455167716b583837474b537735782f55544b6138527777736a52
4b64734d7a2b715258466d68337557494939614f5657736136383078314d706542727076426832
64716b7359756f61547266574a764157575849484c5934696434706f716e47543056534f706d48
613275352f486a367a633569614c666d4f70514d765943544c504f444c3749614739625079792f
51783578316b482b62636f614633644a5a395a3550582f312b35767673623744637a4278426949
452b6c32656f684e65436f564a3072376955565841526474735554346d7a67696e4a7572363044
676254387a4233764a52386533556a327146676363794e504d4d657651316d47774c7943736e51
77486565686c6834504b7a573353387a55346d5352302f5133675835316468456d42497a4f6a4e
307a536d4e4f6b2b2b494658695037793955536e46426b3678586d796254357632313257433372
794c676b57524c524e4259415538335561775955545a4667654a5935354a7768654f6537665030
5976306b79515856455168576371487a4874366f704c376d6e71665a2b7573556c2b6a4a323966
5862325767754b49584b5a5568673344354e387336733248424656536530664570364539464e67
713671556231745537585136484c626a6f57616130447362614f5a344339743976504951634a67
2f3568642b35476350364d6b4a316c326e724d4a7a5637495065633166697552735a376d54356a
5a62686c3478396554515966365a737a664b2f43374c75635454554533326461744476794d4359
704f553078774b524d5633436e486b497551504344784477494f547751497867714a57734e3559
4a6d65555070326d394e454a494873677555514f6a756568313669325239677635706879433662
63542b4c645356655a4f483638326155326c7a573767366b3233516239747a5775385544517936
4c4a6a7343733165486637647364644366726643357943326652414864364c4273465161593753
[/code]
Re:portable linux python Morya 2012-03-09 17:23
python 使用 oracle 提供的 windows版本的 instantclient_11_2
需要自己建立一个 $ORACLE_HOME\network\admin 目录
然后把 tnsnames.ora 放到这个目录相关的tnsnames才会生效。
Re:portable linux python Morya 2012-03-09 17:22
python link oracle 4种方式
[code=python]
654e724e566b31724730635976752b766d4b77774f777275534f735048414b47714b3462444b34
44645173464e79796a33566c703639584d4d6a4d53466945684f64536b344a5330744957304a65
51537943476b68394b6d4b5337394d3557646e7649582b73352b5362493273747454423747616e
586b2f6e76655a5a32656d64676b312b6b6f32326846764d443541795642334262647176676769
336c6e76362f43644b35626c4f45372b6948714a6b426f4a5a516c4677434753677538354f3975
37336e5a723537707a4536306a702f5842356f6462473630644c2b2b516a336658577273625731
744f3453355a30644f532b71784e2f6631796f43735a4e626d4c675668304f76424b664d484471
464d6938412b38472b41624d3875792f4a67716856704a676b58374d2b62722b6c584c51744143
46694c506933696b50513872466f637767664a6d586f6d4a7a5352674c704a306d4e354f783742
4e6b3853756a2b4f4968456d7132646b776e506159676742424a4c4f707167516b594f312b4239
744b55366b686a543232436f564548455538437a534f61316f55416c46454d5372394c6e626969
4f39447863346934765670757a514f59414477564f734d683747614d644a794f4f763546717868
6e2f733645687a64756d3054514e6d6a47764e3676644939784c506a374d426e69556162365a2b
4a51785669557036665036536178746a656c424b6f456237666c35494669324f6841466d684949
5367547a6c6155505a695a63445a5676726e78586741454c2b6c6e6c6f56496179735a49495271
4b672b495a4a386a64797a4b6e47576945746364504c6471354f66762f3372743774766a72382f
2f65625a796632586f346350336877666a58343650483179622f543130656b5058343065506b65
6a2b34656a3437756a7730644f4753466f77774b586d6a6366417765685936636e354e426f5974
78786d38526458694e727932526c3961713775755132746e6265762f484a652b38363837515a74
4d6d415351586c6e574d5671416b4c6550646a6f526965355743706b6f4f6c676f50666a2b5a7a
414d5750666e7747564c332b3561566a31596f6765314949665130346346472f36643673495a39
716779495a6a6d316d4e6f674c636468496e39662b4a2b777456374b335843726f433244763738
38666e5037784971667231612b762f33783838755854735749305631506c3975672b672f523453
69416747464d6b794761327a41744c446a4c4e4b2f756336662f4733534464644574586f704934
416d786b376a494e4a6f4441356a705165303034734e624e4e2b4e4d625577566e2f3948335567
682b475673494c665a7557526661436c585a7059796266394b6c57624c4f776a614b36764e7566
585a514a4842754b43516a5262515763367157423350776b6172684d78597a6672343743526842
387a767779466f517967416953366a55496f65654643767232416c70686a4a783078316d586649
744e2b6c63597a6e316741474538345465323035574b2f6d33544b6b2b32466e4f7a764c635535
3579703048347741453769774a3156326f493645384d4d4777666165524450506a5034632f6665
4d675952537a6a62534c6e56753347354f7a546f4774544649766750526f784173496b36445341
6268624142707a59536e66535848424d414569633238784e774c50532f587065536163352b5571
7a574a622f77424275665937
[/code]
Re:人生最悲惨的遭遇 Morya 2012-02-02 09:32
[img]http://image.xcar.com.cn/attachments/a/day_120121/2012012121_22aca27ad85630889075jfHt0MVnyTsm.gif[/img]
Re:git-core 源代码安装 v73918 2011-12-13 16:02
大牛,问一下。
我从你给的地址下载后安装好了。
使用时出现了错误;
truman@linux-pijd:~/android> repo init -u https://android.googlesource.com/platform/manifest
Get https://android.googlesource.com/tools/repo
fatal: Unable to find remote helper for 'https'
truman@linux-pijd:~/android> git --version
git version 1.7.7.3
怎么回事阿,急等
Re:圆宝 Morya 2011-11-22 13:59
http://www.perzl.org/aix/
aix packages the most complete
Re:aix things Morya 2011-11-18 23:32
http://pware.hvcc.edu/download/aix53/
Re:aix things Morya 2011-11-17 23:10
http://gnome.bullfreeware.com/aixtoolbox/RPMS/ppc/
Re:【转发】FreeFileSync 4.2 开源的文件夹比较和同步工具 Morya 2011-11-17 11:52
[code=python]
building '_ctypes' extension
xlc_r -q32 -I/usr/include -I/home/morya/usr/include -DNDEBUG -O2 -qmaxmem=70000 -Ibuild/temp.aix-5.3-2.7/libffi/include -Ibuild/temp.aix-5.3-2.7/libffi -I/home/morya/src/Python-2.7.2/Modules/_ctypes/libffi/src -I/home/morya/usr/include -I. -IInclude -I./Include -I/home/morya/src/Python-2.7.2/Include -I/home/morya/src/Python-2.7.2 -c /home/morya/src/Python-2.7.2/Modules/_ctypes/_ctypes.c -o build/temp.aix-5.3-2.7/home/morya/src/Python-2.7.2/Modules/_ctypes/_ctypes.o
"build/temp.aix-5.3-2.7/libffi/include/ffi.h", line 133.27: 1506-207 (W) Integer constant 9223372036854775807 out of range.
"build/temp.aix-5.3-2.7/libffi/include/ffi.h", line 134.3: 1506-205 (S) #error "no 64-bit data type supported"
"/home/morya/src/Python-2.7.2/Modules/_ctypes/_ctypes.c", line 3362.27: 1506-068 (W) Operation between types "void*" and "int(*)(void)" is not allowed.
"/home/morya/src/Python-2.7.2/Modules/_ctypes/_ctypes.c", line 3911.31: 1506-280 (W) Function argument assignment between types "int(*)(void)" and "void*" is not allowed.
"/home/morya/src/Python-2.7.2/Modules/_ctypes/_ctypes.c", line 5648.63: 1506-280 (W) Function argument assignment between types "void*" and "void*(*)(void*,const void*,unsigned long)" is not allowed.
"/home/morya/src/Python-2.7.2/Modules/_ctypes/_ctypes.c", line 5649.62: 1506-280 (W) Function argument assignment between types "void*" and "void*(*)(void*,int,unsigned long)" is not allowed.
"/home/morya/src/Python-2.7.2/Modules/_ctypes/_ctypes.c", line 5650.65: 1506-280 (W) Function argument assignment between types "void*" and "struct _object*(*)(const char*,int)" is not allowed.
"/home/morya/src/Python-2.7.2/Modules/_ctypes/_ctypes.c", line 5651.60: 1506-280 (W) Function argument assignment between types "void*" and "struct _object*(*)(void*,struct _object*,struct _object*)" is not allowed.
"/home/morya/src/Python-2.7.2/Modules/_ctypes/_ctypes.c", line 5653.66: 1506-280 (W) Function argument assignment between types "void*" and "struct _object*(*)(const unsigned short*,int)" is not allowed.
Python build finished, but the necessary bits to build these modules were not found:
_bsddb _curses _curses_panel
bsddb185 gdbm linuxaudiodev
ossaudiodev spwd sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Failed to build these modules:
_ctypes bz2
[/code]
Re:圆宝 Morya 2011-11-17 11:52
真会假装……
Re:动态构建ConfigObj的configspec Morya 2011-11-14 09:04
appear单词写错了
Re:【转发】FreeFileSync 4.2 开源的文件夹比较和同步工具 Morya 2011-11-10 18:20
老公是猪!
Re:简单文件压缩加密脚本 python Morya 2011-10-21 19:12
# logging to socket
[code=python]
654e703956453176314441517665645857467456535741626256736b594555354646714b4b4278
6f4555664c6d3079796f556b63325a4e3239384a765a32776e63585a703178636e383935385048
733852366e4d79715a596470696676417543736d366c51716133657669735a46455149556c6c6b
356646766e55746d717743705564504c477359766857427368365274514a68636756426b45484f
307279346456476965426b775769596f4b4859785269384162363074696f4d4a4939466b683065
6f6f6f48342b657279313565656b30745643385364514e65444c62495573384c6a534f6a556c42
747264734b4f6f387045624154396e3778314676647a65715a44646b53686d6f4a705645624147
4d4f776e4b34666a7274776e6a566f4c51714b48505a467065744a4e5864494876574e4f7a7153
3567677671764b776c7a474b644c415472715a4a6870744a666b6f55534a6272736f4968703165
416f4a4550507253483878477278655a79537a67465056326376574776374f62786c5567667576
615437426f6b79726b486f48464e526462513974556b61447955656c42756a782f577132583630
4b743854766364775943443472435371616a57556d4d345a2b3970786673784468593035536c41
746630754e70523038567951773158334c53797962436774586363764948514d4c3047546e4e52
6951566f4a72646c767152344947313961636d2b2f36486e5a4b4f6256635634324a5849656161
6a792f74315a4456314c6e6937416e466b7747626d7870784751614a51746830647a367a375631
534d304f4c78546b386d772f7373796454646e4e58565158625050507a41525a6937317a4e6457
6a68646931744f612b703031457665536c7072627644364a3833314e5862357279736e36306654
2b59706337354e716c3931655577616f726f706e646d4f7977375a41645a374d354b2b4d647568
6b38696134413273694e7963527455557a763744796d67574e424d38335942335a4f496d67415a
39712f73557244386b414273436b524d6a59656b70753574536962516670302f6c6f4464625750
2b4551432b33627968542f524d51714655347339355876563752557a6b6264497a6877664e696d
30794c374264695746797234323944425531364c3362476d364967764e58625655563769546d4c
707057736b6661615145336d31327559572f4d784a616d6934337335747a646b456a69484d6a6d
2f50514a584a6e4541542f414c682f4372303d
[/code]
Re:简单文件压缩加密脚本 python Morya 2011-10-21 19:12
# socket server
[code=python]
654e706c55384675327a414d766673724f4164466253424e756d47484c554d4f61793474687146
466b397377474b72464e454a6c795a506f644c37733230644a73526433756f69512b64376a492b
6e5a4f316832336932666c466d694f554c623038476162465a6271637a7a757150393161637355
303172485948762f5242616e3433505731752f494733524864466c57613246392f433933323065
626f5752476c31786e72433445523466385665486e6b376679315547665049386a2f6675674442
4e674d5335747735733538416e6f69786d3378456f44387034456f6155494a5267545933514270
6731426d74533167425a494f5a4e30446b774c7a5364703068682b636b706954486a4543574c45
68726b547367415a4a7361477a5445684533544756574c4d383549555776463378656a6a786849
334139304876582b5a444f634759534868557375673445677a52304448317331564935794b4477
4a6a4151524c67554a57452b6f2b4b36507866767244782f4c6853656e327149634d6131546243
472f385044714c4f457168347545546479566b4e4b68397a2b75663736426a4749383875437045
636f554a7a6533393976644842377548336463536135744c6654426573726e384a6c5036734d4d
4e6735354d704d4a384d4b464451762b5268525044754a4752577a7947624b5a65724a43334b67
554663552f2f58492b576270793050374b43334363716e2f686d48762b71725347463851575847
644d4b4b626a46644c51322b36455a666538476c314c456477362b2b7845777a67367749616376
74724550484c39366d325865523164474a384972516a6c6e593075656f68587853754e77556561
457636756b62572b5966396b685a4e336f377277774e462f496a63392f736e4466376948716a4b
697761714339526f757179714d714b6f7545794c4e36792b58417a784e
[/code]
Re:better telnetlib python Morya 2011-10-19 17:53
[code=python]
{
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'standard': {
'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s'
},
},
'handlers': {
'default': {
'level':'INFO',
'class':'logging.StreamHandler',
},
},
'loggers': {
'': {
'handlers': ['default'],
'level': 'INFO',
'propagate': True
},
'django.request': {
'handlers': ['default'],
'level': 'WARN',
'propagate': False
},
}
}
[/code]
Re:For reply only Morya 2011-10-14 17:13
cx_Oracle本地需要设置 os.environ['NLS_LANG']环境变量才不乱码
但是,如果创建Connection都没有成功的时候,
这个变量是不会产生作用的,
也就是说,密码错误这种错误信息依然是乱码
Re:python 判断一个类或实例是否继承自某类 Morya 2011-09-25 21:57
内置函数 issubclass() 就搞定⋯⋯
Re:明天或者后面需要做的事情 Morya 2011-09-21 19:55
./Modules/Setup 可以设置是否编译哪一个python内置模块。
