A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser.
Before I get into the next program, I should mention the Python home page, which offers recent versions of the interpreter and a lot of helpful information about the language. In particular, this tutorial is excellent. Still, I highly recommend getting a hold of Learning Python by Mark Lutz and David Ascher (O'Reilly 1999), which explains things way more thoroughly than the on-line tutorial. You a
Build the skills your teams need Give your teams the O’Reilly learning platform and equip them with the resources that drive business outcomes. Click on a feature below to explore. Trusted content Live online events Courses Interactive learning Certification prep O’Reilly Answers AI Academy Assignments Insights Dashboard Trusted content you can count on More than 60K titles from O’Reilly and nearl
Turbogears 0.8.8 で日本語を含むデータを表示しようとしたら、UnicodeDecodeErrorが発生する。 ググって見ると「 kid エンコーディング 」なる記事を発見。 kid.assume_encoding="utf-8" の記述をテンプレートに追加してみるが、起動後の最初の表示で UnicodeDecodeError が発生する。2回目以降は問題なく表示するのに。 しばしソースを眺めながら、turbogears/view.py に直接記述してみた。 22: compiledTemplates = {} 23: serializer = kid.HTMLSerializer(encoding="utf-8") 24: kid.assume_encoding="utf-8" これで問題なし。 0.8.9 がアップされてるのでバージョンアップして試してみないとと思いながら
As I promised, here is the writeup of Greg Stein's keynote last week at the SDForum Python Meeting. All text in italics are my thoughts. This is a repeat of the talk he gave last year at PyCON. He began with his introduction to python and how he began to use it at eShop (after he saw an early demo of what eventually became Zope). Which led into an interested timeline of various companies he had
By Mike Orr (Sluggo) Contents Introduction Frameworks Pre-WSGI Standardization WSGI Why WSGI Won't Replace SCGI Quixote's Challenges to WSGI WSGI Utils Other packages Paste QLime The web-sig Conclusion Introduction WSGI has become a buzzword among Python developers, especially since the PyWebOff discussed in my last article. The burgeoning proliferation of web application frameworks -- once a test
PEP 333 – Python Web Server Gateway Interface v1.0 Author: Phillip J. Eby <pje at telecommunity.com> Discussions-To: Web-SIG list Status: Final Type: Informational Created: 07-Dec-2003 Post-History: 07-Dec-2003, 08-Aug-2004, 20-Aug-2004, 27-Aug-2004, 27-Sep-2010 Superseded-By: 3333 Table of Contents Preface Abstract Rationale and Goals Specification Overview The Application/Framework Side The Serv
ちょっと別用で、pythonでグラフ描画したくなったんですよ。はぁい。 で、ちょっくら調べてみると、gnuplot.py が有名っぽい。 早速入れようかと思ったら、意外とインストール方法について言及した記事が無い。(いや、自分の探しようが悪いだけなのかも知れませんがね) なので、調べた内容をメモ〜。 まず、gnuplot.pyを入れるのに必要なレシピな。 Gnuplot.py http://gnuplot-py.sourceforge.net/ gnuplot homepage http://www.gnuplot.info/ Numerical Python Home Page http://numeric.scipy.org/ Python Corner http://www.otacky.jp/python.html wgnuplot.exe を使う2 http://www.biwa
[Home] [Setting up Mac OS X] [Python]: [ファイルを読む] 日本語を使う Pythonで日本語を使う Python 2.4以降では、標準で日本語を扱うことができます。 PythonのソースコードをUTF-8で書くには 日本語を扱うPythonのスクリプトの中では、UTF-8の文字コードを使うのが 楽です。 Mac OS Xのターミナルで日本語を扱う場合は、 ここの「4. Terminalの設定を変える」の 指示に従ってください。 以下、ソースコードの簡単な例を示します。 #!/usr/bin/env python # -*- coding: utf-8 -*- import re jtext = u'子猫が隠れんぼをしています' print 'jtext has', len(jtext), 'Japanese characters.' if re.se
Quotes Movable Python has the potential to affect your programming life even more than Microsoft's embrace. Yes, it's that important. -- Cameron Laird Zope on a rope! Movable Python allows me to carry Zope3.2 and my development environment everywhere I go. It's a great product, I love it. -- Kevin Smith Pages Movable Python Use Cases Movable Python - Python on a Stick Movable Python Distributions
関数に可変引数を渡してやりたい場合、自分で関数を作るなら、多分このようにすると思います。 def dummy_func1(*arg): print arg lt1 = ["1","2","3","4","5"] dummy_func1(lt1) 2006.01.30追記 上記の場合、単にリスト引数が一つ渡せるだけで複数の引数を渡したことには ならないですね。上記コードを実行するとこのようになりました。 少なくともエラーにはなりませんが。 => (["1","2","3","4","5"],) 本当は自分で書くなら、可変引数じゃなくて単にリストで定義すると思います。 def dummy_func0(arg): print arg なので、dummy_func1のようにした場合にもやはりどのように複数の引数を 渡してやるかという話があるわけですね。 じゃあ、このような定義になっていた場合にどう
そっかー。覚えときますです。「ひゅーそん」。 ふと調べたら、私の使っているレンタルサーバでも使えるそうだ。Zopeインストールできるんだから、あたりまえか。 ありがとねー。 こんなん見つけた サンボマスタージェネレータ http://return0.dyndns.org/t/smg/
ActiveState Code (http://code.activestate.com/recipes/355045/) Use eval() to drive spreadsheet style logic. The sleeper feature of Py2.4 is the ability to use any object with a mapping interface as the locals argument to eval(). class SpreadSheet: _cells = {} tools = {} def __setitem__(self, key, formula): self._cells[key] = formula def getformula(self, key): return self._cells[key] def __getitem_
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く