{"id":208,"date":"2020-03-09T18:20:06","date_gmt":"2020-03-09T09:20:06","guid":{"rendered":"http:\/\/batmask.dothome.co.kr\/?p=208"},"modified":"2025-09-09T09:14:25","modified_gmt":"2025-09-09T00:14:25","slug":"pyside2-ui-py-%eb%b3%80%ed%99%98%ec%8b%9c-%ec%98%a4%eb%a5%98","status":"publish","type":"post","link":"http:\/\/batmask.net\/index.php\/2020\/03\/09\/208\/","title":{"rendered":"Pyside2 : *.ui -> *.py \ubcc0\ud658\uc2dc \uc624\ub958"},"content":{"rendered":"\n<p>\uacf5\uc2dd \ubb38\uc11c\ub97c \ubcf4\uace0 Pyside2-uic.exe .\\mainwindow.ui &gt; mainwindow.py \uc640 \uac19\uc774 \ubcc0\ud658\uc744 \ud588\ub354\ub2c8, \ud30c\uc77c \uc55e\uc5d0 null char\uac00 \ubd99\uc5b4\uc11c \ub098\uc628\ub2e4. PyCharm\uc73c\ub85c \uc2e4\ud589\ud558\uba74 \ub2e4\uc74c\uacfc \uac19\uc740 \uc5d0\ub7ec\uac00 \ub738.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>source code string cannot contain null bytes&#8230;<\/p>\n<\/blockquote>\n\n\n\n<p>\uac80\uc0c9\ud574\ubcf8 \uacb0\uacfc, py \ud30c\uc77c\uc774 FF FE\ub85c \uc2dc\uc791\ud558\uace0 \uc788\uc73c\uba70  \uc774\uac74 UTF\ud30c\uc77c \ud3ec\ub9f7\uc744 \ud45c\uc2dc\ud558\ub294 \ubc29\uc2dd\uc774\ub2e4. \uadfc\ub370 \uc778\uc2dd\uc744 \ubabb\ud558\ub294\uac70\ub124? \u314b <\/p>\n\n\n\n<p>UTF \ud30c\uc77c \ud3ec\ub9f7 BOM( Byte Order Mark) : <br><a href=\"http:\/\/blog.wystan.net\/2007\/08\/18\/bom-byte-order-mark-problem\">http:\/\/blog.wystan.net\/2007\/08\/18\/bom-byte-order-mark-problem<\/a><\/p>\n\n\n\n<p>\ud574\uacb0\ucc45\uc740 \ub9ac\ub514\ub809\uc158 \ud30c\uc774\ud504\uac19\uc740\uac70 \uc4f0\uc9c0\ub9d0\uace0 \uadf8\ub0e5 &#8216;-o&#8217; \ub85c \uc544\uc6c3\ud48b \uc635\uc158\uc744 \uc4f0\uba74 \uae54\ub054.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>>pyside2-uic.exe .\\mainwindow.ui -o mainwindow.py<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">&gt;<\/span><span style=\"color: #ADBAC7\">pyside2-uic.exe .<\/span><span style=\"color: #F47067\">\\m<\/span><span style=\"color: #ADBAC7\">ainwindow.ui -o mainwindow.py<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uacf5\uc2dd \ubb38\uc11c\ub97c \ubcf4\uace0 Pyside2-uic.exe .\\mainwindow.ui &gt; mainwindow.py \uc640 \uac19\uc774 \ubcc0\ud658\uc744 \ud588\ub354\ub2c8, \ud30c\uc77c \uc55e\uc5d0 null char\uac00 \ubd99\uc5b4\uc11c \ub098\uc628\ub2e4. PyCharm\uc73c\ub85c \uc2e4\ud589\ud558\uba74 \ub2e4\uc74c\uacfc \uac19\uc740 \uc5d0\ub7ec\uac00 \ub738. source code string cannot contain null bytes&#8230; \uac80\uc0c9\ud574\ubcf8 \uacb0\uacfc, py \ud30c\uc77c\uc774 FF FE\ub85c \uc2dc\uc791\ud558\uace0 \uc788\uc73c\uba70 \uc774\uac74 UTF\ud30c\uc77c \ud3ec\ub9f7\uc744 \ud45c\uc2dc\ud558\ub294 \ubc29\uc2dd\uc774\ub2e4. \uadfc\ub370 \uc778\uc2dd\uc744 \ubabb\ud558\ub294\uac70\ub124? \u314b UTF \ud30c\uc77c \ud3ec\ub9f7 BOM( Byte Order Mark) : [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[60,62,57,58,35,56,147,59,148,55],"class_list":["post-208","post","type-post","status-publish","format-standard","hentry","category-python","tag-bom","tag-null-bytes","tag-pyside2","tag-pyside2-uic","tag-python","tag-qt","tag-uic","tag-utf","tag-transform-kr","tag-python-kr"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts\/208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/comments?post=208"}],"version-history":[{"count":2,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts\/208\/revisions"}],"predecessor-version":[{"id":3418,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts\/208\/revisions\/3418"}],"wp:attachment":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/media?parent=208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/categories?post=208"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/tags?post=208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}