<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>pc98uvのブログ</title>
<link>https://ameblo.jp/pc98uv/</link>
<atom:link href="https://rssblog.ameba.jp/pc98uv/rss20.xml" rel="self" type="application/rss+xml" />
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
<description>ブログの説明を入力します。</description>
<language>ja</language>
<item>
<title>pythonでOS(?)を作る！ prt.3</title>
<description>
<![CDATA[ <p>&nbsp;</p><h2 class="limited038_heading01" data-entrydesign-alignment="left" data-entrydesign-count-input="part" data-entrydesign-part="limited038_heading01" data-entrydesign-tag="h2" data-entrydesign-type="heading" data-entrydesign-ver="1.54.1" style="margin:4px 0;font-weight:bold;color:#333;font-size:20px;line-height:1.6;min-height:32px;overflow-wrap:break-word;text-align:left;border-left:8px solid #674D05"><span style="display:block"><span data-entrydesign-content="" style="display:block;padding:4px 8px">Py OS?</span><span class="amp-nodisplay" contenteditable="false" role="presentation"><span style="display:block;width:100%;height:6px;border-top:1px solid #674D05;border-right:1px solid #674D05;border-bottom:1px solid #674D05;box-sizing:border-box">&nbsp;</span></span></span></h2><p>&nbsp;</p><p>さあきょうもやってまいりました！「pythonでOS(？)を作る！」時間です！</p><p>とりあえず開発の前に使える今回<mark style="background-color:#ffcc00;color:inherit;">使いそうなライブラリ(標準)</mark>と<mark style="background-color:#ffcc00;color:inherit;">内容</mark>を聞いてきました！</p><p>&nbsp;</p><blockquote><table><thead><tr><th>ライブラリ</th><th>主な役割</th><th>できること</th><th>PyOSでの使い道</th><th align="center">&nbsp;</th></tr></thead><tbody><tr><td><strong>tkinter</strong></td><td>GUI作成</td><td>ウィンドウ・ボタン・ラベル・メニュー・キャンバス</td><td>デスクトップ、アプリ、ウィンドウ、アイコン</td><td align="center">&nbsp;</td></tr><tr><td><strong>os</strong></td><td>OS操作</td><td>ファイル・フォルダ操作、環境変数、現在のディレクトリ取得</td><td>ファイル管理、アプリ起動補助</td><td align="center">&nbsp;</td></tr><tr><td><strong>pathlib</strong></td><td>パス操作</td><td>ファイルやフォルダのパスを簡単に扱う</td><td>デスクトップやドキュメントの管理</td><td align="center">&nbsp;</td></tr><tr><td><strong>shutil</strong></td><td>ファイル管理</td><td>コピー、移動、削除、フォルダコピー</td><td>コピー&amp;ペースト、ごみ箱</td><td align="center">&nbsp;</td></tr><tr><td><strong>subprocess</strong></td><td>外部プログラム実行</td><td>他のプログラムやコマンドを起動</td><td>Python実行、CMD風環境、外部アプリ起動</td><td align="center">&nbsp;</td></tr><tr><td><strong>threading</strong></td><td>並列処理</td><td>複数の処理を同時に実行</td><td>時計を動かしながらメモ帳も操作</td><td align="center">&nbsp;</td></tr><tr><td><strong>datetime</strong></td><td>日時管理</td><td>現在時刻・日付・時間計算</td><td>時計、カレンダー、ファイル日時</td><td align="center">&nbsp;</td></tr><tr><td><strong>json</strong></td><td>データ保存</td><td>設定やデータをJSON形式で保存・読み込み</td><td>設定、Todo、壁紙、ユーザー情報</td><td align="center">&nbsp;</td></tr><tr><td><strong>sqlite3</strong></td><td>データベース</td><td>SQLiteデータベースを扱う</td><td>メモ、Todo、アプリ情報の保存</td><td align="center">&nbsp;</td></tr><tr><td><strong>logging</strong></td><td>ログ出力</td><td>動作記録・エラーログ保存</td><td>システムログ、クラッシュログ</td><td align="center">&nbsp;</td></tr><tr><td><strong>sys</strong></td><td>Python本体操作</td><td>Python情報取得、プログラム終了、引数取得</td><td>システム情報表示、終了処理</td><td align="center">&nbsp;</td></tr><tr><td><strong>platform</strong></td><td>PC情報取得</td><td>OS名、CPU、Python環境など取得</td><td>「システム情報」アプリ</td><td align="center"><br>&nbsp;</td></tr></tbody></table></blockquote><p>&nbsp;</p><div>だそうです！ということで実際に開発に移っていきましょう！</div><p></p><div>まずは開発に必要な<mark style="background-color:#ffcc00;color:inherit;">デスクトップ画面を用意してボタンを押すと何かが起こるギミックを作り,動作確認</mark>をして今回は終わろうと思います！</div><div>&nbsp;</div><div>まずGUIをつくる必要があるのでtkinterを使って640×480サイズでデスクトップを作ってみます！</div><div>&nbsp;</div><div>まず</div><div>&nbsp;</div><div><u style="text-decoration:underline;">import tkinter as tk<br><br>def Label():<br>&nbsp; &nbsp; lbl.configure(text="hello!")</u></div><div>&nbsp;</div><div>でtkinterをインポートして、Labelという関数を作って実行するとラベル(文字を表示させる場所)の文字をhello!にするようにプログラムを書いて～</div><div>&nbsp;</div><div><u style="text-decoration:underline;">root=tk.Tk()<br>root.geometry("640x480")</u></div><div>&nbsp;</div><div>で画面作って大きさを決めて～</div><div>&nbsp;</div><div><u style="text-decoration:underline;">lbl = tk.Label(text="こんにちは!")<br>btn = tk.Button(text="PUSH",command = Label)</u><br>&nbsp;</div><div>でラベルにこんにちはを書き込んで、ボタンを置いて,オスとさっき作った関数が実行されるようにして～</div><div>&nbsp;</div><div>lbl.pack()<br>btn.pack()<br>tk.mainloop()</div><div>&nbsp;</div><div>でラベル,ボタンを置いて画面を表示するようにプログラムを書くと。</div><div>これで実行すると,,,</div><div>&nbsp;</div><p style="text-align: left;"><a href="https://stat.ameba.jp/user_images/20260721/23/pc98uv/29/62/p/o0792064615804831910.png"><img alt="" contenteditable="inherit" height="179" src="https://stat.ameba.jp/user_images/20260721/23/pc98uv/29/62/p/o0792064615804831910.png" width="220"><img alt="右矢印" draggable="false" height="24" src="https://stat100.ameba.jp/blog/ucs/img/char/char3/122.png" width="24"></a><a href="https://stat.ameba.jp/user_images/20260721/23/pc98uv/9c/cd/p/o0802063115804831670.png"><img alt="" contenteditable="inherit" height="173" src="https://stat.ameba.jp/user_images/20260721/23/pc98uv/9c/cd/p/o0802063115804831670.png" width="220"></a></p><p>&nbsp;</p><div>矢印<img alt="右矢印" draggable="false" height="24" src="https://stat100.ameba.jp/blog/ucs/img/char/char3/122.png" width="24">の位置が少しおかしいかもしれませんがとりあえず小さいボタンと文字を表示させることができました！</div><p></p><div>&nbsp;</div><div>次回は本格的に<mark style="background-color:#ffcc00;color:inherit;">電卓や時計作りに入っていく(多分)</mark>ので楽しみにしていてください！</div>
]]>
</description>
<link>https://ameblo.jp/pc98uv/entry-12973406731.html</link>
<pubDate>Tue, 21 Jul 2026 23:41:53 +0900</pubDate>
</item>
<item>
<title>pythonでOS(?)を作る！ prt.2</title>
<description>
<![CDATA[ <p>&nbsp;</p><h2 class="limited038_heading01" data-entrydesign-alignment="left" data-entrydesign-count-input="part" data-entrydesign-part="limited038_heading01" data-entrydesign-tag="h2" data-entrydesign-type="heading" data-entrydesign-ver="1.54.1" style="margin:4px 0;font-weight:bold;color:#333;font-size:20px;line-height:1.6;min-height:32px;overflow-wrap:break-word;text-align:left;border-left:8px solid #674D05"><span style="display:block"><span data-entrydesign-content="" style="display:block;padding:4px 8px">PyOS? prt.2</span><span class="amp-nodisplay" contenteditable="false" role="presentation"><span style="display:block;width:100%;height:6px;border-top:1px solid #674D05;border-right:1px solid #674D05;border-bottom:1px solid #674D05;box-sizing:border-box">&nbsp;</span></span></span><span style="display:block"><span class="amp-nodisplay" contenteditable="false" role="presentation"><span style="display:block;width:100%;height:6px;border-top:1px solid #674D05;border-right:1px solid #674D05;border-bottom:1px solid #674D05;box-sizing:border-box">&nbsp;</span></span></span></h2><p>&nbsp;</p><p>どうもこんにちは！kanameです！</p><p>さっきchatGPT(ちゃっぴー)にタイトルの略称考えてってお願いすると</p><p>&nbsp;</p><blockquote><p>&nbsp;</p><ul data-end="279" data-start="68"><li data-end="279" data-start="247"><strong data-end="258" data-start="249">PyOS?</strong><ul data-end="279" data-start="261"><li data-end="279" data-start="261">「本当にOSなのか？」感を残せる</li></ul></li></ul><div>&nbsp;</div></blockquote><div>&nbsp;</div><div>という案をだしてくれました！</div><div>ということで次回からこの<mark style="background-color:#ffcc00;color:inherit;">pyOS?をタイトルに</mark>しようと思います！</div><div>&nbsp;</div><div>ちなみに今回は...</div><div>&nbsp;</div><div>&nbsp;</div><div><span style="color:#ffffff;"><mark style="background-color:#000000;color:inherit;">頑張って基礎となる部分を作る！</mark></span></div><div>&nbsp;</div><div>&nbsp;</div><div>と言いたいところですが...</div><div>&nbsp;</div><div><b style="font-weight:bold;"><mark style="background-color:#ffcc00;color:inherit;">とりあえず入れる機能を考える！</mark></b></div><div>&nbsp;</div><div>ところから始めていこうと思います！</div><div>&nbsp;</div><div>実際OSを作るといっていますが...</div><div>&nbsp;</div><div><div class="natural06_block" data-entrydesign-count-input="part" data-entrydesign-part="natural06_block" data-entrydesign-tag="div" data-entrydesign-type="block" data-entrydesign-ver="1.54.1" style="position:relative;display:block;max-width:100%;margin:18px 0 32px 0;box-sizing:border-box;padding:1px 0 1px 12px;color:#333"><span class="amp-nodisplay" contenteditable="false" role="presentation" style="display:block;position:absolute;top:0;left:0;height:100%;width:4px;border-radius:4px;background:#E6DABA">&nbsp;</span><div data-entrydesign-content="" style="background-color:transparent;font-size:14px;line-height:1.6;min-height:22px;word-break:break-word"><p><b style="font-weight:bold;">Windows11のようなOS</b>を作れると思いますか？</p></div></div><p>はい。<b style="font-weight:bold;">作れません</b><img alt="あせる" draggable="false" height="16" src="https://stat100.ameba.jp/blog/ucs/img/char/char2/029.gif" width="16"></p><p>&nbsp;</p><p>pythonだけでブラウザやゲームを動かすプログラム,OSを動かすプログラムを同時で動かしたり検索エンジンを作るのはほぼ無理ゲーです（笑）</p><p>&nbsp;</p><p>そこでわたくしkanameが目を付けたのは<mark style="background-color:#ffcc00;color:inherit;">Windows3.1</mark>や<mark style="background-color:#ffcc00;color:inherit;">MS-DOS</mark>です！</p><p>&nbsp;</p><blockquote><p>&nbsp;</p><p><a href="https://stat.ameba.jp/user_images/20260719/21/pc98uv/21/f9/p/o0810070715804108914.png"><img alt="" contenteditable="inherit" height="367" src="https://stat.ameba.jp/user_images/20260719/21/pc98uv/21/f9/p/o0810070715804108914.png" width="420"></a></p><p>参考：Windows 3.1（自分のPCの86Box上で動作）</p><p>&nbsp;</p></blockquote><p>&nbsp;</p><p>ということでこちらの画面を見てもらうとわかる通り初期のWindowsだと<mark style="background-color:#ffcc00;color:inherit;">あまりアプリは多くない</mark>ように見えます！</p><p>このぐらいのアプリの量ならpythonでも全然持つと思いますし何よりも<mark style="background-color:#ffcc00;color:inherit;">プログラミングが簡単です</mark><img alt="爆　　笑" draggable="false" height="24" src="https://stat100.ameba.jp/blog/ucs/img/char/char3/001.png" width="24">←重要</p><p>&nbsp;</p><p>というわけで10～15種類ぐらいのアプリを考えてみようと思います！</p><p>&nbsp;</p><div class="wa06_block" data-entrydesign-count-input="part" data-entrydesign-part="wa06_block" data-entrydesign-tag="div" data-entrydesign-type="block" data-entrydesign-ver="1.54.1" style="position:relative;width:343px;max-width:100%;margin:32px auto;color:#333;text-align:center"><span class="amp-nodisplay" contenteditable="false" role="presentation" style="position:absolute;box-sizing:border-box;top:-24px;display:block;width:100%;font-size:0;height:24px;border-bottom:24px solid #f7f7f7;border-left:24px solid transparent">&nbsp;</span><span class="amp-nodisplay" contenteditable="false" role="presentation" style="position:absolute;top:0;left:0;display:block;width:2px;height:46px;background-color:#CACACA;transform:rotate(45deg) translate(-17px, -32px)">&nbsp;</span><span class="amp-nodisplay" contenteditable="false" role="presentation" style="position:absolute;box-sizing:border-box;bottom:-24px;display:block;width:100%;font-size:0;height:24px;border-top:24px solid #f7f7f7;border-right:24px solid transparent">&nbsp;</span><span class="amp-nodisplay" contenteditable="false" role="presentation" style="position:absolute;bottom:0;right:0;display:block;width:2px;height:46px;background-color:#CACACA;transform:rotate(45deg) translate(17px, 32px)">&nbsp;</span><div data-entrydesign-content="" style="padding:4px 8px;background-color:#f7f7f7;font-size:16px;line-height:1.4;min-height:22px;line-break:anywhere"><p style="text-align: left;">1,メモ帳</p><p style="text-align: left;">2,電卓</p><p style="text-align: left;">3,cmd風python実行環境</p><p style="text-align: left;">4,python以外のプログラミング実行環境</p><p style="text-align: left;">5,ファイル管理など設定アプリ</p><p style="text-align: left;">6,ペイント,ワードアプリ</p><p style="text-align: left;">7,簡単なゲームを何種か</p><p style="text-align: left;">8,時計アプリ</p><p style="text-align: left;">9,タスクマネージャみたいなの</p><p style="text-align: left;">10,ゴミ箱</p><p style="text-align: left;">11,todoリスト</p><p style="text-align: left;">12,画像観覧アプリ</p><p style="text-align: left;">&nbsp;</p></div></div><p>&nbsp;</p><p>をもとに進めていこうと思います！<br>作るのめんどくさいや絶対作れないってなったら<mark style="background-color:#ffcc00;color:inherit;">減らすか代替案を用意する</mark>つもりです！<br><br>とりあえず今回の目的(作るアプリを決める)が終わったので次回からいよいよ基本となる部分を設計していこうと思います！<br>それではまた明日！</p></div>
]]>
</description>
<link>https://ameblo.jp/pc98uv/entry-12973200350.html</link>
<pubDate>Mon, 20 Jul 2026 17:00:00 +0900</pubDate>
</item>
<item>
<title>突然ですが...</title>
<description>
<![CDATA[ <p>どうも自称kanameです!</p><p>&nbsp;</p><p>さっきすごい暇だったのでチャッピーに<mark style="background-color:#ffcc00;color:inherit;">pythonの標準ライブラリのみ</mark>でOSみたいなの作ってって送ってみたんですよ.</p><p>すると</p><p>&nbsp;</p><blockquote><p>&nbsp;</p><p>（IDEL Shell）</p><p>======================<br>&nbsp; &nbsp; &nbsp;KanameOS<br>======================<br>Loading...<br>KanameOS 0.1<br><br>KanameOS&gt;&nbsp;</p><p>&nbsp;</p></blockquote><p>&nbsp;</p><p>とIDEL上で動くやつを渡してくれたんですが,,,望んでいたのはGUIを使った本格的な奴なのでtkinter？を使え！って送ったら</p><p>&nbsp;</p><div class="ogpCard_root"><article class="ogpCard_wrap" contenteditable="false" style="display:inline-block;max-width:100%"><a class="ogpCard_link" data-ogp-card-log="" href="https://ameblo.jp/pc98uv/entry-12973189599.html" rel="noopener noreferrer" style="display:flex;justify-content:space-between;overflow:hidden;box-sizing:border-box;width:620px;max-width:100%;height:120px;border:1px solid #e2e2e2;border-radius:4px;background-color:#fff;text-decoration:none" target="_blank"><span class="ogpCard_content" style="display:flex;flex-direction:column;overflow:hidden;width:100%;padding:16px"><span class="ogpCard_title" style="-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:2;max-height:48px;line-height:1.4;font-size:16px;color:#333;text-align:left;font-weight:bold;overflow:hidden">『pythonで作るOS　ちゃっぴーが送ってくれたプログラム』</span><span class="ogpCard_description" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.6;margin-top:4px;color:#757575;text-align:left;font-size:12px">import tkinter as tkfrom tkinter import messageboximport datetimeimport osclass…</span><span class="ogpCard_url" style="display:flex;align-items:center;margin-top:auto"><span class="ogpCard_iconWrap" style="position:relative;width:20px;height:20px;flex-shrink:0"><img alt="リンク" class="ogpCard_icon" height="20" loading="lazy" src="https://c.stat100.ameba.jp/ameblo/symbols/v3.20.0/svg/gray/editor_link.svg" style="position:absolute;top:0;bottom:0;right:0;left:0;height:100%;max-height:100%" width="20"></span><span class="ogpCard_urlText" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#757575;font-size:12px;text-align:left">ameblo.jp</span></span></span><span class="ogpCard_imageWrap" style="position:relative;width:120px;height:120px;flex-shrink:0"><img alt="" class="ogpCard_image" data-ogp-card-image="" height="120" loading="lazy" src="https://stat.profile.ameba.jp/profile_images/20260719/18/0c/IM/j/o23641773p_1784452607370_fxddq.jpg" style="position:absolute;top:50%;left:50%;object-fit:cover;min-height:100%;min-width:100%;transform:translate(-50%,-50%)" width="120"></span></a></article></div><p>&nbsp;</p><p>こちらのブログに貼ってあるプログラムが送られてきました！</p><p>ということで実行してみましょう！　　</p><p>&nbsp;</p><p>画像の横の文字がすごい不揃いで気持ち悪いですが許してください (-人-)ｺﾞﾒﾝﾖ｡</p><p>&nbsp;</p><p style="text-align: left;"><a href="https://stat.ameba.jp/user_images/20260719/20/pc98uv/a4/3e/p/o0983064715804076164.png"><img alt="" contenteditable="inherit" height="190" src="https://stat.ameba.jp/user_images/20260719/20/pc98uv/a4/3e/p/o0983064715804076164.png" width="290"></a>　　<a href="https://stat.ameba.jp/user_images/20260719/20/pc98uv/ee/a4/p/o0800060015804077813.png"><img alt="" contenteditable="inherit" height="165" src="https://stat.ameba.jp/user_images/20260719/20/pc98uv/ee/a4/p/o0800060015804077813.png" width="220"></a></p><p>実行直後</p><p>&nbsp;</p><p style="text-align: left;"><a href="https://stat.ameba.jp/user_images/20260719/20/pc98uv/aa/0b/p/o0972062615804076224.png"><img alt="" contenteditable="inherit" height="186" src="https://stat.ameba.jp/user_images/20260719/20/pc98uv/aa/0b/p/o0972062615804076224.png" width="290"></a><a href="https://stat.ameba.jp/user_images/20260719/20/pc98uv/98/e9/p/o0800060015804078407.png"><img alt="" contenteditable="inherit" height="165" src="https://stat.ameba.jp/user_images/20260719/20/pc98uv/98/e9/p/o0800060015804078407.png" width="220"></a></p><p>memoをクリック</p><p>&nbsp;</p><p><a href="https://stat.ameba.jp/user_images/20260719/20/pc98uv/08/c8/p/o0960063215804076217.png"><img alt="" contenteditable="inherit" height="191" src="https://stat.ameba.jp/user_images/20260719/20/pc98uv/08/c8/p/o0960063215804076217.png" width="290"></a><a href="https://stat.ameba.jp/user_images/20260719/20/pc98uv/2f/b1/p/o0800060015804079314.png"><img alt="" contenteditable="inherit" height="165" src="https://stat.ameba.jp/user_images/20260719/20/pc98uv/2f/b1/p/o0800060015804079314.png" width="220"></a></p><p>counterをクリック</p><p>&nbsp;</p><p><a href="https://stat.ameba.jp/user_images/20260719/20/pc98uv/57/81/p/o0966062215804076212.png"><img alt="" contenteditable="inherit" height="186" src="https://stat.ameba.jp/user_images/20260719/20/pc98uv/57/81/p/o0966062215804076212.png" width="290"></a><a href="https://stat.ameba.jp/user_images/20260719/20/pc98uv/87/c7/p/o0800060015804080274.png"><img alt="" contenteditable="inherit" height="165" src="https://stat.ameba.jp/user_images/20260719/20/pc98uv/87/c7/p/o0800060015804080274.png" width="220"></a></p><p>&nbsp;</p><p>&nbsp;</p><p>ちなみにpower OFFをクリックするとちゃんとシェルが消えました！さすが</p><p>&nbsp;</p><p>まあこんな感じのものを2カ月ぐらいかけて自分で作っていきたいですね...</p><p>はじめてにしてはブログづくりを頑張ったほうだと個人的に思っています！</p><p>もう今日はこれで力尽きたのでやめにします！<br>モチベが消えるまでは毎日投稿を<mark style="background-color:#ffcc00;color:inherit;">心がける</mark>ので期待しないほうがいいとは思いますが期待しておいてください！</p><p>&nbsp;</p>
]]>
</description>
<link>https://ameblo.jp/pc98uv/entry-12973192134.html</link>
<pubDate>Sun, 19 Jul 2026 20:46:15 +0900</pubDate>
</item>
<item>
<title>pythonで作るOS　ちゃっぴーが送ってくれたプログラム</title>
<description>
<![CDATA[ <p>import tkinter as tk<br>from tkinter import messagebox<br>import datetime<br>import os<br><br><br>class KanameOS:<br><br>&nbsp; &nbsp; def __init__(self, root):<br>&nbsp; &nbsp; &nbsp; &nbsp; self.root = root<br><br>&nbsp; &nbsp; &nbsp; &nbsp; root.title("KanameOS")<br>&nbsp; &nbsp; &nbsp; &nbsp; root.geometry("800x500")<br>&nbsp; &nbsp; &nbsp; &nbsp; root.configure(bg="#008080")<br><br>&nbsp; &nbsp; &nbsp; &nbsp; # タイトル<br>&nbsp; &nbsp; &nbsp; &nbsp; title = tk.Label(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; root,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text="KanameOS Desktop",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font=("Consolas", 20),<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bg="#000080",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fg="white"<br>&nbsp; &nbsp; &nbsp; &nbsp; )<br>&nbsp; &nbsp; &nbsp; &nbsp; title.pack(fill="x")<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; # 時計<br>&nbsp; &nbsp; &nbsp; &nbsp; self.clock = tk.Label(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; root,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font=("Consolas", 14),<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bg="#008080",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fg="white"<br>&nbsp; &nbsp; &nbsp; &nbsp; )<br>&nbsp; &nbsp; &nbsp; &nbsp; self.clock.pack()<br><br>&nbsp; &nbsp; &nbsp; &nbsp; self.update_clock()<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; # アプリボタン<br>&nbsp; &nbsp; &nbsp; &nbsp; frame = tk.Frame(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; root,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bg="#008080"<br>&nbsp; &nbsp; &nbsp; &nbsp; )<br>&nbsp; &nbsp; &nbsp; &nbsp; frame.pack(pady=40)<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; tk.Button(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frame,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text="📝 Memo",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width=15,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height=3,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; command=self.memo<br>&nbsp; &nbsp; &nbsp; &nbsp; ).grid(row=0,column=0,padx=10)<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; tk.Button(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frame,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text="🧮 Calculator",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width=15,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height=3,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; command=self.calc<br>&nbsp; &nbsp; &nbsp; &nbsp; ).grid(row=0,column=1,padx=10)<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; tk.Button(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frame,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text="💻 Terminal",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width=15,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height=3,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; command=self.terminal<br>&nbsp; &nbsp; &nbsp; &nbsp; ).grid(row=0,column=2,padx=10)<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; tk.Button(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frame,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text="Power Off",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width=15,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height=3,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; command=root.destroy<br>&nbsp; &nbsp; &nbsp; &nbsp; ).grid(row=1,column=1,pady=20)<br><br><br><br>&nbsp; &nbsp; def update_clock(self):<br><br>&nbsp; &nbsp; &nbsp; &nbsp; now=datetime.datetime.now()<br><br>&nbsp; &nbsp; &nbsp; &nbsp; self.clock.config(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text=now.strftime(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "%Y/%m/%d %H:%M:%S"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br>&nbsp; &nbsp; &nbsp; &nbsp; )<br><br>&nbsp; &nbsp; &nbsp; &nbsp; self.root.after(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1000,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.update_clock<br>&nbsp; &nbsp; &nbsp; &nbsp; )<br><br><br><br>&nbsp; &nbsp; def memo(self):<br><br>&nbsp; &nbsp; &nbsp; &nbsp; win=tk.Toplevel()<br><br>&nbsp; &nbsp; &nbsp; &nbsp; win.title("Memo")<br>&nbsp; &nbsp; &nbsp; &nbsp; win.geometry("400x300")<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; text=tk.Text(win)<br>&nbsp; &nbsp; &nbsp; &nbsp; text.pack(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; expand=True,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fill="both"<br>&nbsp; &nbsp; &nbsp; &nbsp; )<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; def save():<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; with open(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "memo.txt",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "w",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; encoding="utf-8"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ) as f:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; f.write(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text.get("1.0","end")<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; messagebox.showinfo(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Memo",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Saved"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; tk.Button(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text="Save",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; command=save<br>&nbsp; &nbsp; &nbsp; &nbsp; ).pack()<br><br><br><br>&nbsp; &nbsp; def calc(self):<br><br>&nbsp; &nbsp; &nbsp; &nbsp; win=tk.Toplevel()<br><br>&nbsp; &nbsp; &nbsp; &nbsp; win.title("Calculator")<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; entry=tk.Entry(win)<br>&nbsp; &nbsp; &nbsp; &nbsp; entry.pack()<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; result=tk.Label(win)<br>&nbsp; &nbsp; &nbsp; &nbsp; result.pack()<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; def run():<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result.config(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text=str(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eval(entry.get())<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; except:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result.config(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text="ERROR"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; tk.Button(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text="=",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; command=run<br>&nbsp; &nbsp; &nbsp; &nbsp; ).pack()<br><br><br><br>&nbsp; &nbsp; def terminal(self):<br><br>&nbsp; &nbsp; &nbsp; &nbsp; win=tk.Toplevel()<br><br>&nbsp; &nbsp; &nbsp; &nbsp; win.title("Terminal")<br>&nbsp; &nbsp; &nbsp; &nbsp; win.geometry("500x300")<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; output=tk.Text(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bg="black",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fg="lime"<br>&nbsp; &nbsp; &nbsp; &nbsp; )<br><br>&nbsp; &nbsp; &nbsp; &nbsp; output.pack(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; expand=True,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fill="both"<br>&nbsp; &nbsp; &nbsp; &nbsp; )<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; entry=tk.Entry(win)<br>&nbsp; &nbsp; &nbsp; &nbsp; entry.pack(fill="x")<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; def command(event=None):<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cmd=entry.get()<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.insert(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "end",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "&gt; "+cmd+"\n"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if cmd=="help":<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.insert(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "end",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "help time ls shutdown\n"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elif cmd=="time":<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.insert(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "end",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; str(datetime.datetime.now())<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +"\n"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elif cmd=="ls":<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.insert(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "end",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; str(os.listdir())<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +"\n"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elif cmd=="shutdown":<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.root.destroy()<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.insert(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "end",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Unknown command\n"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; entry.delete(0,"end")<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; entry.bind(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "&lt;Return&gt;",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; command<br>&nbsp; &nbsp; &nbsp; &nbsp; )<br><br><br><br>root=tk.Tk()<br><br>os=KanameOS(root)<br><br>root.mainloop()</p>
]]>
</description>
<link>https://ameblo.jp/pc98uv/entry-12973189599.html</link>
<pubDate>Sun, 19 Jul 2026 20:18:28 +0900</pubDate>
</item>
<item>
<title>前の話だけど...</title>
<description>
<![CDATA[ <p _msthash="1417" _msttexthash="1873067300" dir="auto">学校での技術の時間にサンプルで出された机の画像の机の上に載ってるPCが伝説のWindowsXPだった。</p><p _msthash="1417" _msttexthash="1873067300" dir="auto"><br _istranslated="1">先生もこだわってるなぁってなったけど普通に考えてそれしかいい画像がなかっただけだよね...?<br _istranslated="1">↑採用した理由としてはありそうじゃない?</p><p _msthash="1417" _msttexthash="1873067300" dir="auto"><br _istranslated="1">これが1カ月ぐらい前のお話でした〇</p><p _msthash="1417" _msttexthash="1873067300" dir="auto">&nbsp;</p><p _msthash="1417" _msttexthash="1873067300" dir="auto">...すごい変なことしか書いてないけど本当にブログといっていいのか？</p><p _msthash="1417" _msttexthash="1873067300" dir="auto">いつか85boxの動かし方とか書きたいなぁ...</p>
]]>
</description>
<link>https://ameblo.jp/pc98uv/entry-12973180489.html</link>
<pubDate>Sun, 19 Jul 2026 18:28:45 +0900</pubDate>
</item>
<item>
<title>祝　アメーバブログ開設！</title>
<description>
<![CDATA[ <p>どうも初めまして！</p><p>今までgithubで謎のブログをしていたものです！</p><p>&nbsp;</p><p>githubで今まで書いていたものは後でここに持ってきてgithubのほうは全部消します...</p><p>&nbsp;</p><p>特に長々と書く内容はあまりないと思うので数行で終わるものが多いと思いますがよろしくお願いします！</p>
]]>
</description>
<link>https://ameblo.jp/pc98uv/entry-12973180038.html</link>
<pubDate>Sun, 19 Jul 2026 18:23:32 +0900</pubDate>
</item>
</channel>
</rss>
