\u524d\u56de\u306e\u8a18\u4e8b\u306f\u3053\u3061\u3089\u304b\u3089<\/a>
<\/p>\n\n\n\n
<\/p>\n\n\n\n
\uff11\u500b\u76ee\u306e\u5909\u66f4\u70b9<\/h3>\n\n\n\n
filename = tkFileDialog.askopenfilemame(filetypes = fType,initialdir = iDir)<\/p>\n\n\n\n
\u306e\u90e8\u5206\u3092<\/p>\n\n\n\n
filenames = tkFileDialog.askopenfilemames(filetypes = fType,initialdir = iDir) <\/p>\n\n\n\n
\u3068\u5909\u66f4\u3002\u3069\u3053\u304c\u5909\u308f\u3063\u305f\u304b\u3068\u3044\u3046\u3068\u3001 <\/p>\n\n\n\n
askopenfilemame\u3000\u21d2\u3000 askopenfilemames <\/p>\n\n\n\n
\u3068\u304a\u5c3b\u306bs\u304c\u3064\u3044\u3066\u8907\u6570\u5f62\u306b\u306a\u3063\u305f\u6240\u3002<\/p>\n\n\n\n
<\/p>\n\n\n\n
\uff12\u500b\u76ee\u306e\u5909\u66f4\u70b9<\/h3>\n\n\n\n
\u521d\u3081\u306e\u5909\u6570\u540d<\/p>\n\n\n\n
filename\u3000\u21d2\u3000filenames<\/p>\n\n\n\n
<\/p>\n\n\n\n
\uff13\u500b\u76ee\u306e\u5909\u66f4\u70b9<\/h3>\n\n\n\n
\u95a2\u6570\u304b\u3089\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u8fd4\u3059return\u306e\u3042\u3068\u3092<\/p>\n\n\n\n
\n\nfilename\u3000\u21d2\u3000filenames\n\n<\/p>\n\n\n\n
\u3068\u5909\u66f4\u3057\u305f\u305f\u3060\u3051\u3067\u3059\u3002<\/p>\n\n\n\n
<\/p>\n\n\n\n
\uff12\u500b\u76ee\u306e\u5909\u66f4\u90e8\u5206\u306f\u5909\u3048\u306a\u304f\u3066\u3082\u3044\u3044\u306e\u3067\u3059\u304c\u3001\u306e\u3061\u306e\u3061\u30b3\u30fc\u30c9\u3092\u898b\u3066\u8907\u6570\u9078\u629e\u3057\u3066\u3044\u308b\u306e\u304b\u5206\u304b\u308a\u3084\u3059\u304f\u3059\u308b\u305f\u3081\u306b\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n
\uff13\u500b\u76ee\u306e\u5909\u66f4\u70b9\u306f\u3001\uff12\u500b\u76ee\u306e\u5909\u66f4\u3067\u5909\u6570\u540d\u3092\u5909\u66f4\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u306e\u5909\u6570\u540d\u306e\u5909\u66f4\u3067\u3059\u3002
<\/p>\n\n\n\n
\u30b3\u30fc\u30c9<\/h2>\n\n\n\n
\u524d\u56de\u306e\u30b3\u30fc\u30c9\u3067\u8907\u6570\u30d5\u30a1\u30a4\u30eb\u306e\u9078\u629e\u3092\u3059\u308b\u3068\u3001DICOM\u753b\u50cf\u3092\u8aad\u307f\u8fbc\u3080\u969b\u306b\u3001\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u3066\u3057\u307e\u3044\u30a8\u30e9\u30fc\u304c\u8fd4\u3063\u3066\u304d\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u4eca\u56de\u306f\u9078\u629e\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u3068\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n
\u305d\u308c\u3067\u306f\u3001\u30b3\u30fc\u30c9\u3092\u4ee5\u4e0b\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n
<\/p>\n\n\n\n
\n# -*- coding: utf-8 -*-\n\nimport tkinter # tkinter\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\nfrom tkinter import filedialog as tkFileDialog\n\n# tkinter\u306efiledialog\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\n\ndef fileselect():\n root = tkinter.Tk() # tkinter\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\n root.withdraw() # \u3053\u306e\u4e00\u6587\u304c\u7121\u3044\u3068\u8b0e\u306e\u9ed2\u3044\u30a6\u30a4\u30f3\u30c9\u30a6\u304c\u51fa\u3066\u304f\u308b\u3089\u3057\u3044\n\n fTyp = [('', '*')] # \u30c0\u30a4\u30a2\u30ed\u30b0\u306b\u8868\u793a\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u7a2e\u985e\u3092\u6307\u5b9a\u3002\n # \u4eca\u56de\u306f\u6307\u5b9a\u306a\u3057\n # fTyp=[('\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb','*.txt')]\n # \u4e0a\u8a18\u306e\u69d8\u306b\u3059\u308c\u3070\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u307f\u306b\u7d5e\u308c\u308b\u3002\n # ()\u3092\u8db3\u3057\u3066\u3044\u304f\u3053\u3068\u3067\u8907\u6570\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3002\n\n iDir = 'C:\/Desktop' # \u30c0\u30a4\u30a2\u30ed\u30b0\u304c\u958b\u304f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6307\u5b9a\n # \u4eca\u56de\u306f\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\n\n ############################# \u2193 askopenfilenames\u3068s\u3092\u4ed8\u3051\u305f\u3060\u3051\u3002######\n\n filenames = tkFileDialog.askopenfilenames(filetypes=fTyp, initialdir=iDir)\n\n return filenames # \u9078\u629e\u30d5\u30a1\u30a4\u30eb\u306e\u7d76\u5bfe\u30d1\u30b9\u3092\u8fd4\u3057\u307e\u3059\u3002\n\n\nfname = fileselect() # fileselect\u306e\u6700\u5f8creturn\u3067\u8fd4\u3055\u308c\u305f\u3082\u306e\u3092fname\u306b\u683c\u7d0d\n\nprint(fname) #\u9078\u629e\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u304c\u8868\u793a\u3055\u308c\u308b\u3002\n\n<\/code><\/pre>\n\n\n\n\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3059\u308b\u969b\u306fShift\u30ad\u30fc\u3092\u62bc\u3057\u306a\u304c\u3089\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n
<\/p>\n\n\n\n
\u30d5\u30a1\u30a4\u30eb\u3092\u8907\u6570\u9078\u629e\u3068\u8a00\u3063\u3066\u3082\u3001\u5358\u4e00\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u3082\u4f7f\u3048\u308b\u306e\u3067\u6b63\u76f4\u3053\u306e\u30b3\u30fc\u30c9\u3055\u3048\u3042\u308c\u3070\u5341\u5206\u304b\u306a\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n
\u3053\u308c\u306f\u975e\u5e38\u306b\u4fbf\u5229\u306a\u30b3\u30fc\u30c9\u3068\u306a\u308a\u307e\u3059\u306e\u3067\u662f\u975e\u3068\u3082\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n
<\/p>\n\n\n\n
<\/p>\n\n\n\n
\u74b0\u5883<\/h2>\n\n\n\n- windows10<\/li>
- python3.6.1 <\/li>
- Anaconda custom(64-bit)<\/li>
- PyCharm2018.3.3(Communication Edition)<\/li><\/ul>\n\n\n\n
<\/p>\n\n\n\n
<\/p>\n","protected":false},"excerpt":{"rendered":"
\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u4f7f\u3063\u3066\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u8907\u6570\u9078\u629e\u3059\u308b \u524d\u56de\u306f […]<\/p>\n","protected":false},"author":1,"featured_media":363,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,23],"tags":[7,24],"class_list":["post-248","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-23","tag-python","tag-24"],"aioseo_notices":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/radiology-technologist.info\/wp-content\/uploads\/2019\/11\/python_logo.png?fit=614%2C612","_links":{"self":[{"href":"http:\/\/radiology-technologist.info\/wp-json\/wp\/v2\/posts\/248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/radiology-technologist.info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/radiology-technologist.info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/radiology-technologist.info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/radiology-technologist.info\/wp-json\/wp\/v2\/comments?post=248"}],"version-history":[{"count":20,"href":"http:\/\/radiology-technologist.info\/wp-json\/wp\/v2\/posts\/248\/revisions"}],"predecessor-version":[{"id":1479,"href":"http:\/\/radiology-technologist.info\/wp-json\/wp\/v2\/posts\/248\/revisions\/1479"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/radiology-technologist.info\/wp-json\/wp\/v2\/media\/363"}],"wp:attachment":[{"href":"http:\/\/radiology-technologist.info\/wp-json\/wp\/v2\/media?parent=248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/radiology-technologist.info\/wp-json\/wp\/v2\/categories?post=248"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/radiology-technologist.info\/wp-json\/wp\/v2\/tags?post=248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}