第10回「入門 ソーシャルデータ」真面目に勉強する会 @神泉(渋谷)
http://atnd.org/events/25514・facebook__graph__query.py
→うごかない
・facebook__fql_query.pyの実行(P309)
python facebook__fql_query.py 'select name,sex, relationship_status from user where uid in (select target_id from connection where source_id = me())'
sqlalchemyのバグ
同じ現象https://groups.google.com/forum/?fromgroups#!topic/sqlalchemy/mMKAwKWSeus
http://docs.python.org/py3k/howto/pyporting.html
あとで読む
https://github.com/taky/fboauth-pyramid/tree/master/fboauth
今更だが・・・ Python
__main__.pyの名前でカレントディレクトリへ保存し、カレントディレクトリで、python .
で実行できる。
・__main__.py
from sys import argv def a(): """ a's __doc__ -------------------- """ print("a") def b(): """ b's __doc__ -------------------- """ print("b") def c(): """ c's __doc__ -------------------- """ print("c") def d(): """ d's __doc__ -------------------- """ print("d") options = ['a', 'b', 'c', 'd'] if len(argv) == 1 or argv[1] not in options: print('') for option in options: print(' ->\t%s\t%s'%(option, eval(option).__doc__.split('\n')[1])) else: eval(argv[1])()
こうすると
python . a
や
python . b
がいける。
Tespoon + Tornado + Python2.7 on Windows
teaspoonでハマってしまってるhttps://github.com/marxus85/teaspoon
Python2.7だとすんなりいけた。
sqliteではとりあえず問題はなかった。
engine = create_engine('sqlite+pysqlite:///file.db')
localhostをUserテーブルに保存しないとlocalhostでは繋がらないらしい
http://dev.mysql.com/doc/refman/5.0/en/connection-access.html
・しかしこのようにlocalhostをオミットしてもダメだった
engine = create_engine('mysql+pymysql://teaspoon:teaspoon@/teaspoon')
Tespoon on Python3
■Python3において修正すべき・libs\controller.py
#from urllib import urlencode #Python2 #from urlparse import urlsplit #Python2 from urllib.parse import urlencode #Python3 from urllib.parse import urlsplit #Python3
・libs\form_xcode.py
#from urllib import quote_plus #Python2 #from urlparse import parse_qsl #Python2 from urllib.parse import quote_plus #Python3 from urllib.parse import parse_qsl #Python3