{"id":445,"date":"2015-02-08T10:19:39","date_gmt":"2015-02-08T01:19:39","guid":{"rendered":"http:\/\/www.typea.info\/blog\/index.php\/2015\/02\/08\/pyscripter\/"},"modified":"2015-02-08T10:19:39","modified_gmt":"2015-02-08T01:19:39","slug":"pyscripter","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2015\/02\/08\/pyscripter\/","title":{"rendered":"PyScripter \u3067\u30d1\u30b9\u306b\u65e5\u672c\u8a9e\u304c\u5165\u3063\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7de8\u96c6\u3059\u308b\u3068\u30a8\u30e9\u30fc\u3068\u306a\u308b\u5bfe\u7b56"},"content":{"rendered":"<p>Windows\u3067Python\u3092\u66f8\u304f\u306e\u306b\u3001pyScripter\u306f\u975e\u5e38\u306b\u4fbf\u5229\u3002<\/p>\n<p>PyQt\u3067\u30c4\u30fc\u30eb\u3092\u4f5c\u308a\u5171\u6709\u3059\u308b\u5834\u5408\u306a\u3069\u308f\u304b\u308a\u3084\u3059\u3055\u306e\u305f\u3081\u306b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\u3084\u30b9\u30af\u30ea\u30d7\u30c8\u540d\u306b\u65e5\u672c\u8a9e\u3092\u4f7f\u3046\u30b1\u30fc\u30b9\u304c\u3042\u308b\u3002<\/p>\n<p><strong>\u30b9\u30af\u30ea\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u9014\u4e2d\u306b\u65e5\u672c\u8a9e\u304c\u5165\u308b\u3068\u30a8\u30e9\u30fc\u3068\u306a\u308b<\/strong><\/p>\n<blockquote>\n<p><font color=\"#ff0000\">UnicodeEncodeError: &#8216;ascii&#8217; codec can&#8217;t encode characters in position 8-10: ordinal not in range(128)<\/font><\/p>\n<\/blockquote>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/PyScripter_89AC\/pyscripter_encode_err01.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"pyscripter_encode_err01\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"pyscripter_encode_err01\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/PyScripter_89AC\/pyscripter_encode_err01_thumb.jpg\" width=\"445\" height=\"304\"><\/a><\/p>\n<p><strong>%PYTHON_HOME%\\Lib\\site.py \u3092\u7de8\u96c6<\/strong><\/p>\n<p>Enable to support locale aware default string encodings. \u306e\u6761\u4ef6\u3092 0 -&gt; 1 \u306b<\/p>\n<pre class=\"prettyprint linenums\">def setencoding():\r\n    \"\"\"Set the string encoding used by the Unicode implementation.  The\r\n    default is 'ascii', but if you're willing to experiment, you can\r\n    change this.\"\"\"\r\n    encoding = \"ascii\" # Default value set by _PyUnicode_Init()\r\n    ### \u2193\u2193\u2193 \u3053\u3053\u3092\u30010 -&gt; 1 \u306b\u5909\u66f4\r\n    if 1:\r\n        # Enable to support locale aware default string encodings.\r\n        import locale\r\n        loc = locale.getdefaultlocale()\r\n        if loc[1]:\r\n            encoding = loc[1]\r\n    if 0:\r\n        # Enable to switch off string to Unicode coercion and implicit\r\n        # Unicode to string conversion.\r\n        encoding = \"undefined\"\r\n    if encoding != \"ascii\":\r\n        # On Non-Unicode builds this will raise an AttributeError...\r\n        sys.setdefaultencoding(encoding) # Needs Python Unicode build !<\/pre>\n<p>OK<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/PyScripter_89AC\/pyscripter_encode_err02.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"pyscripter_encode_err02\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"pyscripter_encode_err02\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/PyScripter_89AC\/pyscripter_encode_err02_thumb.jpg\" width=\"390\" height=\"348\"><\/a><\/p>\n<p><iframe style=\"height: 240px; width: 120px\" marginheight=\"0\" src=\"http:\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=FFFFFF&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=typea09-22&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=ss_til&amp;asins=4048686291\" frameborder=\"0\" marginwidth=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows\u3067Python\u3092\u66f8\u304f\u306e\u306b\u3001pyScripter\u306f\u975e\u5e38\u306b\u4fbf\u5229\u3002 PyQt\u3067\u30c4\u30fc\u30eb\u3092\u4f5c\u308a\u5171\u6709\u3059\u308b\u5834\u5408\u306a\u3069\u308f\u304b\u308a\u3084\u3059\u3055\u306e\u305f\u3081\u306b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\u3084\u30b9\u30af\u30ea\u30d7\u30c8\u540d\u306b\u65e5\u672c\u8a9e\u3092\u4f7f\u3046\u30b1\u30fc\u30b9\u304c\u3042\u308b\u3002 \u30b9\u30af\u30ea\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u9014\u4e2d\u306b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[76,20],"tags":[],"class_list":["post-445","post","type-post","status-publish","format-standard","hentry","category-pyqt","category-python"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=445"}],"version-history":[{"count":0,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/445\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}