text_ux 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +25 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +51 -0
- data/Rakefile +18 -0
- data/ext/text_ux/extconf.rb +5 -0
- data/ext/text_ux/text_ux.cpp +252 -0
- data/lib/text_ux.rb +5 -0
- data/lib/text_ux/version.rb +3 -0
- data/spec/fixtures/test.ux +0 -0
- data/spec/spec_helper.rb +19 -0
- data/spec/text_ux_spec.rb +137 -0
- data/text_ux.gemspec +26 -0
- data/vendor/ux-trie/ux-0.1.9/.lock-waf_darwin_build +8 -0
- data/vendor/ux-trie/ux-0.1.9/.unittest-gtest/gtest-1.6.0/fused-src/gtest/gtest-all.cc +9118 -0
- data/vendor/ux-trie/ux-0.1.9/.unittest-gtest/gtest-1.6.0/fused-src/gtest/gtest.h +19537 -0
- data/vendor/ux-trie/ux-0.1.9/.unittest-gtest/gtest-1.6.0/fused-src/gtest/gtest_main.cc +39 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Build.py +733 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Build.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/ConfigSet.py +147 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/ConfigSet.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Configure.py +314 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Configure.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Context.py +298 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Context.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Errors.py +37 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Errors.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Logs.py +149 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Logs.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Node.py +500 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Node.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Options.py +130 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Options.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Runner.py +191 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Runner.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Scripting.py +358 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Scripting.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Task.py +669 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Task.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/TaskGen.py +341 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/TaskGen.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/__init__.py +4 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/__init__.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/ar.py +12 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/ar.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/asm.py +25 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/bison.py +29 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c.py +27 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_aliases.py +56 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_aliases.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_config.py +708 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_config.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_osx.py +121 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_osx.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_preproc.py +606 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_preproc.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_tests.py +110 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_tests.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/ccroot.py +372 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/ccroot.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/compiler_c.py +39 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/compiler_cxx.py +39 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/compiler_cxx.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/compiler_d.py +30 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/compiler_fc.py +45 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/cs.py +98 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/cxx.py +27 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/cxx.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/d.py +51 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/d_config.py +47 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/d_scan.py +133 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/dbus.py +30 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/dmd.py +43 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/errcheck.py +153 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/fc.py +123 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/fc_config.py +271 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/fc_scan.py +68 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/flex.py +27 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/g95.py +55 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/gas.py +10 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/gcc.py +98 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/gdc.py +34 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/gfortran.py +69 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/glib2.py +174 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/gnu_dirs.py +65 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/gxx.py +98 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/gxx.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/icc.py +31 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/icpc.py +30 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/ifort.py +42 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/intltool.py +78 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/irixcc.py +49 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/javaw.py +272 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/kde4.py +49 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/lua.py +19 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/msvc.py +650 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/nasm.py +13 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/perl.py +78 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/python.py +303 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/qt4.py +424 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/ruby.py +104 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/suncc.py +54 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/suncxx.py +55 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/tex.py +222 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/vala.py +215 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/waf_unit_test.py +79 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/winres.py +34 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/xlc.py +46 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/xlcxx.py +46 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Utils.py +334 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Utils.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/__init__.py +4 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/__init__.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/ansiterm.py +173 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/ansiterm.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/extras/__init__.py +4 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/extras/__init__.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/extras/compat15.py +223 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/extras/compat15.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/fixpy2.py +50 -0
- data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/fixpy2.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/src/bitVec.cpp +119 -0
- data/vendor/ux-trie/ux-0.1.9/src/bitVec.hpp +64 -0
- data/vendor/ux-trie/ux-0.1.9/src/bitVecTest.cpp +143 -0
- data/vendor/ux-trie/ux-0.1.9/src/cmdline.h +809 -0
- data/vendor/ux-trie/ux-0.1.9/src/rsDic.cpp +121 -0
- data/vendor/ux-trie/ux-0.1.9/src/rsDic.hpp +57 -0
- data/vendor/ux-trie/ux-0.1.9/src/ux.hpp +26 -0
- data/vendor/ux-trie/ux-0.1.9/src/uxMain.cpp +206 -0
- data/vendor/ux-trie/ux-0.1.9/src/uxMap.cpp +0 -0
- data/vendor/ux-trie/ux-0.1.9/src/uxMap.hpp +248 -0
- data/vendor/ux-trie/ux-0.1.9/src/uxMapTest.cpp +139 -0
- data/vendor/ux-trie/ux-0.1.9/src/uxTest.cpp +229 -0
- data/vendor/ux-trie/ux-0.1.9/src/uxTrie.cpp +529 -0
- data/vendor/ux-trie/ux-0.1.9/src/uxTrie.hpp +220 -0
- data/vendor/ux-trie/ux-0.1.9/src/uxUtil.cpp +92 -0
- data/vendor/ux-trie/ux-0.1.9/src/uxUtil.hpp +35 -0
- data/vendor/ux-trie/ux-0.1.9/src/wscript +43 -0
- data/vendor/ux-trie/ux-0.1.9/unittest_gtest.py +0 -0
- data/vendor/ux-trie/ux-0.1.9/unittest_gtest.pyc +0 -0
- data/vendor/ux-trie/ux-0.1.9/unittestt.py +166 -0
- data/vendor/ux-trie/ux-0.1.9/ux.pc.in +10 -0
- data/vendor/ux-trie/ux-0.1.9/waf +0 -0
- data/vendor/ux-trie/ux-0.1.9/wscript +32 -0
- metadata +249 -0
@@ -0,0 +1,79 @@
|
|
1
|
+
#! /usr/bin/env python
|
2
|
+
# encoding: utf-8
|
3
|
+
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
|
4
|
+
|
5
|
+
import os,sys
|
6
|
+
from waflib.TaskGen import feature,after_method
|
7
|
+
from waflib import Utils,Task,Logs,Options
|
8
|
+
testlock=Utils.threading.Lock()
|
9
|
+
def make_test(self):
|
10
|
+
if getattr(self,'link_task',None):
|
11
|
+
self.create_task('utest',self.link_task.outputs)
|
12
|
+
class utest(Task.Task):
|
13
|
+
color='PINK'
|
14
|
+
after=['vnum','inst']
|
15
|
+
vars=[]
|
16
|
+
def runnable_status(self):
|
17
|
+
ret=super(utest,self).runnable_status()
|
18
|
+
if ret==Task.SKIP_ME:
|
19
|
+
if getattr(Options.options,'all_tests',False):
|
20
|
+
return Task.RUN_ME
|
21
|
+
return ret
|
22
|
+
def run(self):
|
23
|
+
filename=self.inputs[0].abspath()
|
24
|
+
self.ut_exec=getattr(self,'ut_exec',[filename])
|
25
|
+
if getattr(self.generator,'ut_fun',None):
|
26
|
+
self.generator.ut_fun(self)
|
27
|
+
try:
|
28
|
+
fu=getattr(self.generator.bld,'all_test_paths')
|
29
|
+
except AttributeError:
|
30
|
+
fu=os.environ.copy()
|
31
|
+
self.generator.bld.all_test_paths=fu
|
32
|
+
lst=[]
|
33
|
+
for g in self.generator.bld.groups:
|
34
|
+
for tg in g:
|
35
|
+
if getattr(tg,'link_task',None):
|
36
|
+
lst.append(tg.link_task.outputs[0].parent.abspath())
|
37
|
+
def add_path(dct,path,var):
|
38
|
+
dct[var]=os.pathsep.join(Utils.to_list(path)+[os.environ.get(var,'')])
|
39
|
+
if Utils.is_win32:
|
40
|
+
add_path(fu,lst,'PATH')
|
41
|
+
elif sys.platform=='darwin':
|
42
|
+
add_path(fu,lst,'DYLD_LIBRARY_PATH')
|
43
|
+
add_path(fu,lst,'LD_LIBRARY_PATH')
|
44
|
+
else:
|
45
|
+
add_path(fu,lst,'LD_LIBRARY_PATH')
|
46
|
+
cwd=getattr(self.generator,'ut_cwd','')or self.inputs[0].parent.abspath()
|
47
|
+
proc=Utils.subprocess.Popen(self.ut_exec,cwd=cwd,env=fu,stderr=Utils.subprocess.PIPE,stdout=Utils.subprocess.PIPE)
|
48
|
+
(stdout,stderr)=proc.communicate()
|
49
|
+
tup=(filename,proc.returncode,stdout,stderr)
|
50
|
+
self.generator.utest_result=tup
|
51
|
+
testlock.acquire()
|
52
|
+
try:
|
53
|
+
bld=self.generator.bld
|
54
|
+
Logs.debug("ut: %r",tup)
|
55
|
+
try:
|
56
|
+
bld.utest_results.append(tup)
|
57
|
+
except AttributeError:
|
58
|
+
bld.utest_results=[tup]
|
59
|
+
finally:
|
60
|
+
testlock.release()
|
61
|
+
def summary(bld):
|
62
|
+
lst=getattr(bld,'utest_results',[])
|
63
|
+
if lst:
|
64
|
+
Logs.pprint('CYAN','execution summary')
|
65
|
+
total=len(lst)
|
66
|
+
tfail=len([x for x in lst if x[1]])
|
67
|
+
Logs.pprint('CYAN',' tests that pass %d/%d'%(total-tfail,total))
|
68
|
+
for(f,code,out,err)in lst:
|
69
|
+
if not code:
|
70
|
+
Logs.pprint('CYAN',' %s'%f)
|
71
|
+
Logs.pprint('CYAN',' tests that fail %d/%d'%(tfail,total))
|
72
|
+
for(f,code,out,err)in lst:
|
73
|
+
if code:
|
74
|
+
Logs.pprint('CYAN',' %s'%f)
|
75
|
+
def options(opt):
|
76
|
+
opt.add_option('--alltests',action='store_true',default=False,help='Exec all unit tests',dest='all_tests')
|
77
|
+
|
78
|
+
feature('test')(make_test)
|
79
|
+
after_method('apply_link')(make_test)
|
data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/winres.py
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
#! /usr/bin/env python
|
2
|
+
# encoding: utf-8
|
3
|
+
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
|
4
|
+
|
5
|
+
from waflib import Task
|
6
|
+
from waflib.TaskGen import extension
|
7
|
+
def rc_file(self,node):
|
8
|
+
obj_ext='.rc.o'
|
9
|
+
if self.env['WINRC_TGT_F']=='/fo':
|
10
|
+
obj_ext='.res'
|
11
|
+
rctask=self.create_task('winrc',node,node.change_ext(obj_ext))
|
12
|
+
try:
|
13
|
+
self.compiled_tasks.append(rctask)
|
14
|
+
except AttributeError:
|
15
|
+
self.compiled_tasks=[rctask]
|
16
|
+
class winrc(Task.Task):
|
17
|
+
run_str='${WINRC} ${WINRCFLAGS} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${WINRC_TGT_F} ${TGT} ${WINRC_SRC_F} ${SRC}'
|
18
|
+
color='BLUE'
|
19
|
+
def configure(conf):
|
20
|
+
v=conf.env
|
21
|
+
v['WINRC_TGT_F']='-o'
|
22
|
+
v['WINRC_SRC_F']='-i'
|
23
|
+
if not conf.env.WINRC:
|
24
|
+
if v.CC_NAME=='msvc':
|
25
|
+
conf.find_program('RC',var='WINRC',path_list=v['PATH'])
|
26
|
+
v['WINRC_TGT_F']='/fo'
|
27
|
+
v['WINRC_SRC_F']=''
|
28
|
+
else:
|
29
|
+
conf.find_program('windres',var='WINRC',path_list=v['PATH'])
|
30
|
+
if not conf.env.WINRC:
|
31
|
+
conf.fatal('winrc was not found!')
|
32
|
+
v['WINRCFLAGS']=[]
|
33
|
+
|
34
|
+
extension('.rc')(rc_file)
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#! /usr/bin/env python
|
2
|
+
# encoding: utf-8
|
3
|
+
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
|
4
|
+
|
5
|
+
from waflib.Tools import ccroot,ar
|
6
|
+
from waflib.Configure import conf
|
7
|
+
def find_xlc(conf):
|
8
|
+
cc=conf.find_program(['xlc_r','xlc'],var='CC')
|
9
|
+
cc=conf.cmd_to_list(cc)
|
10
|
+
conf.get_xlc_version(cc)
|
11
|
+
conf.env.CC_NAME='xlc'
|
12
|
+
conf.env.CC=cc
|
13
|
+
def xlc_common_flags(conf):
|
14
|
+
v=conf.env
|
15
|
+
v['CC_SRC_F']=[]
|
16
|
+
v['CC_TGT_F']=['-c','-o']
|
17
|
+
if not v['LINK_CC']:v['LINK_CC']=v['CC']
|
18
|
+
v['CCLNK_SRC_F']=[]
|
19
|
+
v['CCLNK_TGT_F']=['-o']
|
20
|
+
v['CPPPATH_ST']='-I%s'
|
21
|
+
v['DEFINES_ST']='-D%s'
|
22
|
+
v['LIB_ST']='-l%s'
|
23
|
+
v['LIBPATH_ST']='-L%s'
|
24
|
+
v['STLIB_ST']='-l%s'
|
25
|
+
v['STLIBPATH_ST']='-L%s'
|
26
|
+
v['RPATH_ST']='-Wl,-rpath,%s'
|
27
|
+
v['SONAME_ST']=[]
|
28
|
+
v['SHLIB_MARKER']=[]
|
29
|
+
v['STLIB_MARKER']=[]
|
30
|
+
v['LINKFLAGS_cprogram']=['-Wl,-brtl']
|
31
|
+
v['cprogram_PATTERN']='%s'
|
32
|
+
v['CFLAGS_cshlib']=['-fPIC']
|
33
|
+
v['LINKFLAGS_cshlib']=['-G','-Wl,-brtl,-bexpfull']
|
34
|
+
v['cshlib_PATTERN']='lib%s.so'
|
35
|
+
v['LINKFLAGS_cstlib']=[]
|
36
|
+
v['cstlib_PATTERN']='lib%s.a'
|
37
|
+
def configure(conf):
|
38
|
+
conf.find_xlc()
|
39
|
+
conf.find_ar()
|
40
|
+
conf.xlc_common_flags()
|
41
|
+
conf.cc_load_tools()
|
42
|
+
conf.cc_add_flags()
|
43
|
+
conf.link_add_flags()
|
44
|
+
|
45
|
+
conf(find_xlc)
|
46
|
+
conf(xlc_common_flags)
|
data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/xlcxx.py
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
#! /usr/bin/env python
|
2
|
+
# encoding: utf-8
|
3
|
+
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
|
4
|
+
|
5
|
+
from waflib.Tools import ccroot,ar
|
6
|
+
from waflib.Configure import conf
|
7
|
+
def find_xlcxx(conf):
|
8
|
+
cxx=conf.find_program(['xlc++_r','xlc++'],var='CXX')
|
9
|
+
cxx=conf.cmd_to_list(cxx)
|
10
|
+
conf.get_xlc_version(cxx)
|
11
|
+
conf.env.CXX_NAME='xlc++'
|
12
|
+
conf.env.CXX=cxx
|
13
|
+
def xlcxx_common_flags(conf):
|
14
|
+
v=conf.env
|
15
|
+
v['CXX_SRC_F']=[]
|
16
|
+
v['CXX_TGT_F']=['-c','-o']
|
17
|
+
if not v['LINK_CXX']:v['LINK_CXX']=v['CXX']
|
18
|
+
v['CXXLNK_SRC_F']=[]
|
19
|
+
v['CXXLNK_TGT_F']=['-o']
|
20
|
+
v['CPPPATH_ST']='-I%s'
|
21
|
+
v['DEFINES_ST']='-D%s'
|
22
|
+
v['LIB_ST']='-l%s'
|
23
|
+
v['LIBPATH_ST']='-L%s'
|
24
|
+
v['STLIB_ST']='-l%s'
|
25
|
+
v['STLIBPATH_ST']='-L%s'
|
26
|
+
v['RPATH_ST']='-Wl,-rpath,%s'
|
27
|
+
v['SONAME_ST']=[]
|
28
|
+
v['SHLIB_MARKER']=[]
|
29
|
+
v['STLIB_MARKER']=[]
|
30
|
+
v['LINKFLAGS_cxxprogram']=['-Wl,-brtl']
|
31
|
+
v['cxxprogram_PATTERN']='%s'
|
32
|
+
v['CXXFLAGS_cxxshlib']=['-fPIC']
|
33
|
+
v['LINKFLAGS_cxxshlib']=['-G','-Wl,-brtl,-bexpfull']
|
34
|
+
v['cxxshlib_PATTERN']='lib%s.so'
|
35
|
+
v['LINKFLAGS_cxxstlib']=[]
|
36
|
+
v['cxxstlib_PATTERN']='lib%s.a'
|
37
|
+
def configure(conf):
|
38
|
+
conf.find_xlcxx()
|
39
|
+
conf.find_ar()
|
40
|
+
conf.xlcxx_common_flags()
|
41
|
+
conf.cxx_load_tools()
|
42
|
+
conf.cxx_add_flags()
|
43
|
+
conf.link_add_flags()
|
44
|
+
|
45
|
+
conf(find_xlcxx)
|
46
|
+
conf(xlcxx_common_flags)
|
@@ -0,0 +1,334 @@
|
|
1
|
+
#! /usr/bin/env python
|
2
|
+
# encoding: utf-8
|
3
|
+
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
|
4
|
+
|
5
|
+
import os,sys,errno,traceback,inspect,re,shutil,datetime,gc
|
6
|
+
try:
|
7
|
+
import subprocess
|
8
|
+
except:
|
9
|
+
try:
|
10
|
+
import waflib.extras.subprocess as subprocess
|
11
|
+
except:
|
12
|
+
print("The subprocess module is missing (python2.3?):\n try calling 'waf update --files=subprocess'\n or add a copy of subprocess.py to the python libraries")
|
13
|
+
try:
|
14
|
+
from collections import deque
|
15
|
+
except ImportError:
|
16
|
+
class deque(list):
|
17
|
+
def popleft(self):
|
18
|
+
return self.pop(0)
|
19
|
+
try:
|
20
|
+
import _winreg as winreg
|
21
|
+
except:
|
22
|
+
try:
|
23
|
+
import winreg
|
24
|
+
except:
|
25
|
+
winreg=None
|
26
|
+
from waflib import Errors
|
27
|
+
try:
|
28
|
+
from collections import UserDict
|
29
|
+
except:
|
30
|
+
from UserDict import UserDict
|
31
|
+
try:
|
32
|
+
from hashlib import md5
|
33
|
+
except:
|
34
|
+
try:
|
35
|
+
from md5 import md5
|
36
|
+
except:
|
37
|
+
pass
|
38
|
+
try:
|
39
|
+
import threading
|
40
|
+
except:
|
41
|
+
class threading(object):
|
42
|
+
pass
|
43
|
+
class Lock(object):
|
44
|
+
def acquire(self):
|
45
|
+
pass
|
46
|
+
def release(self):
|
47
|
+
pass
|
48
|
+
threading.Lock=threading.Thread=Lock
|
49
|
+
else:
|
50
|
+
run_old=threading.Thread.run
|
51
|
+
def run(*args,**kwargs):
|
52
|
+
try:
|
53
|
+
run_old(*args,**kwargs)
|
54
|
+
except(KeyboardInterrupt,SystemExit):
|
55
|
+
raise
|
56
|
+
except:
|
57
|
+
sys.excepthook(*sys.exc_info())
|
58
|
+
threading.Thread.run=run
|
59
|
+
SIG_NIL='iluvcuteoverload'
|
60
|
+
O644=420
|
61
|
+
O755=493
|
62
|
+
rot_chr=['\\','|','/','-']
|
63
|
+
rot_idx=0
|
64
|
+
try:
|
65
|
+
from collections import defaultdict
|
66
|
+
except ImportError:
|
67
|
+
class defaultdict(dict):
|
68
|
+
def __init__(self,default_factory):
|
69
|
+
super(defaultdict,self).__init__()
|
70
|
+
self.default_factory=default_factory
|
71
|
+
def __getitem__(self,key):
|
72
|
+
try:
|
73
|
+
return super(defaultdict,self).__getitem__(key)
|
74
|
+
except KeyError:
|
75
|
+
value=self.default_factory()
|
76
|
+
self[key]=value
|
77
|
+
return value
|
78
|
+
is_win32=sys.platform in('win32','cli')
|
79
|
+
indicator='\x1b[K%s%s%s\r'
|
80
|
+
if is_win32 and'NOCOLOR'in os.environ:
|
81
|
+
indicator='%s%s%s\r'
|
82
|
+
def readf(fname,m='r'):
|
83
|
+
f=open(fname,m)
|
84
|
+
try:
|
85
|
+
txt=f.read()
|
86
|
+
finally:
|
87
|
+
f.close()
|
88
|
+
return txt
|
89
|
+
def h_file(filename):
|
90
|
+
f=open(filename,'rb')
|
91
|
+
m=md5()
|
92
|
+
try:
|
93
|
+
while filename:
|
94
|
+
filename=f.read(100000)
|
95
|
+
m.update(filename)
|
96
|
+
finally:
|
97
|
+
f.close()
|
98
|
+
return m.digest()
|
99
|
+
try:
|
100
|
+
x=''.encode('hex')
|
101
|
+
except:
|
102
|
+
import binascii
|
103
|
+
def to_hex(s):
|
104
|
+
ret=binascii.hexlify(s)
|
105
|
+
if not isinstance(ret,str):
|
106
|
+
ret=ret.decode('utf-8')
|
107
|
+
return ret
|
108
|
+
else:
|
109
|
+
def to_hex(s):
|
110
|
+
return s.encode('hex')
|
111
|
+
to_hex.__doc__="""
|
112
|
+
Return the hexadecimal representation of a string
|
113
|
+
|
114
|
+
:param s: string to convert
|
115
|
+
:type s: string
|
116
|
+
"""
|
117
|
+
listdir=os.listdir
|
118
|
+
if is_win32:
|
119
|
+
def listdir_win32(s):
|
120
|
+
if not s:
|
121
|
+
try:
|
122
|
+
import ctypes
|
123
|
+
except:
|
124
|
+
return[x+':\\'for x in list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')]
|
125
|
+
else:
|
126
|
+
dlen=4
|
127
|
+
maxdrives=26
|
128
|
+
buf=ctypes.create_string_buffer(maxdrives*dlen)
|
129
|
+
ndrives=ctypes.windll.kernel32.GetLogicalDriveStringsA(maxdrives,ctypes.byref(buf))
|
130
|
+
return[buf.raw[4*i:4*i+3].decode('ascii')for i in range(int(ndrives/dlen))]
|
131
|
+
if len(s)==2 and s[1]==":":
|
132
|
+
s+=os.sep
|
133
|
+
if not os.path.isdir(s):
|
134
|
+
e=OSError()
|
135
|
+
e.errno=errno.ENOENT
|
136
|
+
raise e
|
137
|
+
return os.listdir(s)
|
138
|
+
listdir=listdir_win32
|
139
|
+
def num2ver(ver):
|
140
|
+
if isinstance(ver,str):
|
141
|
+
ver=tuple(ver.split('.'))
|
142
|
+
if isinstance(ver,tuple):
|
143
|
+
ret=0
|
144
|
+
for i in range(4):
|
145
|
+
if i<len(ver):
|
146
|
+
ret+=256**(3-i)*int(ver[i])
|
147
|
+
return ret
|
148
|
+
return ver
|
149
|
+
def ex_stack():
|
150
|
+
exc_type,exc_value,tb=sys.exc_info()
|
151
|
+
exc_lines=traceback.format_exception(exc_type,exc_value,tb)
|
152
|
+
return''.join(exc_lines)
|
153
|
+
def to_list(sth):
|
154
|
+
if isinstance(sth,str):
|
155
|
+
return sth.split()
|
156
|
+
else:
|
157
|
+
return sth
|
158
|
+
re_nl=re.compile('\r*\n',re.M)
|
159
|
+
def str_to_dict(txt):
|
160
|
+
tbl={}
|
161
|
+
lines=re_nl.split(txt)
|
162
|
+
for x in lines:
|
163
|
+
x=x.strip()
|
164
|
+
if not x or x.startswith('#')or x.find('=')<0:
|
165
|
+
continue
|
166
|
+
tmp=x.split('=')
|
167
|
+
tbl[tmp[0].strip()]='='.join(tmp[1:]).strip()
|
168
|
+
return tbl
|
169
|
+
def split_path(path):
|
170
|
+
return path.split('/')
|
171
|
+
def split_path_cygwin(path):
|
172
|
+
if path.startswith('//'):
|
173
|
+
ret=path.split('/')[2:]
|
174
|
+
ret[0]='/'+ret[0]
|
175
|
+
return ret
|
176
|
+
return path.split('/')
|
177
|
+
re_sp=re.compile('[/\\\\]')
|
178
|
+
def split_path_win32(path):
|
179
|
+
if path.startswith('\\\\'):
|
180
|
+
ret=re.split(re_sp,path)[2:]
|
181
|
+
ret[0]='\\'+ret[0]
|
182
|
+
return ret
|
183
|
+
return re.split(re_sp,path)
|
184
|
+
if sys.platform=='cygwin':
|
185
|
+
split_path=split_path_cygwin
|
186
|
+
elif is_win32:
|
187
|
+
split_path=split_path_win32
|
188
|
+
split_path.__doc__="""
|
189
|
+
Split a path by / or \\. This function is not like os.path.split
|
190
|
+
|
191
|
+
:type path: string
|
192
|
+
:param path: path to split
|
193
|
+
:return: list of strings
|
194
|
+
"""
|
195
|
+
def check_dir(path):
|
196
|
+
if not os.path.isdir(path):
|
197
|
+
try:
|
198
|
+
os.makedirs(path)
|
199
|
+
except OSError ,e:
|
200
|
+
if not os.path.isdir(path):
|
201
|
+
raise Errors.WafError('Cannot create the folder %r'%path,ex=e)
|
202
|
+
def def_attrs(cls,**kw):
|
203
|
+
for k,v in kw.items():
|
204
|
+
if not hasattr(cls,k):
|
205
|
+
setattr(cls,k,v)
|
206
|
+
def quote_define_name(s):
|
207
|
+
fu=re.compile("[^a-zA-Z0-9]").sub("_",s)
|
208
|
+
fu=fu.upper()
|
209
|
+
return fu
|
210
|
+
def h_list(lst):
|
211
|
+
m=md5()
|
212
|
+
m.update(str(lst))
|
213
|
+
return m.digest()
|
214
|
+
def h_fun(fun):
|
215
|
+
try:
|
216
|
+
return fun.code
|
217
|
+
except AttributeError:
|
218
|
+
try:
|
219
|
+
h=inspect.getsource(fun)
|
220
|
+
except IOError:
|
221
|
+
h="nocode"
|
222
|
+
try:
|
223
|
+
fun.code=h
|
224
|
+
except AttributeError:
|
225
|
+
pass
|
226
|
+
return h
|
227
|
+
reg_subst=re.compile(r"(\\\\)|(\$\$)|\$\{([^}]+)\}")
|
228
|
+
def subst_vars(expr,params):
|
229
|
+
def repl_var(m):
|
230
|
+
if m.group(1):
|
231
|
+
return'\\'
|
232
|
+
if m.group(2):
|
233
|
+
return'$'
|
234
|
+
try:
|
235
|
+
return params.get_flat(m.group(3))
|
236
|
+
except AttributeError:
|
237
|
+
return params[m.group(3)]
|
238
|
+
return reg_subst.sub(repl_var,expr)
|
239
|
+
def destos_to_binfmt(key):
|
240
|
+
if key=='darwin':
|
241
|
+
return'mac-o'
|
242
|
+
elif key in('win32','cygwin','uwin','msys'):
|
243
|
+
return'pe'
|
244
|
+
return'elf'
|
245
|
+
def unversioned_sys_platform():
|
246
|
+
s=sys.platform
|
247
|
+
if s=='java':
|
248
|
+
from java.lang import System
|
249
|
+
s=System.getProperty('os.name')
|
250
|
+
if s=='Mac OS X':
|
251
|
+
return'darwin'
|
252
|
+
elif s.startswith('Windows '):
|
253
|
+
return'win32'
|
254
|
+
elif s=='OS/2':
|
255
|
+
return'os2'
|
256
|
+
elif s=='HP-UX':
|
257
|
+
return'hpux'
|
258
|
+
elif s in('SunOS','Solaris'):
|
259
|
+
return'sunos'
|
260
|
+
else:s=s.lower()
|
261
|
+
if s=='win32'or s.endswith('os2')and s!='sunos2':return s
|
262
|
+
return re.split('\d+$',s)[0]
|
263
|
+
def nada(*k,**kw):
|
264
|
+
pass
|
265
|
+
class Timer(object):
|
266
|
+
def __init__(self):
|
267
|
+
self.start_time=datetime.datetime.utcnow()
|
268
|
+
def __str__(self):
|
269
|
+
delta=datetime.datetime.utcnow()-self.start_time
|
270
|
+
days=int(delta.days)
|
271
|
+
hours=delta.seconds//3600
|
272
|
+
minutes=(delta.seconds-hours*3600)//60
|
273
|
+
seconds=delta.seconds-hours*3600-minutes*60+float(delta.microseconds)/1000/1000
|
274
|
+
result=''
|
275
|
+
if days:
|
276
|
+
result+='%dd'%days
|
277
|
+
if days or hours:
|
278
|
+
result+='%dh'%hours
|
279
|
+
if days or hours or minutes:
|
280
|
+
result+='%dm'%minutes
|
281
|
+
return'%s%.3fs'%(result,seconds)
|
282
|
+
if is_win32:
|
283
|
+
old=shutil.copy2
|
284
|
+
def copy2(src,dst):
|
285
|
+
old(src,dst)
|
286
|
+
shutil.copystat(src,dst)
|
287
|
+
setattr(shutil,'copy2',copy2)
|
288
|
+
if os.name=='java':
|
289
|
+
try:
|
290
|
+
gc.disable()
|
291
|
+
gc.enable()
|
292
|
+
except NotImplementedError:
|
293
|
+
gc.disable=gc.enable
|
294
|
+
def read_la_file(path):
|
295
|
+
sp=re.compile(r'^([^=]+)=\'(.*)\'$')
|
296
|
+
dc={}
|
297
|
+
for line in readf(path).splitlines():
|
298
|
+
try:
|
299
|
+
_,left,right,_=sp.split(line.strip())
|
300
|
+
dc[left]=right
|
301
|
+
except ValueError:
|
302
|
+
pass
|
303
|
+
return dc
|
304
|
+
def nogc(fun):
|
305
|
+
def f(*k,**kw):
|
306
|
+
try:
|
307
|
+
gc.disable()
|
308
|
+
ret=fun(*k,**kw)
|
309
|
+
finally:
|
310
|
+
gc.enable()
|
311
|
+
return ret
|
312
|
+
f.__doc__=fun.__doc__
|
313
|
+
return f
|
314
|
+
def run_once(fun):
|
315
|
+
cache={}
|
316
|
+
def wrap(k):
|
317
|
+
try:
|
318
|
+
return cache[k]
|
319
|
+
except KeyError:
|
320
|
+
ret=fun(k)
|
321
|
+
cache[k]=ret
|
322
|
+
return ret
|
323
|
+
wrap.__cache__=cache
|
324
|
+
return wrap
|
325
|
+
def get_registry_app_path(key,filename):
|
326
|
+
if not winreg:
|
327
|
+
return None
|
328
|
+
try:
|
329
|
+
result=winreg.QueryValue(key,"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\%s.exe"%filename[0])
|
330
|
+
except WindowsError:
|
331
|
+
pass
|
332
|
+
else:
|
333
|
+
if os.path.isfile(result):
|
334
|
+
return result
|