Personal tools
You are here: Home メンバー 菊地時夫 講演 TOSA 16 2007-11-03
Document Actions

Pythonで作るWindows用ネットワークアプリケーション

by 菊地時夫 last modified 2007-11-05 11:18

きっかけ

まずは警告

  • 警告
  • If-Modified-Since を使え
  • 問題のソフトの作者らしい人に連絡 ... もう開発環境が無い。
  • じゃ、いっちょ作ってみるか

代替ソフト

  • 機能最小限
  • 取ってきて、表示
  • 「取ってくる」がオリジナル
  • 「表示」は Windows の機能を利用(ビューワ又は壁紙)
  • 流れ図

WxLatest

  • WX (Weather) の 00Latest.jpg を取ってくるソフト
  • 現在 WxLatest/0.7 をリリース
  • 提供するプログラムの形式
    • Python は入れておいてもらって、ソースを提供
    • Windows らしく実行ファイルを提供

Py2Exe

  • Python to Executable
  • Tutorial
  • > setup.py py2exe ... 実行ファイルを作成
  • > cd dist
  • > hello ... 実行可能

WxLatest の setup.py

  • from distutils.core import setup
    import py2exe
     
    options = {'py2exe': {'includes': [
                'Image', 'JpegImagePlugin','BmpImagePlugin']}}
    setup(name='WxLatest',
          version='0.0',
          author='Tokio Kikuchi',
          author_email='tkikuchi@is.kochi-u.ac.jp',
          url='http://weather.is.kochi-u.ac.jp/',
          windows=[{'script':'wxlatest.py',
                    'icon_resources':[(1,'wxhome.ico')]}],
          options=options
          )
    

リリースでやること

  • DOS窓で
    • python setup.py py2exe
  • Cygwin で
    • mv dist WxLatest-0.0
    • cp wxhome.ico WxLatest-0.0
    • zip -r WxLatest-0.0.zip WxLatest-0.0

その他

  • Version Control
  • bzr
  • bzr commit / bzr update / bzr diff / etc. etc.
  • Icon

できたのが


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: