2013-11-09から1日間の記事一覧

PNG画像をicnsに変換するツール

http://76log.blogspot.jp/2009/08/pngicns-for-mac.htmlimg2icnsを使う。

py2appでアイコン画像を変更する

http://stackoverflow.com/questions/5608080/how-to-specify-py2app-icon

wxPythonでsizerのネスト

import wx class MyFrame(wx.Frame): def __init__(self,parent,id,title): wx.Frame.__init__(self,parent,id,title,wx.DefaultPosition,wx.DefaultSize) panel = wx.Panel(self,-1) vbox = wx.BoxSizer(wx.VERTICAL) hbox1 = wx.BoxSizer(wx.HORIZONTAL) h…

wxPythonで複数のPanelを使う

http://stackoverflow.com/questions/8771150/wxpython-multiple-panels import wx class RandomPanel(wx.Panel): def __init__(self, parent, color): wx.Panel.__init__(self, parent) self.SetBackgroundColour(color) class MainPanel(wx.Panel): def __…

wxPythonのテンプレート

#!/usr/bin/env python #-*- coding:utf-8 -*- import wx class MyFrame(wx.Frame): def __init__(self,parent,id,title): wx.Frame.__init__(self,parent,id,title,wx.DefaultPosition,wx.DefaultSize) class MyApp(wx.App): def OnInit(self): frame = MyF…

py2appでMacのアプリケーションバンドルを作る

超簡単だった。 # py2applet --make-setup main.py # python setup.py py2app -Adistディレクトリの中にmain.appが生成される。

wxPythonの使い方

だんだんわかってきた。 #!/usr/bin/env python #-*- coding:utf-8 -*- import wx import os import commands class MyFrame(wx.Frame): def __init__(self,parent,id,title): wx.Frame.__init__(self,parent,id,title,wx.DefaultPosition,wx.DefaultSize) l…

Pythonでターミナルの出力を取得する

http://stackoverflow.com/questions/3503879/assign-output-of-os-system-to-a-variable-and-prevent-it-from-being-displayed-on import commands status, output = commands.getstatusoutput("cat /etc/services") 例 >>> import commands >>> status, ou…

wxPythonでボタンを使う

#!/usr/bin/env python #-*- coding:utf-8 -*- import wx class MyFrame(wx.Frame): def __init__(self,parent,id,title): wx.Frame.__init__(self,parent,id,title,wx.DefaultPosition,wx.DefaultSize) lyrics = ''' push the button1 please ''' self.pane…

Emacsで選択部分(リージョン)をハイライトする

http://stackoverflow.com/questions/2747542/emacs-23-selection-not-highlighted?answertab=votes#tab-top~/.emacsに以下を追加。 (transient-mark-mode t)