2017-03-05から1日間の記事一覧
unittest CMakeLists.txt catkin_python_setup() if(CATKIN_ENABLE_TESTING) find_package(rostest REQUIRED) add_rostest(test/mytest.test) endif() package.xml <test_depend>rostest</test_depend> <test_depend>python-nose</test_depend> ↑テストにnoseをつかう場合 mytest.test <launch> </launch>
unittest Robot and Animal roboani.py class Robot: def get_name(self): return "robot" def get_legs(self): return 2 class Animal: def get_name(self): return "animal" def get_legs(self): return 4 def calc_roboani_legs(robot,animal,heads,legs)…
BeautifulSoupを使ったスクレイピング from BeautifulSoup import BeautifulSoup import re doc = ['<html><head><title>Page title</title></head>', '<body><p id="firstpara" align="center">This is paragraph <b>one</b>.', '<p id="secondpara" align="blah">This is paragraph <b>two</b>.', '</html>'] soup = BeautifulSoup('…
設定読み込み順 一括コメントアウト 一括インデント 対話置換 位置画面上・下 init.el設定 pyflakesの設定 flymakeでファイルが開けない時 行数設定 対応する括弧を光らせる 自動補完 ロードパスの設定 python設定 lintの設定 el-getのインストール fly-chec…