社内向け。 tokibitoの知識が偏ってるので、もっといろいろ知りたいなら社内チャットで他の人にも聞くこと。 Python easy_install setuptoolsかdistributeというパッケージで使えるコマンド。 @aodag 曰くsetuptools使わずに、distribute使えという話。 インストールはこんな感じ。 $ curl -O http://python-distribute.org/distribute_setup.py $ python distribute_setup.pyWelcome to Distribute’s documentation! — Distribute documentation pip パッケージのインストールに使う。後述のvirutualenvとかを使うならこれ。 インストールスクリプトで入れるか、easy_installなど
At PyCon I noticed the usual discussion of IDEs, editors, and programming environments. There seems to be some sort of strange equilibrium going on whereby programmers are constantly fussing, switching and growing discontented with their programming editors. I've used Emacs for almost 10 years now and other than a brief (forced) stint with CodeWarrior in college, it has been my primary editor for
はじめに こんにちは、Python界のほぼ日手帳です。RSSリーダーを眺めてたら、なんかPythonを使ってTwitterのコマンドラインアプリを作る見たいのがはやってたみたいなのでまぜてまぜてー。というわけで書きました。 リンク tw.pyを少し拡張してみた - へにゃぺんて@日々勉強のまとめ 良いもの。悪いもの。: コマンドラインで動作するOAuth対応TwitterクライアントをPythonで作ってみた とりあえず作り散らかした ymotongpoo/TwCmd · GitHub forkでもspoonでもなんでもしてください。 準備 Pythonライブラリ 最近はPyPIに便利パッケージが増えましたね、めでたいめでたい。Twitterでタイムライン取得や発言をするだけならtweepyが便利だぜ。OAuth 1.0対応。あとコマンドラインアプリケーションは標準モジュールのcmdモジュ
emacsのpython-modeでもauto-complete.elを使う 2009.05.27 日記 auto-complete, Emacs, google, Python, ubuntu こないだは、R用のauto-complete.el拡張を書いてみたわけですが、ここまで来るとpython開発環境もemacsにしておきたい。 というわけで、どうにか使えるようになったので、まとめてみます。ちなみに当方の環境は32bit ubuntu9.04です。 python開発環境の整備 その前に、python開発環境on emacsの整備から。 実は、emacsとpythonの関係はかなりややこしいことになっていましてemacs21時代はpython-mode.elなるpython-modeが主流だったようなのですが、emacs22ではpython.elなるpython-modeがデフォルトで
The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In
Pythonを使ったプログラミングについて、今回から解説します。PerlやRubyと比べると、Pythonは日本ではまだマイナーな印象がありますが、「Google三大言語」(C++、Java、Pythonのこと)のひとつでもあり、Facebookをはじめとしたメジャーなサイトでの事例が急速に増えていることから、日本でも今後普及する可能性が高いです。私が社長をしているゼロスタートコミュニケーションズという会社では、設立当時(4年ほど前)から自社製品にはPythonを使っており、ここ半年間、周囲でPythonを使用しているケースが増えているのは嬉しい限りです。 Pythonに限らず、プログラミング言語が日本で普及するかどうかの鍵を握っているのは、(幸か不幸か)日本語情報の多寡であると思います。Rubyの事情は正直よくわかりませんが、たとえばPerlがこれだけ日本でメジャーになったのは、Perl
動機 Macにはmixiフォトアップローダが無かったり、mixi stationの調子が悪かったりして頭に来たので、スクリプトで同様のアプリケーションを作ってみようと思った。 できた物 WSSE.py (ファイル後半) 使い方 一通りの使い方はこんな感じ。 mc = MixiClient('username','password') tracks = mc.getTracks() # 足あとの取得(10件) notify = mc.getNotify() # お知らせの取得 friends = mc.getFriends() # マイミク一覧の取得 update = mc.getUpdates() # 更新情報一覧の取得 albumurl = mc.createAlbum(u'旅行', u'旅行の写真') # 新規フォトアルバムの作成 mc.postPicsToAlbum(['photo1
あなたがもしPythonを作る前のGuidoに憑依して - ネットリサーチ - livedoor ニュース が面白すぎた。2位と3位の すべてを式にする lambdaの構文を変える は、同じ願いを別の言い方でしてるような気がした。lambdaにifとforを入れたいをかなえるには、ifとforを式にするか、lambdaに文が入るようにするか、どちらか一方だし。 それはさておき、このエントリの本題は、「Pythonにはselfが要る」というGuidoさんの主張について、具体例で理解することです。「こうだったらいいのにな」逆の視点、もしselfがないとどう困るのか、を考えましょう。 そこで、Pythonとは別の母親から産まれた双子、JavaScriptを例に、thisについて考えてみます。Pythonに対して、JavaScriptは「メソッド定義の第一引数に余分なアレがないこと」が特徴でしたね
研究室で共有ソフトウェア開発プロジェクトが一気に2つくらい走り出しそうなので、インフラの整備と言うことでSubversionに続いてtracをインストールすることにした。*1最初portinstallやpkg_addしても全然接続できなくて、おそらくfirewallのせいだろうとは思ったんだけど、肝心のportsに使うポート番号が分からない。*2仕方がないのでとりあえずfirewall切って設定開始。設定が終わったらまたfirewall立てよう。 Trac日本語版インストールメモ - akiyan.com 管理人メモ trac — takanory.net まず下準備としてportsnap fetchとupdateをしてから下記のパッケージをインストール。 #portinstall python #portinstall sqlite3 #portinstall databases/py-
Schemepy What is Schemepy? Schemepy is a Python module that enables you to embed a Scheme interpreter in your program. It supports various native Scheme implementations for speed. A fall back pure-Python implementation is also available when no suitable native implementations available. Download Schemepy 1.0.0 source (any platform) Schemepy 1.0.0 i386 deb package (Debian and Ubuntu) Document API:
昨日のエントリのコメントにて、 nishio『とりあえずインストールしてみたけどなにがいいのかよくわかんない… bjamとかいう独自のビルドツールを使うせいで標準のdistutilが持っている機能(Windows用インストーラがコマンド1行で作れるとか)が使えなくなってしまっている気がする。』 (2007/06/11 12:33) earth2001y『bjamはboost自体をビルド、インストールするのに使うだけで、それ以後は関係ないよ。distuilも普通に使えるので、整理して新しいエントリに書きますね。』 (2007/06/11 18:46) って書いたので、Boostの準備からモジュールの作成、インストールまで、順を追って書き出してみますた。 Boostをインストール まず、Boostの準備。BoostのソースとbjamをBoostの配布元からとってくる。Boosy.Pythonは
One of the things that I like about Django is that it allows you to run unit tests on the code with relative ease. So I have a bunch of unit tests now, and I was looking to expand it. For that I first needed to know which parts of the code had good coverage and which parts had no coverage. I needed to integrate code coverage with the unit testing framework. In the end, it involved modifying a few
Introduction Related Articles You may also find useful the following articles on fetching web resources with Python : Basic Authentication A tutorial on Basic Authentication, with examples in Python. cookielib and ClientCookie How to handle cookies when fetching web-pages with urllib2. urllib2 is a Python module for fetching URLs (Uniform Resource Locators). It offers a very simple interface, in t
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く