FrontPage
/
Python
-- 雛形とするページ --
10Th Annual Moonlight Music Romantic Days Celebration Concert 21409
20 Fun Free And Meaningful Things Every Student Can Do It Christmas Vacation
20 Fun Free And Meaningful Things Every Student Can Repeat This Christmas Vacation
20 Fun Free And Meaningful Things Every Student Can Take The Plunge Christmas Vacation
2006 Graduation Gift Suggestions For College Students
3Verse?
5 Birthday Gift Ideas For That Special Girl
5 Ideas For A Retirement Gift This Also Surely Be Appreciated
5 Solutions To Save On Online Concert Tickets
5 Suggestions For A Retirement Gift That All Retiree Will Clearly Love
5 Tips For A Retirement Gift Anyone Surely Be Appreciated
5 Ways To Save On Online Concert Tickets
6 NoFail Gift Suggestions For Your Spouse
A Facts Gift Tips For Women Aged 20 To 30
A Means To Buying Discount Concert Tickets
A Path To Buying Discount Concert Tickets
Adam Lambert Concert Tickets How We Can Find Them
Affordable Florida Marlins Tickets Available
An Easy Grab For Hard To Obtain Tickets
Anniversary Gifts 5 Gift Applying For Grants What To Anniversary Gift
Anniversary Gifts 5 Gift Tips On What The Anniversary Gift
Anniversary Gifts 5 Gift Tips On What To Anniversary Gift
Apologetix In Concert April 29Th 2011
Archway
Arealeum
Barry Manilow Tickets Concert Tickets For Barry Manilow Are Easier To Find Online
Best Dallas Music Venues
Best Ways To Win Tickets To An Event
Bitwave Unique Features
Bob Dylan Concert Ticket Get In For Free
BracketName
Britney Spears Tickets The World Class Young Music Icon
Brokering Concert Tickets 101
Burnsville Riddlefest Celebrates Traditional Mountain Music On Feb 19
Buy Bieber Concert Tickets
Buy Concert Tickets Online
Buying Concert Tickets
Buying Country Concert Tickets At Discounted Rates
Buying Discount Britney Spears Tickets Tips Tricks To Achieve The Tickets You Want
Buying HardToFind Concert, Sport, Theater, Season And Event Tickets
Buying Your Justin Bieber Concert Tickets
Bzetcoin
Carole King Concert Tickets The Very Value For Your Money
Casino detailliert was Sie müssen lernen
Catch The Sensation, Grab The Adam Lambert Concert Tickets
Cheap Bon Jovi Concert Tickets
Cheap Christmas Gifts For Your Boyfriend
Cheap Christmas Gifts Inside Your Boyfriend
Cheap Christmas Gifts To Get Your Boyfriend
Cheap Concert Tickets
Cheap Concert Tickets Save Money Tickets Where To Look
Cheap Last Minute Christmas Gift Ideas
Cheap Sports Event Tickets
Cheap Taylor Swift Concert Tickets
Child Safety Poster An Essential Tool For Letting Babies And Toddlers Explore
Chris Brown Concert Tickets
Chris Tomlin Kicks Off Burning Lights Concert Tour With Free Tickets
Christmas Floki X Unique Features
Christmas Floki X?
Christmas Gifts For Kids Best Of The Highest On Associated Content
Christmas Gifts For The Musicians
Christmas Giftsbest Xmas Presents For Men Women Girls Boys Festive BabyToddler Ideas
Christmas Presents For 2010
Christmas StockingStuffer Gifts For Dads AllInOne Remotes To Concert Tickets
Concert Tickets Buying Them Safely On Ebay
Country Music Alphabet Vince Gill
Country Songs Alphabet Vince Gill
Country Songs You May Not Detest Even If You Dont Like Nation Music
Country Tunes You Might Not Detest Even If You Dont Like Nation Songs
Craigslist Tickets Sports Theatre Las Vegas Save Money
Create Really Own Valentines Gift Basket
Dad, Be Her Hero This Valentines Day Taylor Swift Concert Tickets Perfect Gift
Dads Run In Pumps For Hannah Montana Concert Tickets
Dallas Live Music 101 What Is Often A Street People
Dallas Live Music 101 Where Are You Able To Buy Concert Tickets
Dallas Live Music 101 Where Is It Possible To Buy Concert Tickets
David Archuleta His Taste In Music
Decadent LastMinute Christmas Gifts For Under 100
Der ultimative Tipps für Blackjack
Details Zum Roulette Mit Bonus Man kann einfach nicht Ignorieren
Deutsche Blackjack Zu Spielen Online Leistungs Verhältnis Tipps Beratung Von a Kenntnisreich Veteran
Deutsche Casino Spiel Revealed Tipps zur Verstehen
Die effektivste Neue Casino Information Verfügbar
Discount La Lakers Tickets How To Look
Don Henley Live Performance At The Hard Rock Casino
Enjoy The Fairy Tale Music Of Tailor Swift
Enjoy Your Favorite Show By Expending Less Through Online Booking Of Tickets
Entertainment Music Faq
Erfahrene Glücksspielgesetze Beratung Tipps
Every Breath You Take, Buying Your Sting Concert Tickets
Ferndale Higher School Choir And Orchestra Fall Live Performance
Find Affordable Live Performance Tickets
Find Event Tickets Online Using Google And The Bbb
Find Her A Unique Gift Could Love
Find Her A Unique Gift Your Girl Friend Will Love
Finding A Really Perfect Bridesmaid Gift
Finding A Really Wonderful Bridesmaid Gift
Finding Concert And Sports Tickets Online
Finding Exactly How To Buy Concert Tickets
Finding Tickets For Concerts Online Inside Of Most Trouble Free Way
Finding Tickets To Concerts And Events Is Easy Online
Fire Safety During Camping
FitBurn
FormattingRules
Forschung Deutschland Die Besten Online Roulette Durch die Verwendung dieser Beratung
Four Best Reasons When You Buy Tickets Online
Four Best Reasons Why You Ought To Buy Tickets Online
FrontPage
FrontPage/30Design
FrontPage/AWS
FrontPage/After Effects
FrontPage/AppleID-iCloud
FrontPage/Bitcoin
FrontPage/Blender
FrontPage/Download Application
FrontPage/FiSig
FrontPage/GLROWS/LogoAnimation調査
FrontPage/GoogleAppEngine
FrontPage/HTML+JS+CSS
FrontPage/HTML+JS+CSS/jQuery-DragandDropPlugin
FrontPage/HTML+JS+CSS/jQuery-DragandDropPlugin/PHP+jsonの保存と読み込み
FrontPage/OpenFoam
FrontPage/PHP
FrontPage/Python
FrontPage/Python その2
FrontPage/Python/Matplotlib
FrontPage/Python/OpenCV
FrontPage/Python/OpenGL
FrontPage/Python/Pandas
FrontPage/Python/PostgreSQL
FrontPage/Python/PySide
FrontPage/Python/PySide/QPainter-skelton.py
FrontPage/Python/PySide/mpl_stylesheet.py
FrontPage/Python/PySide/plotter.py
FrontPage/Python/PySideその2
FrontPage/Python/SQLite
FrontPage/Python/Scipy+Numpy
FrontPage/Python/Scrayping
FrontPage/Python/Sound
FrontPage/Python/Sphinx
FrontPage/Python/module-list(151120)
FrontPage/Python/windowsモジュール
FrontPage/Python/資格試験
FrontPage/RaspberryPi
FrontPage/SEO
FrontPage/ShipsLogs
FrontPage/SublimeText
FrontPage/TensorFlow
FrontPage/Tips
FrontPage/UML
FrontPage/Ubuntu
FrontPage/Visualization
FrontPage/WeddingMovie
FrontPage/Windows
FrontPage/Windowsプログラミング
FrontPage/bat処理
FrontPage/facebook
FrontPage/ffmpeg
FrontPage/git
FrontPage/pukiwiki
FrontPage/python/Flask
FrontPage/python/SQLalchemy
FrontPage/python/logger
FrontPage/python/packageing
FrontPage/python/twitterbot
FrontPage/test
FrontPage/web
FrontPage/サクラレンタルサーバーTips
FrontPage/ホーンスピーカ
FrontPage/モジュール管理(ライブラリ)
FrontPage/一流Youtube
FrontPage/会計ソフト
FrontPage/機械学習
FrontPage/機械学習/QLearning
FrontPage/物理シミュレーション
FrontPage/目指せパイソニスタ
FrontPage/自宅サーバー
FrontPage/製作ヒアリング
FrontPage/製作記録100
Garth Brooks And Toby Keith Set Benefit Concert Date
George Strait, Martina Mcbride St Louis Tickets Available November 18
George Strait, Martina Mcbride St Louis Tickets You Can Find November 18
Get Cheap Concert Tickets For Sale For The Greatest Bands
Get Their Hands On Celine Dion Tickets Fast
Get Their Hands On The Tickets Of Enchanting Events
Get Your Hands On The Tickets Of Enchanting Events
Get Your Rush Concert Tickets Online
Getting Tough To Get Concert Tickets
Getting Your Hands On Quality Concert Tickets
Gift Ideas For Teenage Boys
Gift Suggestions For Teenage Boys
Gift Suggestions For The 12 Days Of Christmas
Gift Tips For Teenage Boys
Gift Tips For The 12 Days Of Christmas
Glee Tour Tickets Glee Solid Hits The Stage This May
Glücksspiel Online gesetze Informationen Fakten Sie wissen müssen
Going Quickly Gaga Tickets
Good Schemes Of Concert Tickets Vendors
Grab The U2 Tickets Of Simple Shows
Grab The U2 Tickets Of Your Favorite Shows
Grab Those Bon Jovi Concert Tickets
Great Late Holiday Gift Ideas
Green Wedding Gift Ideas
Guidelines Exactly How To To Score Cheap Concert Tickets
Guidelines Regarding How To Score Cheap Concert Tickets
Handy Things To Know About Concert Tickets
Hannah Montana Concert Tickets
Hannah Montana Concert Tickets Are Hot
Have A Rocking And Rolling Time With John Mayer Concert Tickets
Heiko Finance
Help
HiMen
Hilfe benötigen mit Roulette lesen Sie dies
Hostgator Promotional Code Tips Instructions
How Acquire Keith Urban Concert Tickets
How Anyone Buy A Legislator Sex, Spankings And Britney Spears Tickets
How Being A Ticket Broker In Order To Buy Promote Concert Tickets
How Come Across Cheap Tickets For Britney Spears See Her One More Time
How Consumer Keith Urban Concert Tickets
How Coordinator Ticket Broker Learn To Buy Promote Concert Tickets
How Decide To Buy Pink Concert Tickets
How Discover Cheap Concert Tickets 5 Surefire Techniques
How Invest In Keith Urban Concert Tickets
How Locate Backstage Concert Tickets
How To Book Concert Tickets In Los Angeles
How To Buy Keith Urban Concert Tickets
How To Choose A Gift For Your Loved Ones
How To Discover Cheap Tickets For Britney Spears See Her One More Time
How To Establish A Birthday Gift Basket
How To Generate Money From Selling Concert Tickets
How To Get Concert Tickets Before You Can Purchase Out
How To Get Michael Buble Concert Tickets Without A Fuss
How To Get Tickets From Radio Stations Tampa Florida Fashion
How To Leonard Cohen Concert Tickets
How To Locate Cheap Tickets
How To Obtain Cheap And Free Concert Tickets
How To Obtain Concert Tickets You Know Are Going To Sell Out
How To Produce Birthday Gift Basket
How To Scout And Avail For Reasonable Concert Tickets
How To Seek Great Christmas Ideas For Men
How Unearth Sold Out Concert Tickets
How You Can Also Make Money By Selling Disney On Ice Tickets
HyperCycle
Important Consider When Selling Your Concert Tickets Online
Important Facts To Consider When Selling Your Concert Tickets Online
In Anbetracht Roulette Siehe Dieses Erste
Indie Music Promotion Get Signed Independently
Indie Songs Promotion Get Signed Independently
InterWiki
InterWikiName
InterWikiSandBox
Jessie J Tickets Bournemouth What Could Be The Best Approach To Buy Them
John Legend Tour Tickets Ways To Find Them Right Now
Jonas Brothers 2009 World Tour Concert Dates Announced
Jonas Brothers Concert Tickets Best Bets
Justin Bieber Attacked With Eggs Throughout Australian Concert Video
Justin Bieber Tickets My World Tour
Katy Perry Tickets California Dreams Tour 2011
KvantsAI
Lady Gaga Concert Tickets The Perfect Performance For Their Little Price
Lady Gaga Tickets Chicago Theatre
Lee Dewyze Hometown Concert
Live Nation Giving Away Pair Of Season Pass Tickets
Live Nation Providing Away Pair Of Season Move Tickets
Livenation Concert Deal On Groupon Today
Make Christmas Less Stressed And More Blessed
Maroon 5 Concert Tickets Hands Throughout Tour
Maroon Five Tickets Hands All More Than Tour
MemeFarm
MenuBar
MetaMic E-Sports Game
Metamic (MEG) Token Economy
Metamic (MEG) Unique Features
Methods To Obtain Concert Tickets Safely And Also At Great Value From The Internet
Methods To Obtain Concert Tickets Safely And Great Value From The Internet
More Healing In The Heartland Relief Benefit Concert Tickets Become Available
Music Artist Fiona Apple Bio
Music Is Connection Towards Your Teen
My First Musical Concert
Nachdenken über Schlagen Online Blackjack Sehen Sie sich diese Zuvor
Nashville Is Not Just For The Nation Music Lover
Nashville Music Scene The Wildhorse Saloon
Nfl Tickets Nfc West Preview
Nfl Tickets Preseason Predictions Nfc South
Online Concert Tickets
Online Dating 4 Major Benefits Associated With Online Dating
Online Dating 4 Major Primary Advantages Of Online Dating
Online Spielen Roulette Informationen Sie wissen müssen
Online Ticket Brokers Consider The Hassle Outside Your Event Ticket Search
Online Ticket Brokers Consider The Hassle Regarding Your Event Ticket Search
Online Ticket Brokers Take The Hassle From The Your Event Ticket Search
Order Magnetic Signs For Concert Events
OtterHome
PHP
Parallel Finance
Pink Floyd Wish Possibly Here Concert Tickets At Discount November 28
Pink Floyd Wish You Are Here Concert Tickets Worth The Money November 28
Pink Floyd Wish You Had Been Here Concert Tickets On Sale November 28
Pink Floyd Wish You Had Been Here Live Performance Tickets On Sale November 28
Polygame
Prevent Future Listening To Reduction By Going To A Hearing Middle
PtggQfCn
PukiWiki
PukiWiki/1.4
PukiWiki/1.4/Manual
PukiWiki/1.4/Manual/Plugin
PukiWiki/1.4/Manual/Plugin/A-D
PukiWiki/1.4/Manual/Plugin/E-G
PukiWiki/1.4/Manual/Plugin/H-K
PukiWiki/1.4/Manual/Plugin/L-N
PukiWiki/1.4/Manual/Plugin/O-R
PukiWiki/1.4/Manual/Plugin/S-U
PukiWiki/1.4/Manual/Plugin/V-Z
Purchasing Obtaining Concert Tickets
PySide
Rascal Flatts Tickets Why It Is Hard To Get Rascal Flatts Ticket
RecentDeleted
Review Of Hannah Montana Miley Cyrus Best Of Both Worlds Concert In Disney Digital 3D
Ringing In My Ears Following A Concert Is This Regular
Robbie Williams Concert Enable You To Get Good Tickets With These Tips
Robbie Williams Concert Take You Good Tickets With These Tips
Roch Deals For October 9911 Chris Brown Tickets, Food Deals Galore More
Rock With All The Camp Rock Concert Tickets
Rock With The Camp Rock Concert Tickets
Rolling Stones Tickets Tips When Buying The Tickets
Roulette Strategien und Taktik
San Francisco Giants Tickets Fantasy Predictions Analyzed
SandBox
Sayari
Scooping The Jack Johnson Concert Tickets
See A Legend Receiving Your Roger Waters Tickets
Selling Concert Tickets Overview
Shop From Dealandyou And Put Free Flo Rida Concert Tickets
Slipknot Concert Tickets Good Deals Around
Social Service
Sold Out Tickets Required
Special Gifts Like Tickets Can Also Be Purchased Online
Spice Girls Tickets Where To Get Spice Girls Concert Tickets And Tour Tickets
Sting Tickets And Tour Dates 2012
Subway Fresh Buzz 5 Concert Tickets
Subway Offers 5 Concert Tickets For Nickelback And Also The Fray Concerts
Subway Offers 5 Concert Tickets For Nickelback As Well As The Fray Concerts
Summer Concerts And Music Festivals In Charlotte, Nc
Super Bowl 2010 Concerts
Swift Tickets Fearless Tour 2010
Taylor Swift Concert Tickets These While There Are Chance
Taylor Swift Concert Tickets Expected To Sell Out Quickly
Taylor Swift Concert Tickets In Greenville, Sc
Taylor Swift Tickets Speak Now Tour
Taylor Swift Tour 2010 Dates Announced And Tickets On Sale
The Associated With Purchasing Online Concert Tickets
The Convenience Of Buying Concert Tickets Of Your Liking Online
The Convenience Of Buying Live Performance Tickets Of Your Choice Online
The Convenience Of Purchasing Online Concert Tickets
The Ease Of Buying Concert Tickets Which You Decide Online
The Ease Of Purchasing Online Concert Tickets
The FitBurn
The Method To Purchase Tickets To Events
The Mintera Token
The Most Treasured Concert Ticket At That Time
The Online Classifieds Industry Guide
The Online Classifieds Sell And Buy Guide
The Six Sigma Music Business Keep Your Audiences Coming Back For More
The Social Bookmark Submitting Teaching Youngsters Fire Safety
The Stars Go Blue For Colon Cancer 2Nd Annual Benefit Concert
The To Help Obtain Taylor Swift Concert Tickets
The Tradition Of Ads Still Holds True
The Ultimate Christmas Gift
Tips Acquire Cheap Event Tickets
Tips Carried Out Correctly Tickets For Concert
Tips For Choosing Concert Tickets And Sports Tickets
Tips For Getting Concert Tickets And Sports Tickets
Tips For Gift Baskets
Tips For Selecting Concert Tickets And Sports Tickets
Tips Means Purchase Tickets To Events
Tips On Promoting Your Music Band
Tips Process To Purchase Tickets To Events
Tips Which Will Get Genuine Cheap Concert Tickets
Top 10 Best Christmas Gifts 2010 For Him
Top 3 Ways To Get Free Tickets To Cleveland Occasions
Top 3 Ways To Win Free Tickets To Cleveland Events
Top 5 Hard RockMetal Concert Tickets
Top 5 Rock And Pop Concert Tickets
Top Websites To Funds From Online Easily
Useful Christmas Present Concepts For College Students
Valentines Day Gift Concepts For A Younger Man
Valentines Day Gift Concepts For Your Boyfriend 2010
Valentines Day Gift Suggestions For Your Boyfriend 2010
Valentines Day Gift Tips For Your Boyfriend 2010
Vehron
VetAPP
What Is Bitwave?
What To Look Around For To Components Fake Concert Tickets
What is Christmas Floki X?
What is Crypto Lottery
What is Honorworld?
Whats Greatest Place To See Live Music In The Capital
Whats Leading Place To Discover Live Music In The Capital
Whats Next At Seaworld Christmas Is Over, Solely For Kids Starts January 12
Whats Quite Place Notice Live Music In Liverpool
Where Invest In Concert Event Tickets
Where Locate Inexpensive Concert Tickets
Where To Locate Inexpensive Concert Tickets
Why Theres Nothing Like A Gaga Concert
WikiEngines
WikiName
WikiWikiWeb
Win Madonna Tickets 1 Fm At Pridefest
Win Taylor Swift Concert Tickets With St Louis Country Music Station The Bull
Wrap Your Current Shopping Early With Online Tickets
Wrap Your Shopping Early With Online Tickets
YukiWiki
am Casino von diesen Gebrauch machen Techniken
an excellent discount
chamnha
firstpage
florester
hohe Qualität Einzelheiten zu Casino Sie müssen
idodar
n
pukiwiki
soft1
wie ich gefunden die Realität betreffend SlotSpiele
x
** パッケージング [#g46d9584] http://python.civic-apps.com/dist-library/ **モジュールのアップデート [#k6b5fc40] pip list -o とすると,outdated なパッケージ一覧が出ます. 一度インストールしたパッケージをアップグレードする場合には、-U (--upgrade)を使います。 % pip install scipy -U anacondaのアップデート conda update condo conda update anaconda conda update --all ** Python32bit と 64bitの共存 [#a5cc0411] - (状態) Anaconda64bitがプライマリとしてインストール - Anacondaの32bitをC直下にインストール - PyCharm上でconnsoleを開くと64bit。 - 下batのPATH部分だけをコンソールに走らす。 PythonPathを変えるbat @echo off ::: 実行前の準備 set EXEC_DIR=%~dp0 ::: python PATH=C:\Anaconda2_32bit;C:\Anaconda2_32bit\Scripts;%PATH% cd %EXEC_DIR% PROMPT #$S %ComSpec% ** フォルダの新規作成 # 格納親ディレクトリの RESULT_DIR_ROOT = '(tmp)TF_Average_txt' if os.path.exists(RESULT_DIR_ROOT): shutil.rmtree(RESULT_DIR_ROOT) os.mkdir(RESULT_DIR_ROOT) else: os.mkdir(RESULT_DIR_ROOT) ** Python PATHの設定 [#xe741b4e] 64bit版と32bit版を共存させる。ターミナルではデフォルトで32bit版を使いたい。 そこで、システム環境設定からPYTHONPATHを変更する PYTHONPATHの設定 set PYTHONPATH=%PYTHONPATH%;C:\Anaconda2_32bit; set PYTHONPATH=%PYTHONPATH%;C:\Users\0160929\AppData\Local\Continuum\Anaconda; SYSTEM PATHへ追加 PATH = %PATH%;C:\Users\0160929\AppData\Local\Continuum\Anaconda\Lib\site-packages\PyQt4;C:\Users\0160929\AppData\Local\Continuum\Anaconda;C:\Users\0160929\AppData\Local\Continuum\Anaconda\Scripts; PATH = %PATH%;C:\Anaconda2_32bit;C:\Anaconda2_32bit\Scripts; PATHも通す C:\Anaconda2_32bit; C:\Anaconda2_32bit\Scripts; C:\Anaconda2_32bit\Library\bin ** ファイルフォルダ操作 [#v0573099] *** フォルダ内のフォルダ一覧を取得 [#g1d9b436] BASE_DIR = os.path.dirname(sys.argv[0]) SEARCH_PATH = os.path.join(BASE_DIR, '*') SOURCE_DIR =[dir for dir in glob.glob() if os.path.isdir(dir)] sys.path.append(os.path.join(BASE_DIR, './GolfClassification/FiSig/')) file_name = os.path.basename(filepath) UPLOAD_FOLDER_NAME = 'image' PHISICAL_ROOT = os.path.abspath('./') ALLOWED_EXTENSIONS = set(['.PNG', '.png', '.JPG', '.jpg', '.jpeg', '.gif']) UPLOAD_FOLDER = os.path.join(PHISICAL_ROOT, UPLOAD_FOLDER_NAME) ** iPython Notebook [#g6ea7e98] 起動方法 $ipython notebook ** iPythonおまじない [#lb7e6868] iPythonとmatplotlibを使ってグラフを描画するときのおまじない。 %matplotlib inline import numpy as np import matplotlib.pyplot as plt ** nbviwer [#h75d005f] .ipynbファイルをgistかgithubにアップロードして置くことで、vbviwerによりwebページとして表示することができる。 #ref(s-nbviewer.jpg,,50%) [[→nbviwer>http://nbviewer.ipython.org/]] ** 時間計測 [#x64e078e] import time start = time.time() print(">> Finish Analys :{0}".format(time.time() - start)) ** PyInstaller [#qde9d4cd] pyinstaller SimpleTextEditor.py --onefile --noconsole + --onefile : .exeを一つのファイルにする + --windowed, -w : コマンドプロンプト非表示 + -i<appicon.icon>, --icon=<appicon.icon> : プログラムのアイコンを設定 + --noconsole : コマンドプロンプト非表示 *** エラー IOError: [Errno 22] invalid mode ('rb') or filename: '' [#s77fd814] File "C:\Users\fifi\Anaconda\lib\site-packages\PyInstaller\build.py", line 796, in cacheDigest data = open(fnm, "rb").read() IOError: [Errno 22] invalid mode ('rb') or filename: '' - 見つけた対策 1 [[http://codedmi.com/questions/785472/pyinstaller-errno-22]] Well reinstalled pywin32 and now working :S just going go with it Just spent the better part of a week tracking this bug down. Was getting this error just by trying to compile a script importing numpy or pandas and printing "hello world". Eventually fixed it by running command prompt as administrator... Yeah. Hope this helps some poor desperate soul. I had the same issues but found these other solutions did not fix the problem. I did however find a fix as follows: First, my situation may be a little different to the OP as I'm using the Anaconda Python distribution on Windows 7, and used the conda command line too to install pywin32, and then used pip to install pyinstaller. I found the same IOError was preceded by this earlier error message in the pyinstaller output log: ImportError: No system module 'pywintypes' (pywintypes27.dll) The solution that fixed both errors was to copy the DLL files: pywintypes27.dll pythoncom27.dll sitting in: C:\<anaconda-dir>\Lib\site-packages\win32 to C:\<anaconda-dir>\Lib\site-packages\win32\lib Where <anaconda-dir> will either be your root Anaconda directory: C:\Users\<username>\AppData\Local\Continuum\Anaconda\ by default, or an environment you have set up e.g. C:\Users\<username>\AppData\Local\Continuum\Anaconda\envs\<environment-name> A came across this answer thanks to Tompa here, who found it solved a similar problem in py2exe. ** エラーの発行 raise [#ya1a635b] [[→組み込み例外>http://docs.python.jp/2/library/exceptions.html#exceptions.EnvironmentError]] # ファイルが存在しない場合は返却 if not os.path.exists(filepath): # raise StandardError("File is not exist %s" % (filepath)) return try: # ファイルオープン data = wave.open(filepath, 'rb') except IOError: raise StandardError("Cant file load %s" % (filepath)) else: # 正常時の処理 finally: pass ** 例外処理のよい例・悪い例 [#hc442a98] まずは悪い例 def get_status(file): if not os.path.exists(file): print "file not found" sys.exit(1) return open(file).readline() これだと、open(file)の際に出たエラーを捕まえていない。 よい例 def get_status(file): try: return open(file).readline() except EnvironmentError as err: print "Unable to open file: {}".format(err) sys.exit(1) ** LookupError: unknown encoding: windows-31j [#r75276b1] - Pycahrmの設定で、文字コード設定をUTF=8に変更する ** py2exe [#m8b6bf68] [[→http://www.py2exe.org/>http://www.py2exe.org/]] [[→py2exe Python スクリプトからスタンドアロンのWindowsプログラムへの変換>http://www.python.jp/Zope/Zope/articles/tips/py2exe]] [[→Py2exe 利用ノート>https://showa-yojyo.github.io/note/python-py2exe.html]] [[→Pythonで単体で動くバイナリを作ろう!>http://python.matrix.jp/pages/modules/py2exe.html]] どうもPySideを使っているとPyInstallerが上手くexe化してくれない。しかたがないので、py2exeをつかってみる。 - 日本語で読むならこちら -- 非常に丁寧に説明がされており、概要をしるにはぴったり。 [[PYINSTALLERの遅さにがっかりしてPY2EXEにしたら爆速で驚いた件>http://april.fool.jp/blogs/2014/10/python-pyinstaller%E3%81%AE%E9%81%85%E3%81%95%E3%81%AB%E3%81%8C%E3%81%A3%E3%81%8B%E3%82%8A%E3%81%97%E3%81%A6py2exe%E3%81%AB%E3%81%97%E3%81%9F%E3%82%89%E7%88%86%E9%80%9F%E3%81%A7%E9%A9%9A%E3%81%84/]] -- 公式のチュートリアル(英語)。まずはHelloworldをexe化するべし。 [[py2exe tutorial>http://www.py2exe.org/index.cgi/Tutorial]] ** platformを調べる [#of715af6] ################# if PySide not installed inside houdini libs import platform if platform.system() == 'Windows': sp = 'C:/Python27/Lib/site-packages' if not sp in sys.path: # if os.path.exists(sp): sys.path.insert(0, sp) print sp ** OpenCV for Python [#a9fc4196] - 参考資料 [[OpenCV Computer Vision with Python>http://www.amazon.co.jp/OpenCV-Computer-Vision-Python-Joseph-ebook/dp/B00CHMQ8L4/ref=sr_1_cc_2?s=aps&ie=UTF8&qid=1441677744&sr=1-2-catcorr&keywords=python+opencv]] #ref(opencv.jpg) ** 初心者ミス [#l781acba] Pythonをコーディングしている時に発生する初心者ミスをまとめておく。 - def__init(self) -- 正しくは、def __init__(self)。意外と良くやってしまう。 **型判定・型判別 [#l8b1bc1f] - type か isinstanceを使う -- if type(a): -- if isinstance(a, int): ** PythonでC言語のDLLを呼び出す [#t66c4af7] [[詳しくはこちら>https://gist.github.com/peace098beat/7837b71b83e5476e1cc1]] *** ダミーのcファイル : dll.c [#p457d348] void printdll(double * a_ary, int a_ary_length) { int i; for (i = 0; i < a_ary_length; i++) { // printf("a_ary[%d] = %d\n", i, a_ary[i]); a_ary[i] = a_ary[i]*a_ary[i]; } } *** dllの呼び出し確認用コード [#oba2387b] #!coding: utf-8 # *************************************************** # # main.py # dllの呼び出し確認用コード # # *************************************************** from ctypes import * # 標準dllの呼び出し(テスト) # cdll.msvcrt.printf('Hello, world!\n') # cdll.msvcrt.printf('double value: %f\n', c_double(3.14)) # 自作dllの呼び出し userdll = windll.LoadLibrary('rcadll.dll') # 定数 FRAME_SIZE = 1024 # 配列のオブジェクトを作成する # C言語で言うならば、array_aype = (int*)malloc(sizeof(int) * FRAME_SIZE) ArrayType = c_double * FRAME_SIZE stft_data = ArrayType() ResultData = c_double * 5 res_data = ResultData() # 作成した配列に値を入れる for i, val in enumerate(stft_data): stft_data[i] = i # 自作のdllを呼び出す(値を2乗する関数) # ポインタを渡している格好になる. userdll.printdll(stft_data, FRAME_SIZE) ** PyCharm コードテンプレート [#z279d0be] #! coding:utf-8 """ ${NAME} Created by ${USER} (${DATE} ${TIME}) """ def main(): pass if __name__ == "__main__": main() ** パスの取り扱い [#nd6582f6] os.path.dirname(sys.argv[0]) os.path.normpath() os.path.join() os.path.exists() path, ext = os.path.splitext(target_filepath) basename = os.path.basename(path) ** csv writer [#p762241a] os別のエンコード対策はこちら https://gist.github.com/peace098beat/696e741f941801ed705e def save(self, filename=None): if filename is None: filename = 'result.csv' filename = os.path.normpath(filename) with open(filename, 'wb') as f: #'wb'じゃないと変な改行入る。 writer = csv.writer(f, delimiter=',') for i in range(len(self.wav_filepath_s)): writer.writerow([self.wav_filepath_s[i]]) for i in range(len(self.wav_filepath_s)): writer.writerow([os.path.basename(self.wav_filepath_s[i])]) writer.writerow(['eval (1)', ]) for i in range(len(self.wav_filepath_s)): writer.writerow(self.result_table[i]) csvが文字化けしたら。。(現時点では意味が分からない) http://d.hatena.ne.jp/bonlife/20070831/1188564822 ** エクスプローラを開く [#u12ee4fe] import subprocess cmd_dir = 'explorer "%s"' % (os.path.normpath(os.path.dirname(filename))) subprocess.Popen(cmd_dir) cmd_file = 'explorer /select, "%s"' % (os.path.normpath(filename)) subprocess.Popen(cmd_file) # 日本語Path対応 # OSを判定し、文字コードを取得 if os.name is 'nt': code = 'cp932' else: code = 'utf-8' # UNICODE文字列から、OSに合わせてエンコード:文字化け回避 filename_ = filename.encode(code) # エクスプローラをオープン cmd_file = 'explorer /select, "%s"' % (os.path.normpath(filename_)) Popen(cmd_file) ** 辞書ソート [#h8206c4e] # -- ソート結果の表示 sum_list = [sum(ary) for ary in result_table] name_list = [os.path.basename(path) for path in self.wav_filepath_s] summary = zip(name_list, sum_list) summary = sorted(summary, key=itemgetter(1)) # summary = sorted(summary, key=lambda x:x[1]) writer.writerows(summary) ** 文字化け対応(日本語Path) [#idca0fa1] # OSを判定し、文字コードを取得 import os if os.name is 'nt': code = 'cp932' else: code = 'utf-8' # 文字列(Unicode)をバイト列へエンコード filename_ = filename.encode(code) ** PyAudioで音量を変える [#edc1a5e9] PyEQが参考になる。 バイナリデータをPCMに変えて、 PCMをfloatに変換 ブースト処理をかけて float->PCM->binaryに戻すとできる。 http://flamingoengine.googlecode.com/svn/trunk/backends/audio/pyaudio_mixer.py https://mail.python.org/pipermail/tutor/2012-September/091529.html まとめ https://gist.github.com/peace098beat/e00e30e10cb6b8ff753c ** PythonでWindowsAPIを使う [#bbf17f86] - PyHookモジュールが便利。ただ32bit版しかないのでこちらより64bit版のwhlをダウンロード http://www.lfd.uci.edu/~gohlke/pythonlibs/ # ダウンロードする pyHook-1.5.1-cp27-none-win_amd64.whl # ダウンロードしたフォルダでShift+右クリック>コマンドプロンプトを開く pip install pyHook-1.5.1-cp27-none-win_amd64.whl http://sourceforge.net/p/pyhook/wiki/PyHook_Tutorial/ import pythoncom, pyHook def OnMouseEvent(event): # called when mouse events are received print 'MessageName:',event.MessageName print 'Message:',event.Message print 'Time:',event.Time print 'Window:',event.Window print 'WindowName:',event.WindowName print 'Position:',event.Position print 'Wheel:',event.Wheel print 'Injected:',event.Injected print '---' # return True to pass the event to other handlers return True # create a hook manager hm = pyHook.HookManager() # watch for all mouse events hm.MouseAll = OnMouseEvent # set the hook hm.HookMouse() # wait forever pythoncom.PumpMessages() ** タスクトレイアプリ [#p6b1b495] http://moco.sakura.ne.jp/python/pyside-でタスクトレイアプリケーション作成/ pythonでのWindowsサービスの書き方 http://masahito.hatenablog.com/entry/20110511/1305107553 ** QThreadでストレスフルな生活を [#ea04b268] http://melpystudio.blog82.fc2.com/blog-entry-125.html ** ファイル名をTimeStampにする [#oc770e02] filename_base = datetime.datetime.now().strftime("%Y%m%d_%H%M") filename = os.path.abspath(os.path.join(DIRPATH_LOGFILE, filename_base) + '.csv') ** 文字コーーーーーード [#c2fb24e5] UNICODE = String 文字! それ以外は(例utf-8)はバイトコード!! # 解析結果をstring(UNICODE)型へキャスト print_str = str(token).decode('utf8') # Unicode をバイトコードへエンコード code = 'cp932' or 'utf-8' out_word = words.encode(code) ** ネットワークリソースのダウンロード [#l645a19e] # Network Resourse Download import urllib url = 'http://localhost/recome/(ed)REC_A01_14B330_Mic7.wav' path = 'download.wav' urllib.urlretrieve(url, path) ** 累乗計算 [#y3af0fd6] def ruijou(self, x): from numpy import log2, floor y0 = log2(x) # 最小t p = floor(y0) return int(2 ** p)
タイムスタンプを変更しない
** パッケージング [#g46d9584] http://python.civic-apps.com/dist-library/ **モジュールのアップデート [#k6b5fc40] pip list -o とすると,outdated なパッケージ一覧が出ます. 一度インストールしたパッケージをアップグレードする場合には、-U (--upgrade)を使います。 % pip install scipy -U anacondaのアップデート conda update condo conda update anaconda conda update --all ** Python32bit と 64bitの共存 [#a5cc0411] - (状態) Anaconda64bitがプライマリとしてインストール - Anacondaの32bitをC直下にインストール - PyCharm上でconnsoleを開くと64bit。 - 下batのPATH部分だけをコンソールに走らす。 PythonPathを変えるbat @echo off ::: 実行前の準備 set EXEC_DIR=%~dp0 ::: python PATH=C:\Anaconda2_32bit;C:\Anaconda2_32bit\Scripts;%PATH% cd %EXEC_DIR% PROMPT #$S %ComSpec% ** フォルダの新規作成 # 格納親ディレクトリの RESULT_DIR_ROOT = '(tmp)TF_Average_txt' if os.path.exists(RESULT_DIR_ROOT): shutil.rmtree(RESULT_DIR_ROOT) os.mkdir(RESULT_DIR_ROOT) else: os.mkdir(RESULT_DIR_ROOT) ** Python PATHの設定 [#xe741b4e] 64bit版と32bit版を共存させる。ターミナルではデフォルトで32bit版を使いたい。 そこで、システム環境設定からPYTHONPATHを変更する PYTHONPATHの設定 set PYTHONPATH=%PYTHONPATH%;C:\Anaconda2_32bit; set PYTHONPATH=%PYTHONPATH%;C:\Users\0160929\AppData\Local\Continuum\Anaconda; SYSTEM PATHへ追加 PATH = %PATH%;C:\Users\0160929\AppData\Local\Continuum\Anaconda\Lib\site-packages\PyQt4;C:\Users\0160929\AppData\Local\Continuum\Anaconda;C:\Users\0160929\AppData\Local\Continuum\Anaconda\Scripts; PATH = %PATH%;C:\Anaconda2_32bit;C:\Anaconda2_32bit\Scripts; PATHも通す C:\Anaconda2_32bit; C:\Anaconda2_32bit\Scripts; C:\Anaconda2_32bit\Library\bin ** ファイルフォルダ操作 [#v0573099] *** フォルダ内のフォルダ一覧を取得 [#g1d9b436] BASE_DIR = os.path.dirname(sys.argv[0]) SEARCH_PATH = os.path.join(BASE_DIR, '*') SOURCE_DIR =[dir for dir in glob.glob() if os.path.isdir(dir)] sys.path.append(os.path.join(BASE_DIR, './GolfClassification/FiSig/')) file_name = os.path.basename(filepath) UPLOAD_FOLDER_NAME = 'image' PHISICAL_ROOT = os.path.abspath('./') ALLOWED_EXTENSIONS = set(['.PNG', '.png', '.JPG', '.jpg', '.jpeg', '.gif']) UPLOAD_FOLDER = os.path.join(PHISICAL_ROOT, UPLOAD_FOLDER_NAME) ** iPython Notebook [#g6ea7e98] 起動方法 $ipython notebook ** iPythonおまじない [#lb7e6868] iPythonとmatplotlibを使ってグラフを描画するときのおまじない。 %matplotlib inline import numpy as np import matplotlib.pyplot as plt ** nbviwer [#h75d005f] .ipynbファイルをgistかgithubにアップロードして置くことで、vbviwerによりwebページとして表示することができる。 #ref(s-nbviewer.jpg,,50%) [[→nbviwer>http://nbviewer.ipython.org/]] ** 時間計測 [#x64e078e] import time start = time.time() print(">> Finish Analys :{0}".format(time.time() - start)) ** PyInstaller [#qde9d4cd] pyinstaller SimpleTextEditor.py --onefile --noconsole + --onefile : .exeを一つのファイルにする + --windowed, -w : コマンドプロンプト非表示 + -i<appicon.icon>, --icon=<appicon.icon> : プログラムのアイコンを設定 + --noconsole : コマンドプロンプト非表示 *** エラー IOError: [Errno 22] invalid mode ('rb') or filename: '' [#s77fd814] File "C:\Users\fifi\Anaconda\lib\site-packages\PyInstaller\build.py", line 796, in cacheDigest data = open(fnm, "rb").read() IOError: [Errno 22] invalid mode ('rb') or filename: '' - 見つけた対策 1 [[http://codedmi.com/questions/785472/pyinstaller-errno-22]] Well reinstalled pywin32 and now working :S just going go with it Just spent the better part of a week tracking this bug down. Was getting this error just by trying to compile a script importing numpy or pandas and printing "hello world". Eventually fixed it by running command prompt as administrator... Yeah. Hope this helps some poor desperate soul. I had the same issues but found these other solutions did not fix the problem. I did however find a fix as follows: First, my situation may be a little different to the OP as I'm using the Anaconda Python distribution on Windows 7, and used the conda command line too to install pywin32, and then used pip to install pyinstaller. I found the same IOError was preceded by this earlier error message in the pyinstaller output log: ImportError: No system module 'pywintypes' (pywintypes27.dll) The solution that fixed both errors was to copy the DLL files: pywintypes27.dll pythoncom27.dll sitting in: C:\<anaconda-dir>\Lib\site-packages\win32 to C:\<anaconda-dir>\Lib\site-packages\win32\lib Where <anaconda-dir> will either be your root Anaconda directory: C:\Users\<username>\AppData\Local\Continuum\Anaconda\ by default, or an environment you have set up e.g. C:\Users\<username>\AppData\Local\Continuum\Anaconda\envs\<environment-name> A came across this answer thanks to Tompa here, who found it solved a similar problem in py2exe. ** エラーの発行 raise [#ya1a635b] [[→組み込み例外>http://docs.python.jp/2/library/exceptions.html#exceptions.EnvironmentError]] # ファイルが存在しない場合は返却 if not os.path.exists(filepath): # raise StandardError("File is not exist %s" % (filepath)) return try: # ファイルオープン data = wave.open(filepath, 'rb') except IOError: raise StandardError("Cant file load %s" % (filepath)) else: # 正常時の処理 finally: pass ** 例外処理のよい例・悪い例 [#hc442a98] まずは悪い例 def get_status(file): if not os.path.exists(file): print "file not found" sys.exit(1) return open(file).readline() これだと、open(file)の際に出たエラーを捕まえていない。 よい例 def get_status(file): try: return open(file).readline() except EnvironmentError as err: print "Unable to open file: {}".format(err) sys.exit(1) ** LookupError: unknown encoding: windows-31j [#r75276b1] - Pycahrmの設定で、文字コード設定をUTF=8に変更する ** py2exe [#m8b6bf68] [[→http://www.py2exe.org/>http://www.py2exe.org/]] [[→py2exe Python スクリプトからスタンドアロンのWindowsプログラムへの変換>http://www.python.jp/Zope/Zope/articles/tips/py2exe]] [[→Py2exe 利用ノート>https://showa-yojyo.github.io/note/python-py2exe.html]] [[→Pythonで単体で動くバイナリを作ろう!>http://python.matrix.jp/pages/modules/py2exe.html]] どうもPySideを使っているとPyInstallerが上手くexe化してくれない。しかたがないので、py2exeをつかってみる。 - 日本語で読むならこちら -- 非常に丁寧に説明がされており、概要をしるにはぴったり。 [[PYINSTALLERの遅さにがっかりしてPY2EXEにしたら爆速で驚いた件>http://april.fool.jp/blogs/2014/10/python-pyinstaller%E3%81%AE%E9%81%85%E3%81%95%E3%81%AB%E3%81%8C%E3%81%A3%E3%81%8B%E3%82%8A%E3%81%97%E3%81%A6py2exe%E3%81%AB%E3%81%97%E3%81%9F%E3%82%89%E7%88%86%E9%80%9F%E3%81%A7%E9%A9%9A%E3%81%84/]] -- 公式のチュートリアル(英語)。まずはHelloworldをexe化するべし。 [[py2exe tutorial>http://www.py2exe.org/index.cgi/Tutorial]] ** platformを調べる [#of715af6] ################# if PySide not installed inside houdini libs import platform if platform.system() == 'Windows': sp = 'C:/Python27/Lib/site-packages' if not sp in sys.path: # if os.path.exists(sp): sys.path.insert(0, sp) print sp ** OpenCV for Python [#a9fc4196] - 参考資料 [[OpenCV Computer Vision with Python>http://www.amazon.co.jp/OpenCV-Computer-Vision-Python-Joseph-ebook/dp/B00CHMQ8L4/ref=sr_1_cc_2?s=aps&ie=UTF8&qid=1441677744&sr=1-2-catcorr&keywords=python+opencv]] #ref(opencv.jpg) ** 初心者ミス [#l781acba] Pythonをコーディングしている時に発生する初心者ミスをまとめておく。 - def__init(self) -- 正しくは、def __init__(self)。意外と良くやってしまう。 **型判定・型判別 [#l8b1bc1f] - type か isinstanceを使う -- if type(a): -- if isinstance(a, int): ** PythonでC言語のDLLを呼び出す [#t66c4af7] [[詳しくはこちら>https://gist.github.com/peace098beat/7837b71b83e5476e1cc1]] *** ダミーのcファイル : dll.c [#p457d348] void printdll(double * a_ary, int a_ary_length) { int i; for (i = 0; i < a_ary_length; i++) { // printf("a_ary[%d] = %d\n", i, a_ary[i]); a_ary[i] = a_ary[i]*a_ary[i]; } } *** dllの呼び出し確認用コード [#oba2387b] #!coding: utf-8 # *************************************************** # # main.py # dllの呼び出し確認用コード # # *************************************************** from ctypes import * # 標準dllの呼び出し(テスト) # cdll.msvcrt.printf('Hello, world!\n') # cdll.msvcrt.printf('double value: %f\n', c_double(3.14)) # 自作dllの呼び出し userdll = windll.LoadLibrary('rcadll.dll') # 定数 FRAME_SIZE = 1024 # 配列のオブジェクトを作成する # C言語で言うならば、array_aype = (int*)malloc(sizeof(int) * FRAME_SIZE) ArrayType = c_double * FRAME_SIZE stft_data = ArrayType() ResultData = c_double * 5 res_data = ResultData() # 作成した配列に値を入れる for i, val in enumerate(stft_data): stft_data[i] = i # 自作のdllを呼び出す(値を2乗する関数) # ポインタを渡している格好になる. userdll.printdll(stft_data, FRAME_SIZE) ** PyCharm コードテンプレート [#z279d0be] #! coding:utf-8 """ ${NAME} Created by ${USER} (${DATE} ${TIME}) """ def main(): pass if __name__ == "__main__": main() ** パスの取り扱い [#nd6582f6] os.path.dirname(sys.argv[0]) os.path.normpath() os.path.join() os.path.exists() path, ext = os.path.splitext(target_filepath) basename = os.path.basename(path) ** csv writer [#p762241a] os別のエンコード対策はこちら https://gist.github.com/peace098beat/696e741f941801ed705e def save(self, filename=None): if filename is None: filename = 'result.csv' filename = os.path.normpath(filename) with open(filename, 'wb') as f: #'wb'じゃないと変な改行入る。 writer = csv.writer(f, delimiter=',') for i in range(len(self.wav_filepath_s)): writer.writerow([self.wav_filepath_s[i]]) for i in range(len(self.wav_filepath_s)): writer.writerow([os.path.basename(self.wav_filepath_s[i])]) writer.writerow(['eval (1)', ]) for i in range(len(self.wav_filepath_s)): writer.writerow(self.result_table[i]) csvが文字化けしたら。。(現時点では意味が分からない) http://d.hatena.ne.jp/bonlife/20070831/1188564822 ** エクスプローラを開く [#u12ee4fe] import subprocess cmd_dir = 'explorer "%s"' % (os.path.normpath(os.path.dirname(filename))) subprocess.Popen(cmd_dir) cmd_file = 'explorer /select, "%s"' % (os.path.normpath(filename)) subprocess.Popen(cmd_file) # 日本語Path対応 # OSを判定し、文字コードを取得 if os.name is 'nt': code = 'cp932' else: code = 'utf-8' # UNICODE文字列から、OSに合わせてエンコード:文字化け回避 filename_ = filename.encode(code) # エクスプローラをオープン cmd_file = 'explorer /select, "%s"' % (os.path.normpath(filename_)) Popen(cmd_file) ** 辞書ソート [#h8206c4e] # -- ソート結果の表示 sum_list = [sum(ary) for ary in result_table] name_list = [os.path.basename(path) for path in self.wav_filepath_s] summary = zip(name_list, sum_list) summary = sorted(summary, key=itemgetter(1)) # summary = sorted(summary, key=lambda x:x[1]) writer.writerows(summary) ** 文字化け対応(日本語Path) [#idca0fa1] # OSを判定し、文字コードを取得 import os if os.name is 'nt': code = 'cp932' else: code = 'utf-8' # 文字列(Unicode)をバイト列へエンコード filename_ = filename.encode(code) ** PyAudioで音量を変える [#edc1a5e9] PyEQが参考になる。 バイナリデータをPCMに変えて、 PCMをfloatに変換 ブースト処理をかけて float->PCM->binaryに戻すとできる。 http://flamingoengine.googlecode.com/svn/trunk/backends/audio/pyaudio_mixer.py https://mail.python.org/pipermail/tutor/2012-September/091529.html まとめ https://gist.github.com/peace098beat/e00e30e10cb6b8ff753c ** PythonでWindowsAPIを使う [#bbf17f86] - PyHookモジュールが便利。ただ32bit版しかないのでこちらより64bit版のwhlをダウンロード http://www.lfd.uci.edu/~gohlke/pythonlibs/ # ダウンロードする pyHook-1.5.1-cp27-none-win_amd64.whl # ダウンロードしたフォルダでShift+右クリック>コマンドプロンプトを開く pip install pyHook-1.5.1-cp27-none-win_amd64.whl http://sourceforge.net/p/pyhook/wiki/PyHook_Tutorial/ import pythoncom, pyHook def OnMouseEvent(event): # called when mouse events are received print 'MessageName:',event.MessageName print 'Message:',event.Message print 'Time:',event.Time print 'Window:',event.Window print 'WindowName:',event.WindowName print 'Position:',event.Position print 'Wheel:',event.Wheel print 'Injected:',event.Injected print '---' # return True to pass the event to other handlers return True # create a hook manager hm = pyHook.HookManager() # watch for all mouse events hm.MouseAll = OnMouseEvent # set the hook hm.HookMouse() # wait forever pythoncom.PumpMessages() ** タスクトレイアプリ [#p6b1b495] http://moco.sakura.ne.jp/python/pyside-でタスクトレイアプリケーション作成/ pythonでのWindowsサービスの書き方 http://masahito.hatenablog.com/entry/20110511/1305107553 ** QThreadでストレスフルな生活を [#ea04b268] http://melpystudio.blog82.fc2.com/blog-entry-125.html ** ファイル名をTimeStampにする [#oc770e02] filename_base = datetime.datetime.now().strftime("%Y%m%d_%H%M") filename = os.path.abspath(os.path.join(DIRPATH_LOGFILE, filename_base) + '.csv') ** 文字コーーーーーード [#c2fb24e5] UNICODE = String 文字! それ以外は(例utf-8)はバイトコード!! # 解析結果をstring(UNICODE)型へキャスト print_str = str(token).decode('utf8') # Unicode をバイトコードへエンコード code = 'cp932' or 'utf-8' out_word = words.encode(code) ** ネットワークリソースのダウンロード [#l645a19e] # Network Resourse Download import urllib url = 'http://localhost/recome/(ed)REC_A01_14B330_Mic7.wav' path = 'download.wav' urllib.urlretrieve(url, path) ** 累乗計算 [#y3af0fd6] def ruijou(self, x): from numpy import log2, floor y0 = log2(x) # 最小t p = floor(y0) return int(2 ** p)
テキスト整形のルールを表示する