-\r
-Python 2.7.3\r
-Copyright 1990-2012, Python Software Foundation.\r
-http://www.python.org/\r
-\r
A. HISTORY OF THE SOFTWARE\r
==========================\r
\r
2.1 2.0+1.6.1 2001 PSF no\r
2.0.1 2.0+1.6.1 2001 PSF yes\r
2.1.1 2.1+2.0.1 2001 PSF yes\r
- 2.2 2.1.1 2001 PSF yes\r
2.1.2 2.1.1 2002 PSF yes\r
2.1.3 2.1.2 2002 PSF yes\r
- 2.2.1 2.2 2002 PSF yes\r
- 2.2.2 2.2.1 2002 PSF yes\r
- 2.2.3 2.2.2 2003 PSF yes\r
- 2.3 2.2.2 2002-2003 PSF yes\r
- 2.3.1 2.3 2002-2003 PSF yes\r
- 2.3.2 2.3.1 2002-2003 PSF yes\r
- 2.3.3 2.3.2 2002-2003 PSF yes\r
- 2.3.4 2.3.3 2004 PSF yes\r
- 2.3.5 2.3.4 2005 PSF yes\r
- 2.4 2.3 2004 PSF yes\r
- 2.4.1 2.4 2005 PSF yes\r
- 2.4.2 2.4.1 2005 PSF yes\r
- 2.4.3 2.4.2 2006 PSF yes\r
- 2.4.4 2.4.3 2006 PSF yes\r
- 2.5 2.4 2006 PSF yes\r
- 2.5.1 2.5 2007 PSF yes\r
- 2.5.2 2.5.1 2008 PSF yes\r
- 2.5.3 2.5.2 2008 PSF yes\r
- 2.6 2.5 2008 PSF yes\r
- 2.6.1 2.6 2008 PSF yes\r
- 2.6.2 2.6.1 2009 PSF yes\r
- 2.6.3 2.6.2 2009 PSF yes\r
- 2.6.4 2.6.3 2009 PSF yes\r
- 2.6.5 2.6.4 2010 PSF yes\r
- 2.7 2.6 2010 PSF yes\r
+ 2.2 and above 2.1.1 2001-now PSF yes\r
\r
Footnotes:\r
\r
distribute, and otherwise use Python alone or in any derivative version,\r
provided, however, that PSF's License Agreement and PSF's notice of copyright,\r
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,\r
-2011, 2012 Python Software Foundation; All Rights Reserved" are retained in Python\r
-alone or in any derivative version prepared by Licensee.\r
+2011, 2012, 2013, 2014, 2015 Python Software Foundation; All Rights Reserved"\r
+are retained in Python alone or in any derivative version prepared by Licensee.\r
\r
3. In the event Licensee prepares a derivative work that is based on\r
or incorporates Python or any part thereof, and wants to make\r
--------------------------------------------------------------------------\r
\r
This program, "bzip2", the associated library "libbzip2", and all\r
-documentation, are copyright (C) 1996-2007 Julian R Seward. All\r
+documentation, are copyright (C) 1996-2010 Julian R Seward. All\r
rights reserved.\r
\r
Redistribution and use in source and binary forms, with or without\r
1. Redistributions of source code must retain the above copyright\r
notice, this list of conditions and the following disclaimer.\r
\r
-2. The origin of this software must not be misrepresented; you must\r
- not claim that you wrote the original software. If you use this\r
- software in a product, an acknowledgment in the product\r
+2. The origin of this software must not be misrepresented; you must \r
+ not claim that you wrote the original software. If you use this \r
+ software in a product, an acknowledgment in the product \r
documentation would be appreciated but is not required.\r
\r
3. Altered source versions must be plainly marked as such, and must\r
not be misrepresented as being the original software.\r
\r
-4. The name of the author may not be used to endorse or promote\r
- products derived from this software without specific prior written\r
+4. The name of the author may not be used to endorse or promote \r
+ products derived from this software without specific prior written \r
permission.\r
\r
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\r
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
\r
Julian Seward, jseward@bzip.org\r
-bzip2/libbzip2 version 1.0.5 of 10 December 2007\r
+bzip2/libbzip2 version 1.0.6 of 6 September 2010\r
\r
--------------------------------------------------------------------------\r
\r
-This copy of Python includes a copy of Berkeley DB, which is licensed under the following terms:\r
-\r
-/*-\r
- * $Id: LICENSE,v 12.9 2008/02/07 17:12:17 mark Exp $\r
- */\r
-\r
-The following is the license that applies to this copy of the Berkeley DB\r
-software. For a license to use the Berkeley DB software under conditions\r
-other than those described here, or to purchase support for this software,\r
-please contact Oracle at berkeleydb-info_us@oracle.com.\r
-\r
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
-/*\r
- * Copyright (c) 1990,2008 Oracle. All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions\r
- * are met:\r
- * 1. Redistributions of source code must retain the above copyright\r
- * notice, this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright\r
- * notice, this list of conditions and the following disclaimer in the\r
- * documentation and/or other materials provided with the distribution.\r
- * 3. Redistributions in any form must be accompanied by information on\r
- * how to obtain complete source code for the DB software and any\r
- * accompanying software that uses the DB software. The source code\r
- * must either be included in the distribution or be available for no\r
- * more than the cost of distribution plus a nominal fee, and must be\r
- * freely redistributable under reasonable conditions. For an\r
- * executable file, complete source code means the source code for all\r
- * modules it contains. It does not include source code for modules or\r
- * files that typically accompany the major components of the operating\r
- * system on which the executable file runs.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ORACLE ``AS IS'' AND ANY EXPRESS OR\r
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
- * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR\r
- * NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL ORACLE BE LIABLE\r
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\r
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\r
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\r
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-/*\r
- * Copyright (c) 1990, 1993, 1994, 1995\r
- * The Regents of the University of California. All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions\r
- * are met:\r
- * 1. Redistributions of source code must retain the above copyright\r
- * notice, this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright\r
- * notice, this list of conditions and the following disclaimer in the\r
- * documentation and/or other materials provided with the distribution.\r
- * 3. Neither the name of the University nor the names of its contributors\r
- * may be used to endorse or promote products derived from this software\r
- * without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\r
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\r
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
- * SUCH DAMAGE.\r
- */\r
-/*\r
- * Copyright (c) 1995, 1996\r
- * The President and Fellows of Harvard University. All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions\r
- * are met:\r
- * 1. Redistributions of source code must retain the above copyright\r
- * notice, this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright\r
- * notice, this list of conditions and the following disclaimer in the\r
- * documentation and/or other materials provided with the distribution.\r
- * 3. Neither the name of the University nor the names of its contributors\r
- * may be used to endorse or promote products derived from this software\r
- * without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY HARVARD AND ITS CONTRIBUTORS ``AS IS'' AND\r
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL HARVARD OR ITS CONTRIBUTORS BE LIABLE\r
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
- * SUCH DAMAGE.\r
- */\r
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
-/***\r
- * ASM: a very small and fast Java bytecode manipulation framework\r
- * Copyright (c) 2000-2005 INRIA, France Telecom\r
- * All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions\r
- * are met:\r
- * 1. Redistributions of source code must retain the above copyright\r
- * notice, this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright\r
- * notice, this list of conditions and the following disclaimer in the\r
- * documentation and/or other materials provided with the distribution.\r
- * 3. Neither the name of the copyright holders nor the names of its\r
- * contributors may be used to endorse or promote products derived from\r
- * this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\r
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\r
- * THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
This copy of Python includes a copy of openssl, which is licensed under the following terms:\r
\r
\r
---------------\r
\r
/* ====================================================================\r
- * Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved.\r
+ * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.\r
*\r
* Redistribution and use in source and binary forms, with or without\r
* modification, are permitted provided that the following conditions\r
* are met:\r
*\r
* 1. Redistributions of source code must retain the above copyright\r
- * notice, this list of conditions and the following disclaimer.\r
+ * notice, this list of conditions and the following disclaimer. \r
*\r
* 2. Redistributions in binary form must reproduce the above copyright\r
* notice, this list of conditions and the following disclaimer in\r
* This package is an SSL implementation written\r
* by Eric Young (eay@cryptsoft.com).\r
* The implementation was written so as to conform with Netscapes SSL.\r
- *\r
+ * \r
* This library is free for commercial and non-commercial use as long as\r
* the following conditions are aheared to. The following conditions\r
* apply to all code found in this distribution, be it the RC4, RSA,\r
* lhash, DES, etc., code; not just the SSL code. The SSL documentation\r
* included with this distribution is covered by the same copyright terms\r
* except that the holder is Tim Hudson (tjh@cryptsoft.com).\r
- *\r
+ * \r
* Copyright remains Eric Young's, and as such any Copyright notices in\r
* the code are not to be removed.\r
* If this package is used in a product, Eric Young should be given attribution\r
* as the author of the parts of the library used.\r
* This can be in the form of a textual message at program startup or\r
* in documentation (online or textual) provided with the package.\r
- *\r
+ * \r
* Redistribution and use in source and binary forms, with or without\r
* modification, are permitted provided that the following conditions\r
* are met:\r
* Eric Young (eay@cryptsoft.com)"\r
* The word 'cryptographic' can be left out if the rouines from the library\r
* being used are not cryptographic related :-).\r
- * 4. If you include any Windows specific code (or a derivative thereof) from\r
+ * 4. If you include any Windows specific code (or a derivative thereof) from \r
* the apps directory (application code) you must include an acknowledgement:\r
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"\r
- *\r
+ * \r
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\r
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
* SUCH DAMAGE.\r
- *\r
+ * \r
* The licence and distribution terms for any publically available version or\r
* derivative of this code cannot be changed. i.e. this code cannot simply be\r
* copied and put under another distribution licence\r
\r
GOVERNMENT USE: If you are acquiring this software on behalf of the\r
U.S. government, the Government shall have only "Restricted Rights"\r
-in the software and related documentation as defined in the Federal\r
+in the software and related documentation as defined in the Federal \r
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you\r
are acquiring the software on behalf of the Department of Defense, the\r
software shall be classified as "Commercial Computer Software" and the\r
Government shall have only "Restricted Rights" as defined in Clause\r
-252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the\r
+252.227-7014 (b) (3) of DFARs. Notwithstanding the foregoing, the\r
authors grant the U.S. Government and others acting in its behalf\r
permission to use and distribute the software in accordance with the\r
-terms specified in this license.\r
+terms specified in this license. \r
\r
This copy of Python includes a copy of Tk, which is licensed under the following terms:\r
\r
This software is copyrighted by the Regents of the University of\r
-California, Sun Microsystems, Inc., and other parties. The following\r
-terms apply to all files associated with the software unless explicitly\r
-disclaimed in individual files.\r
+California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState\r
+Corporation, Apple Inc. and other parties. The following terms apply to\r
+all files associated with the software unless explicitly disclaimed in\r
+individual files.\r
\r
The authors hereby grant permission to use, copy, modify, distribute,\r
and license this software and its documentation for any purpose, provided\r
are acquiring the software on behalf of the Department of Defense, the\r
software shall be classified as "Commercial Computer Software" and the\r
Government shall have only "Restricted Rights" as defined in Clause\r
-252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the\r
+252.227-7013 (b) (3) of DFARs. Notwithstanding the foregoing, the\r
authors grant the U.S. Government and others acting in its behalf\r
permission to use and distribute the software in accordance with the\r
terms specified in this license.\r
\r
GOVERNMENT USE: If you are acquiring this software on behalf of the\r
U.S. government, the Government shall have only "Restricted Rights"\r
-in the software and related documentation as defined in the Federal\r
+in the software and related documentation as defined in the Federal \r
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you\r
are acquiring the software on behalf of the Department of Defense, the\r
software shall be classified as "Commercial Computer Software" and the\r
252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the\r
authors grant the U.S. Government and others acting in its behalf\r
permission to use and distribute the software in accordance with the\r
-terms specified in this license.\r
+terms specified in this license. \r
\r
----------------------------------------------------------------------\r
\r
-#!/usr/bin/env python\r
+#!/usr/bin/env python\r
# -*- coding: utf-8 -*-\r
\r
#Pydun.py - mapping tool\r
\r
import sys\r
import os.path\r
-import codecs\r
import locale\r
-import urllib\r
+import urllib.request, urllib.parse, urllib.error\r
import xml.etree.ElementTree\r
import webbrowser\r
from PySide import QtCore, QtGui\r
\r
projecturl = "http://osdn.jp/projects/pydun/"\r
projectrssurl = "http://osdn.jp/projects/pydun/releases/rss"\r
-projectversion = "1.0.6.1"\r
+projectversion = "1.1.0"\r
\r
\r
class MainWindow(QtGui.QMainWindow):\r
\r
self.new()\r
if len(sys.argv) >= 2:\r
- self.open(unicode(sys.argv[1], locale.getpreferredencoding()))\r
+ self.open(sys.argv[1])\r
\r
self.mainframe = MainFrame(self)\r
self.setCentralWidget(self.mainframe)\r
\r
self.statusbar = QtGui.QStatusBar(self)\r
- self.statusbar.showMessage(u"")\r
+ self.statusbar.showMessage("")\r
self.setStatusBar(self.statusbar)\r
if "windowSize" in config:\r
self.resize(\r
def setmenu(self):\r
global config\r
#File menu\r
- filemenu = self.menuBar().addMenu(u"ファイル(&F)")\r
+ filemenu = self.menuBar().addMenu("ファイル(&F)")\r
\r
- newact = QtGui.QAction(u"新規(&N)", self)\r
+ newact = QtGui.QAction("新規(&N)", self)\r
newact.triggered.connect(self.new_triggered)\r
newact.setShortcut(QtGui.QKeySequence.New)\r
filemenu.addAction(newact)\r
\r
- openact = QtGui.QAction(u"開く(&O)...", self)\r
+ openact = QtGui.QAction("開く(&O)...", self)\r
openact.triggered.connect(self.open_triggered)\r
openact.setShortcut(QtGui.QKeySequence.Open)\r
filemenu.addAction(openact)\r
\r
- saveact = QtGui.QAction(u"上書き保存(&S)", self)\r
+ saveact = QtGui.QAction("上書き保存(&S)", self)\r
saveact.triggered.connect(self.save_triggered)\r
saveact.setShortcut(QtGui.QKeySequence.Save)\r
filemenu.addAction(saveact)\r
\r
- saveasact = QtGui.QAction(u"名前をつけて保存(&A)...", self)\r
+ saveasact = QtGui.QAction("名前をつけて保存(&A)...", self)\r
saveasact.triggered.connect(self.saveas_triggered)\r
saveasact.setShortcut(QtGui.QKeySequence.SaveAs)\r
filemenu.addAction(saveasact)\r
\r
- exitact = QtGui.QAction(u"終了(&E)", self)\r
+ exitact = QtGui.QAction("終了(&E)", self)\r
exitact.triggered.connect(self.exit_triggered)\r
exitact.setShortcut(QtGui.QKeySequence.Quit)\r
filemenu.addAction(exitact)\r
\r
#Edit menu\r
- editmenu = self.menuBar().addMenu(u"編集(&E)")\r
- self.undoact = QtGui.QAction(u"元に戻す(&U)", self)\r
+ editmenu = self.menuBar().addMenu("編集(&E)")\r
+ self.undoact = QtGui.QAction("元に戻す(&U)", self)\r
self.undoact.triggered.connect(self.undo_triggered)\r
self.undoact.setShortcut(QtGui.QKeySequence.Undo)\r
editmenu.addAction(self.undoact)\r
- self.redoact = QtGui.QAction(u"やり直し(&R)", self)\r
+ self.redoact = QtGui.QAction("やり直し(&R)", self)\r
self.redoact.triggered.connect(self.redo_triggered)\r
self.redoact.setShortcut(QtGui.QKeySequence.Redo)\r
editmenu.addAction(self.redoact)\r
editmenu.addSeparator()\r
- setmapsizeact = QtGui.QAction(u"マップのサイズ(&S)", self)\r
+ setmapsizeact = QtGui.QAction("マップのサイズ(&S)", self)\r
setmapsizeact.triggered.connect(self.setmapsize_triggered)\r
editmenu.addAction(setmapsizeact)\r
- setorigineact = QtGui.QAction(u"座標設定(&O)", self)\r
+ setorigineact = QtGui.QAction("座標設定(&O)", self)\r
setorigineact.triggered.connect(self.setorigine_triggered)\r
editmenu.addAction(setorigineact)\r
- wallmenustringact = QtGui.QAction(u"壁メニューに文字を表示する(&W)", self)\r
+ wallmenustringact = QtGui.QAction("壁メニューに文字を表示する(&W)", self)\r
wallmenustringact.setCheckable(True)\r
wallmenustringact.setChecked(config.get("showWallMenuString", False))\r
wallmenustringact.triggered.connect(self.togglewallmenustring_triggered)\r
editmenu.addAction(wallmenustringact)\r
\r
#Help menu\r
- helpmenu = self.menuBar().addMenu(u"ヘルプ(&H)")\r
- tutorialact = QtGui.QAction(u"ヘルプの表示(&H)", self)\r
+ helpmenu = self.menuBar().addMenu("ヘルプ(&H)")\r
+ tutorialact = QtGui.QAction("ヘルプの表示(&H)", self)\r
tutorialact.triggered.connect(self.tutorial_triggered)\r
tutorialact.setShortcut(QtGui.QKeySequence.HelpContents)\r
helpmenu.addAction(tutorialact)\r
- projectact = QtGui.QAction(u"プロジェクトのWebサイト(&W)", self)\r
+ projectact = QtGui.QAction("プロジェクトのWebサイト(&W)", self)\r
projectact.triggered.connect(self.project_triggered)\r
helpmenu.addAction(projectact)\r
- aboutact = QtGui.QAction(u"Pydunについて(&A)...", self)\r
+ aboutact = QtGui.QAction("Pydunについて(&A)...", self)\r
aboutact.triggered.connect(self.about_triggered)\r
helpmenu.addAction(aboutact)\r
\r
\r
def getfilename(self, filename):\r
if filename == None:\r
- s = u"無題"\r
+ s = "無題"\r
else:\r
s = os.path.splitext(os.path.basename(filename))[0]\r
return s\r
pass\r
filename = QtGui.QFileDialog.getOpenFileName(\r
dir=d,\r
- filter=u"*.pydun;;*.*", selectedFilter=u"*.pydun")\r
- if filename[0] != u"":\r
+ filter="*.pydun;;*.*", selectedFilter="*.pydun")\r
+ if filename[0] != "":\r
self.open(filename[0])\r
\r
def open(self, filename):\r
pass\r
filename = QtGui.QFileDialog.getSaveFileName(\r
dir=d,\r
- filter=u"*.pydun;;*.*", selectedFilter=u"*.pydun")\r
- if filename[0] != u"":\r
+ filter="*.pydun;;*.*", selectedFilter="*.pydun")\r
+ if filename[0] != "":\r
self.save(filename[0])\r
return True\r
else:\r
\r
@QtCore.Slot()\r
def setorigine_triggered(self):\r
- title = u"座標設定"\r
+ title = "座標設定"\r
if self.mainframe.mapframe.setoriginemode:\r
QtGui.QMessageBox.information(\r
- self, title, u"座標設定を中止します。", QtGui.QMessageBox.Ok)\r
+ self, title, "座標設定を中止します。", QtGui.QMessageBox.Ok)\r
self.mainframe.mapframe.setoriginemode = False\r
else:\r
if QtGui.QMessageBox.Ok == QtGui.QMessageBox.information(\r
- self, title, u"基準にする地点をクリックしてください。",\r
+ self, title, "基準にする地点をクリックしてください。",\r
(QtGui.QMessageBox.Ok| QtGui.QMessageBox.Cancel)):\r
self.mainframe.mapframe.setoriginemode = True\r
\r
global config\r
config["showWallMenuString"] = not config.get("showWallMenuString", False)\r
QtGui.QMessageBox.information(\r
- self, u"壁メニューに文字を表示する", u"表示の切替は再起動後に有効になります。",\r
+ self, "壁メニューに文字を表示する", "表示の切替は再起動後に有効になります。",\r
(QtGui.QMessageBox.Ok))\r
\r
@QtCore.Slot()\r
@QtCore.Slot()\r
def about_triggered(self):\r
QtGui.QMessageBox.about(self, "Pydun",\r
- u"<h1>Pydun.py "+ projectversion + "</h1>"\r
- u"<p>Copyright (c) 2013 WATAHIKI Hiroyuki</p>"\r
- u"<p>url: <a href='" + projecturl + "'>" + projecturl + "</a></p>"\r
- u"<p>e-mail: hrwatahiki at gmail.com</p>"\r
- u"<p>twitter: <a href='https://twitter.com/hrwatahiki'>@hrwatahiki</a></p>"\r
- u"<p>blog: <a href='http://hrwatahiki.blogspot.jp/'>作業記録</a></p>"\r
- u"<p>このソフトウェアはMITライセンスです。</p>"\r
- u"<p>このソフトウェアは以下のソフトウェアを使用しています。: "\r
- u"Python, PySide, PyYAML "\r
- u"これらの作成者に深く感謝いたします。</p>"\r
- u"<p>詳細はLICENCE.txtを参照してください。</p>")\r
+ "<h1>Pydun.py "+ projectversion + "</h1>"\r
+ "<p>Copyright (c) 2013 WATAHIKI Hiroyuki</p>"\r
+ "<p>url: <a href='" + projecturl + "'>" + projecturl + "</a></p>"\r
+ "<p>e-mail: hrwatahiki at gmail.com</p>"\r
+ "<p>twitter: <a href='https://twitter.com/hrwatahiki'>@hrwatahiki</a></p>"\r
+ "<p>blog: <a href='http://hrwatahiki.blogspot.jp/'>作業記録</a></p>"\r
+ "<p>このソフトウェアはMITライセンスです。</p>"\r
+ "<p>このソフトウェアは以下のソフトウェアを使用しています。: "\r
+ "Python, PySide, PyYAML "\r
+ "これらの作成者に深く感謝いたします。</p>"\r
+ "<p>詳細はLICENCE.txtを参照してください。</p>")\r
\r
\r
class MainFrame(QtGui.QFrame):\r
\r
self.detail = QtGui.QLabel(self)\r
self.detail.setAlignment(QtCore.Qt.AlignTop | QtCore.Qt.AlignLeft)\r
- self.detail.setText(u"")\r
+ self.detail.setText("")\r
self.detail.setMaximumHeight(100)\r
self.detail.setMinimumHeight(100)\r
\r
self.boxdrawbutton = QtGui.QRadioButton(self)\r
- self.boxdrawbutton.setText(u"ボックス形式で壁を描画(&B)")\r
+ self.boxdrawbutton.setText("ボックス形式で壁を描画(&B)")\r
self.boxdrawbutton.setChecked(True)\r
self.boxdrawbutton.setSizePolicy(\r
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)\r
\r
self.growdrawbutton = QtGui.QRadioButton(self)\r
- self.growdrawbutton.setText(u"足跡形式で壁を描画(&G)")\r
+ self.growdrawbutton.setText("足跡形式で壁を描画(&G)")\r
self.growdrawbutton.setChecked(False)\r
self.growdrawbutton.setSizePolicy(\r
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)\r
\r
self.backcolorbutton = QtGui.QRadioButton(self)\r
- self.backcolorbutton.setText(u"背景色(&C)")\r
+ self.backcolorbutton.setText("背景色(&C)")\r
self.backcolorbutton.setChecked(False)\r
self.backcolorbutton.setSizePolicy(\r
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)\r
\r
self.setbackcolorbutton = QtGui.QPushButton(self)\r
- self.setbackcolorbutton.setText(u"背景色を設定(&S)...")\r
+ self.setbackcolorbutton.setText("背景色を設定(&S)...")\r
self.setbackcolorbutton.setSizePolicy(\r
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)\r
\r
if latestversion != projectversion:\r
self.update = QtGui.QLabel(self)\r
self.update.setAlignment(QtCore.Qt.AlignTop | QtCore.Qt.AlignLeft)\r
- self.update.setText(u"<a href='{url}'>最新のPydun({ver})がダウンロードできます。</a>".format(url=projecturl, ver=latestversion))\r
+ self.update.setText("<a href='{url}'>最新のPydun({ver})がダウンロードできます。</a>".format(url=projecturl, ver=latestversion))\r
self.update.setOpenExternalLinks(True)\r
\r
layout = QtGui.QGridLayout(self)\r
\r
@QtCore.Slot(int, int, int)\r
def mouse_moved(self, x=0, y=0, b=QtCore.Qt.MouseButton.NoButton):\r
- cood = u"({x}, {y})\n".format(x=_mapengine.viewx(x), y=_mapengine.viewy(y))\r
+ cood = "({x}, {y})\n".format(x=_mapengine.viewx(x), y=_mapengine.viewy(y))\r
self.detail.setText(cood + _mapengine.getdetail(x, y))\r
self.mapframe.repaint()\r
\r
\r
marklabel = QtGui.QLabel(self)\r
marklabel.setAlignment(QtCore.Qt.AlignVCenter | QtCore.Qt.AlignRight)\r
- marklabel.setText(u"マーク(&M)")\r
+ marklabel.setText("マーク(&M)")\r
marklabel.setSizePolicy(\r
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)\r
\r
self.marktext = QtGui.QLineEdit(self)\r
self.marktext.setMaxLength(1)\r
- self.marktext.setText(u"")\r
+ self.marktext.setText("")\r
self.marktext.setMinimumWidth(20)\r
self.marktext.setSizePolicy(\r
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)\r
marklabel.setBuddy(self.marktext)\r
\r
self.forecolorbutton = QtGui.QPushButton(self)\r
- self.forecolorbutton.setText(u"文字色(&C)...")\r
+ self.forecolorbutton.setText("文字色(&C)...")\r
self.forecolorbutton.clicked.connect(self.forecolorbutton_clicked)\r
\r
self.forecolorbox = ColorBox(self)\r
\r
detaillabel = QtGui.QLabel(self)\r
detaillabel.setAlignment(QtCore.Qt.AlignTop | QtCore.Qt.AlignRight)\r
- detaillabel.setText(u"詳細(&D)")\r
+ detaillabel.setText("詳細(&D)")\r
\r
self.detailtext = QtGui.QTextEdit(self)\r
- self.detailtext.setText(u"")\r
+ self.detailtext.setText("")\r
detaillabel.setBuddy(self.detailtext)\r
\r
self.buttonbox = QtGui.QDialogButtonBox(\r
QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Cancel)\r
self.buttonbox.accepted.connect(self.accept)\r
self.buttonbox.rejected.connect(self.reject)\r
- self.buttonbox.button(QtGui.QDialogButtonBox.Ok).setText(u"OK")\r
- self.buttonbox.button(QtGui.QDialogButtonBox.Cancel).setText(u"キャンセル")\r
+ self.buttonbox.button(QtGui.QDialogButtonBox.Ok).setText("OK")\r
+ self.buttonbox.button(QtGui.QDialogButtonBox.Cancel).setText("キャンセル")\r
\r
layout = QtGui.QGridLayout()\r
layout.addWidget(marklabel, 0, 0, 1, 1)\r
class SetOrigineDialog(QtGui.QDialog):\r
def __init__(self, parent=None):\r
super(SetOrigineDialog, self).__init__(parent)\r
- self.setWindowTitle(u"座標設定")\r
+ self.setWindowTitle("座標設定")\r
\r
promptlabel = QtGui.QLabel(self)\r
promptlabel.setAlignment(\r
QtCore.Qt.AlignVCenter | QtCore.Qt.AlignLeft)\r
- promptlabel.setText(u"この地点の座標を入力してください。")\r
+ promptlabel.setText("この地点の座標を入力してください。")\r
\r
self.currentlabel = QtGui.QLabel(self)\r
self.currentlabel.setAlignment(\r
QtCore.Qt.AlignVCenter | QtCore.Qt.AlignHCenter)\r
- self.currentlabel.setText(u"")\r
+ self.currentlabel.setText("")\r
\r
xlabel = QtGui.QLabel(self)\r
xlabel.setAlignment(\r
QtCore.Qt.AlignVCenter | QtCore.Qt.AlignRight)\r
- xlabel.setText(u"&X")\r
+ xlabel.setText("&X")\r
\r
self.xbox = QtGui.QSpinBox(self)\r
self.xbox.setRange(-999, +999)\r
\r
ylabel = QtGui.QLabel(self)\r
ylabel.setAlignment(QtCore.Qt.AlignVCenter | QtCore.Qt.AlignRight)\r
- ylabel.setText(u"&Y")\r
+ ylabel.setText("&Y")\r
\r
self.ybox = QtGui.QSpinBox(self)\r
self.ybox.setRange(-999, +999)\r
QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Cancel)\r
self.buttonbox.accepted.connect(self.accept)\r
self.buttonbox.rejected.connect(self.reject)\r
- self.buttonbox.button(QtGui.QDialogButtonBox.Ok).setText(u"OK")\r
- self.buttonbox.button(QtGui.QDialogButtonBox.Cancel).setText(u"キャンセル")\r
+ self.buttonbox.button(QtGui.QDialogButtonBox.Ok).setText("OK")\r
+ self.buttonbox.button(QtGui.QDialogButtonBox.Cancel).setText("キャンセル")\r
\r
layout = QtGui.QGridLayout()\r
layout.addWidget(promptlabel, 0, 0, 1, 4)\r
def setcurrent(self, x, y):\r
self.xbox.setValue(x)\r
self.ybox.setValue(y)\r
- self.currentlabel.setText(u"現在の座標 ({x}, {y})".format(x=x, y=y))\r
+ self.currentlabel.setText("現在の座標 ({x}, {y})".format(x=x, y=y))\r
\r
@property\r
def originex(self):\r
class SetSizeDialog(QtGui.QDialog):\r
def __init__(self, parent=None):\r
super(SetSizeDialog, self).__init__(parent)\r
- self.setWindowTitle(u"マップのサイズ")\r
+ self.setWindowTitle("マップのサイズ")\r
\r
self.topbutton = QtGui.QRadioButton(self)\r
- self.topbutton.setText(u"上(&T)")\r
+ self.topbutton.setText("上(&T)")\r
self.topbutton.clicked.connect(self.updatewidgets)\r
\r
self.topsize = QtGui.QSpinBox(self)\r
self.topsize.valueChanged.connect(self.updatewidgets)\r
\r
self.bottombutton = QtGui.QRadioButton(self)\r
- self.bottombutton.setText(u"下(&B)")\r
+ self.bottombutton.setText("下(&B)")\r
self.bottombutton.clicked.connect(self.updatewidgets)\r
\r
self.bottomsize = QtGui.QSpinBox(self)\r
self.bottomsize.valueChanged.connect(self.updatewidgets)\r
\r
self.leftbutton = QtGui.QRadioButton(self)\r
- self.leftbutton.setText(u"左(&L)")\r
+ self.leftbutton.setText("左(&L)")\r
self.leftbutton.clicked.connect(self.updatewidgets)\r
\r
self.leftsize = QtGui.QSpinBox(self)\r
self.leftsize.valueChanged.connect(self.updatewidgets)\r
\r
self.rightbutton = QtGui.QRadioButton(self)\r
- self.rightbutton.setText(u"右(&R)")\r
+ self.rightbutton.setText("右(&R)")\r
self.rightbutton.clicked.connect(self.updatewidgets)\r
\r
self.rightsize = QtGui.QSpinBox(self)\r
self.sizelabel = QtGui.QLabel(self)\r
self.sizelabel .setAlignment(\r
QtCore.Qt.AlignVCenter | QtCore.Qt.AlignLeft)\r
- self.sizelabel.setText(u"この地点の座標を入力してください。")\r
+ self.sizelabel.setText("この地点の座標を入力してください。")\r
\r
self.buttonbox = QtGui.QDialogButtonBox(\r
QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Cancel)\r
self.buttonbox.accepted.connect(self.accept)\r
self.buttonbox.rejected.connect(self.reject)\r
- self.buttonbox.button(QtGui.QDialogButtonBox.Ok).setText(u"OK")\r
- self.buttonbox.button(QtGui.QDialogButtonBox.Cancel).setText(u"キャンセル")\r
+ self.buttonbox.button(QtGui.QDialogButtonBox.Ok).setText("OK")\r
+ self.buttonbox.button(QtGui.QDialogButtonBox.Cancel).setText("キャンセル")\r
\r
verticalgroup = QtGui.QButtonGroup(self)\r
verticalgroup.addButton(self.topbutton)\r
self.rightsize.setEnabled(True)\r
\r
self.sizelabel.setText(\r
- u"変更前のサイズ: {w1} x {h1}\n変更後のサイズ: {w2} x {h2}".format(\r
+ "変更前のサイズ: {w1} x {h1}\n変更後のサイズ: {w2} x {h2}".format(\r
w1=self._width, h1=self._height,\r
w2=self._width+dw, h2=self._height+dh))\r
\r
class MapImages(object):\r
def __init__(self, show_wall_menu_string):\r
if show_wall_menu_string:\r
- vtext = [u"なし", u"壁", u"扉", u"扉(→)", u"扉(←)", u"一通(→)", u"一通(←)", u"隠", u"隠(→)", u"隠(←)",]\r
- htext = [u"なし", u"壁", u"扉", u"扉(↓)", u"扉(↑)", u"一通(↓)", u"一通(↑)", u"隠", u"隠(↓)", u"隠(↑)",]\r
+ vtext = ["なし", "壁", "扉", "扉(→)", "扉(←)", "一通(→)", "一通(←)", "隠", "隠(→)", "隠(←)",]\r
+ htext = ["なし", "壁", "扉", "扉(↓)", "扉(↑)", "一通(↓)", "一通(↑)", "隠", "隠(↓)", "隠(↑)",]\r
else:\r
- vtext = [u"", u"", u"", u"", u"", u"", u"", u"", u"", u"",]\r
- htext = [u"", u"", u"", u"", u"", u"", u"", u"", u"", u"",]\r
+ vtext = ["", "", "", "", "", "", "", "", "", "",]\r
+ htext = ["", "", "", "", "", "", "", "", "", "",]\r
self.wall_images = list()\r
self.wall_icons = list()\r
self.wall_texts = list()\r
for direction in ["v", "h"]:\r
filename = os.path.join(\r
basedir(),\r
- u"images",\r
- u"wall_{direction}_{index:02}.png".format(\r
+ "images",\r
+ "wall_{direction}_{index:02}.png".format(\r
direction=direction, index=index))\r
self.wall_images[index][direction] = QtGui.QImage()\r
self.wall_images[index][direction].load(filename)\r
def represent_unicode(dumper, data):\r
return dumper.represent_scalar("tag:yaml.org,2002:str", data)\r
def construct_unicode(loader, node):\r
- return unicode(loader.construct_scalar(node))\r
- yaml.add_representer(unicode, represent_unicode)\r
+ return str(loader.construct_scalar(node))\r
+ yaml.add_representer(str, represent_unicode)\r
yaml.add_constructor("tag:yaml.org,2002:str", construct_unicode)\r
\r
def getdata(self, x, y, direction):\r
\r
def getnote(self, x, y):\r
return self._note.get(\r
- self.coodtokey(x, y), {"mark":u"", "detail":u"", "forecolor":u"#000000", "backcolor":u""})\r
+ self.coodtokey(x, y), {"mark":"", "detail":"", "forecolor":"#000000", "backcolor":""})\r
\r
def coodtokey(self, x, y):\r
- return u"{x:+05d}_{y:+05d}".format(x=x, y=y)\r
+ return "{x:+05d}_{y:+05d}".format(x=int(x), y=int(y))\r
\r
def keytocood(self, key):\r
- return map(int, key.split("_"))\r
+ return list(map(int, key.split("_")))\r
\r
def setmark(self, x, y, mark):\r
note = self.getnote(x, y)\r
\r
def save(self, filename):\r
dt = self.savestring()\r
- with codecs.open(filename, "w") as f:\r
+ with open(filename, "w", encoding='utf-8') as f:\r
f.write(dt)\r
self.filename = filename\r
\r
\r
#noteは表示用に座標変換する。\r
n = dict()\r
- for nk, ni in self._note.items():\r
+ for nk, ni in list(self._note.items()):\r
if ni["mark"] != "" or ni["detail"] != "" or ni["backcolor"]:\r
x, y = self.keytocood(nk)\r
n[self.coodtokey(self.viewx(x), self.viewy(y))] = ni\r
data["note"] = n\r
return yaml.safe_dump(data, allow_unicode=True,\r
- default_flow_style=False, encoding='utf-8')\r
+ default_flow_style=False, encoding='utf-8').decode('utf-8')\r
\r
def getmapstring(self):\r
#出力用マップ作成\r
return m\r
\r
def load(self, filename):\r
- with codecs.open(filename, "r", encoding="utf-8") as f:\r
+ with open(filename, "r", encoding="utf-8") as f:\r
st = f.read()\r
self.loadfromstring(st)\r
self.filename = filename\r
\r
#noteは内部用に座標変換する。\r
n = dict()\r
- for nk, ni in data["note"].items():\r
+ for nk, ni in list(data["note"].items()):\r
if ni["mark"] != "" or ni["detail"] != "" or ni["backcolor"] != "":\r
x, y = self.keytocood(nk)\r
n[self.coodtokey(self.worldx(x), self.worldy(y))] = ni\r
class PydunAskSaveDialog(QtGui.QMessageBox):\r
def __init__(self, parent, filename):\r
super(PydunAskSaveDialog, self).__init__(parent)\r
- self.setText(u"{filename} への変更を保存しますか?".format(filename=filename))\r
+ self.setText("{filename} への変更を保存しますか?".format(filename=filename))\r
self.setStandardButtons(QtGui.QMessageBox.Save | QtGui.QMessageBox.Discard | QtGui.QMessageBox.Cancel)\r
self.setDefaultButton(QtGui.QMessageBox.Save)\r
- self.button(QtGui.QMessageBox.Save).setText(u"保存する(&S)")\r
- self.button(QtGui.QMessageBox.Discard).setText(u"保存しない(&N)")\r
- self.button(QtGui.QMessageBox.Cancel).setText(u"キャンセル")\r
+ self.button(QtGui.QMessageBox.Save).setText("保存する(&S)")\r
+ self.button(QtGui.QMessageBox.Discard).setText("保存しない(&N)")\r
+ self.button(QtGui.QMessageBox.Cancel).setText("キャンセル")\r
\r
\r
def getcolorstring(color):\r
int(colorstring[5:7], 16))\r
\r
def basedir():\r
- return os.path.dirname(os.path.abspath(unicode(sys.argv[0], locale.getpreferredencoding())))\r
+ return os.path.dirname(os.path.abspath(sys.argv[0]))\r
\r
def getlatestversion():\r
try:\r
- rss = urllib.urlopen(projectrssurl)\r
+ rss = urllib.request.urlopen(projectrssurl)\r
rssstring = rss.read()\r
rsstree = xml.etree.ElementTree.fromstring(rssstring)\r
item = rsstree.find("channel/item/title")\r
global configfilename\r
configfilename = os.path.join(\r
basedir(),\r
- u"Pydun.config")\r
+ "Pydun.config")\r
try:\r
with open(configfilename, "r") as f:\r
config = yaml.safe_load(f)\r