rubyで指定したディレクトリ内のflvファイルからmp3抽出

require "shell" FLV_DIR_PATH = "FLVファイル保存ディレクトリ名" RESULT_DIR = "MP3ファイル保存ディレクトリ名" CONVERT_SH_FILE_NAME = "convert.sh" # mp3ファイル生成 def createMp3File(name) resultName = toMp3Name(name) sh = Shell.new() sh.syst…

GAEサンプル動かすまで

eclipse plugin update site http://dl.google.com/eclipse/plugin/3.4 eclipseにpydev pluginインストール済みGoogle App Engine SDK for Pythonをダウンロード http://code.google.com/intl/ja/appengine/downloads.html#Google_App_Engine_SDK_for_Python…

youtubeだ!

youtube!! #!/usr/bin/env python # -*- coding: utf-8 -*- import gdata.service import gdata.youtube import gdata.youtube.service client = gdata.youtube.service.YouTubeService() query = gdata.youtube.service.YouTubeVideoQuery() query.vq = "月…

twistedっていうのを発見!upnp機器検出してみる。

#!/usr/bin/env python # -*- coding: utf-8 -*- from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor # udp_listener class udp_listener(): # listen def listen(self, datagram, address): print "from:", add…

m-searchでupnp機器検出してみる

#!/usr/bin/env python # -*- coding: utf-8 -*- import socket import traceback # m_search class m_search: # M_SEARCH_REQUEST M_SEARCH_REQUEST = "M-SEARCH * HTTP/1.1\r\n" + \ "MX: 3\r\n" + \ "HOST: 239.255.255.250:1900\r\n" + \ "MAN: \"ssdp:d…

TkinterよりwxPythonのがいいという噂なのでwxPythonで作成

#!/usr/bin/env python # -*- coding: utf-8 -*- import wx import wx.lib.mixins.listctrl as listmix import amazon as az import sys # 検索結果表示リスト class BookList(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin): def __init__(self, parent, ID…

TkinterでGUI作成。

昨日のAmazonClient使って本を検索。 #!/usr/bin/env python # -*- coding: utf-8 -*- import Tkinter as Tk import tktable as ta import amazon as am """ AmazonBookSearchFrame""" class AmazonBookSearchFrame(Tk.Frame): def __init__(self, master = …

Beautiful Soupを使ってAmazon Web Service

#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib2 from BeautifulSoup import BeautifulStoneSoup class AmazonClient(): """ タイトルで検索 """ TITLE = "Title" """ 著者名で検索 """ AUTHOR = "Author" """ ISBNで検索 """ ISBN = "ISBN" …

cgiでhello worldを出力してみる。

#!/usr/local/bin/python # -*- coding: utf-8 -*- import cgi import cgitb; cgitb.enable() print "Content-Type: text/html" print print "hello world." cgitb.enable()でエラー詳細を表示してくれるらしい。 動かしてみる。 http://www13.atpages.jp/ma…

すごすぎるBeautiful Soup

pythonでxml,htmlの解析をする。 ・Beautiful Soup http://www.crummy.com/software/BeautifulSoup/ダウンロードした「BeautifulSoup.py」をソースが読める場所に置く。 site-packagesに置くのが一般的?使い方は公式サイトにあるドキュメント http://www.cr…