Pythonの実行環境020

GUIのI/Fの作り方です、GUIのLib tkinter を使います
関数で、ファイル選択とホルダー選択を定義します。
rootでTKを読み込み
画面サイズやタイトルをメソッドで決めます。
決定は commandで定義した関数を呼ぶことでOKです。

このあたりになるとPythonの実力を感じる事になります。



わかお かずまさ

VegaSystems


📷📷📷📷📷📷
#LAN_PRO
#Bloguru
#VegaSystems
#photograph
#kuma

ワオ!と言っているユーザー

やはり最初はVBAから・・・・その2

この話は、最近流行りの「ITスキル」で副業・転職等のCMなどで心を動かされて
いる方のために書いています。

Pythonの連載をしているせいか、問い合わせもあるので、誤解を恐れずあえて言います。
プログラミングスキル、特に自分が中心となってシステム展開をするには、かなりの
レベルが必要です、これは時間を費やしても、SchoolやE-ラーニング頑張っても、なかなか
身につかないと思います、無論の個人差はあります。しかし、この面での能力があれば
現在の仕事の中ですでに「開花」していると思います。
中年まで無縁であるとは思えないのです、これは性別は関係ありません。

プログラム能力と同じレベルで要求されるのがOSやNetWorkの経験です、操作も
さることながら、構造に関する知見は絶対に必要です。
システム会社は、この人材が揃っており、自分の得意分野を研ぎ澄ます事が出来ますが
個人での展開は、かなり厳しい事になります。

特に人気のある言語の場合、多くは構築・運用のハードルが高く、個人での運用は
書籍やWebにあるように「簡単」には行きません。

そこで前回も書きましたが、ExcelでのVBA構築をすすめるわけです、VBAはMacro展開
で「骨子」が出来ていれば、簡単ではありませんが、それなりに完成形に持って
行くことが出来、効果を出やすいのです。

ところが、例えばPythonの場合などは、文法こそVBAと大きくは変わりませんが、
実際の運用には、様々な関数、メソッドを始め、基本文法以外に習得せねば、Source
の解読がままなりません、この既成のSourceの解読・応用が一番重要なのですが、
文法のみでは「読めない」のが現実です。

もう一度いいますが、まずはExcelVBAを確実に「もの」にするところから始めましょう。
これが挫折するなら、他の言語に手出しすべきではありません。

訳知り顔で、これからはAIのためにはPythonなどと、自分で構築も出来ない方の無責任な
話をまともに聞いてはいけません、時間とお金を無駄にします。


わかお かずまさ

VegaSystems


📷📷📷📷📷📷
#LAN_PRO
#Bloguru
#VegaSystems
#photograph
#kuma

ワオ!と言っているユーザー

Pythonの実行環境019

関数の呼び出しに関しての基礎部分。
上の場合は関数a/bとも、呼び出し前に事前定義が出来ておりOK

真ん中は関数bが未定義であるため、エラーになる、aは適宜済みのためOK

下は、最初にbを呼び出し、bの中でaを呼び出し、最後にprintで終了。




わかお かずまさ

VegaSystems


📷📷📷📷📷📷
#LAN_PRO
#Bloguru
#VegaSystems
#photograph
#kuma

ワオ!と言っているユーザー

御嶽山噴火から9年

Nine years have passed since the eruption of Mt. Ontake,
and the anonymous account of a woman who experienced
the tragedy has been made public. Reading her account,
there are key points that stand out:

Mt. Ontake is not an independent peak but part of a range
between 2,800 to 3,000 meters. While it has been traditionally
known as a sacred mountain for ascetic practices,
its high altitude makes it far from an easy climb. In fact, the ascetic practices in Mt. Ontake traditionally cease at the end of August, and it is believed
that the mountain's deity descends to lower altitudes in September,
making ascent for worshipers impractical. The guides were aware
that autumn could be harsh for ordinary believers.

There are major east-west routes for climbing, with the Tano-hara route from Ohtaki, in particular, being regarded as the easiest due to its starting point at 2,200 meters and well-maintained trails. Excluding the option to take a bus up to 2,700 meters at Norikura, this route is considered the most straightforward route to reach 3,000 meters.

The eruption accident was not unrelated to the ease of access. A percentage of the victims were, I believe, beginners or individuals with limited experience in high-altitude mountaineering.

It was suspected that those who perished were not solely due to volcanic rocks, and indeed, the account reveals that some were still alive when the eruption subsided. It's a grim reality for their families, but the author suggests that they might have survived if they had proper equipment.

Having climbed here multiple times during this season, I can attest that the nighttime chill is severe even at the mountain's base. It approaches freezing temperatures at Tano-hara. I am certain that at the summit, the temperature was below freezing.

However, during the daytime, the temperature rises to over 10°C, and if you are actively climbing, even summer clothing might not feel too cold. On sunny days, it can be quite warm, and climbers, especially beginners, might not have been adequately dressed. Of course, if nothing goes wrong, this might be okay. But when unforeseen events occur, the presence or absence of proper gear becomes a matter of life and death.

Some were deprived of their ability to move freely due to volcanic rocks or falls, making descending impossible, but they were still alive at the time of the eruption's cessation. However, the drop in temperature after sunset made it impossible for them to maintain their body temperature through self-generated heat, leading to their demise.

This is a critical point that hasn't been touched upon in previous reports. In other words, having the right equipment could have made a difference.

The necessary equipment includes cold-weather clothing (light down or fleece) and a tarp (tarpaulin tent). The latter is a lightweight, adult-sized tarpaulin tent that can be erected using trekking poles for high insulation bivouac. It seems that the author used down clothing for insulation and also brought a tarp, which she claims helped her survive.

In the mountains, one never knows what might happen. Unless you are on a very low mountain where escape is possible, having a tarpaulin tent should be considered essential in the upcoming seasons.

Here is a link to my equipment list:
http://www.yamareco.com/modules/yamanote/detail.php?nid=1310

 
御嶽山噴火から9年が経ちました・・・・
遭難した女性の手記が公開されています(匿名)。
これを読むと、やはり、と思える点があったの記します。

御嶽山は2800から3000mの連山で独立峰では無い。
昔から修験の山として知られ、馴染まれているが、その高度から決して
簡単な山では無い、現に御嶽教の礼拝登山は8月末までであり、9月になると
ご神体は麓に遷御すると言われ、礼拝登山は行われない。
先達は一般信者には秋は厳しい事を知っていた。

登山道は東西がメジャー、特に王滝から登る田の原ルートは、スタート地点が
2200mで、道も整備されており、バスで2700mまで登れる乗鞍を除くと、最も
簡単に行ける3000mと言われている。

噴火の事故はこの簡易さと無縁ではない、遭難者の何割かは、いわゆる
初心者、標高の高い山の経験が少ない方であったと思う。

死亡された方々は噴石だけではないと思っていたが、やはり手記を読むと
噴火が収まった時点では存命していた方が何人かはいたのである。
ご遺族には酷な話であるが、その方々は装備があれば助かったかも知れない。
と、彼女は記している。

私はこの時期復数回、ここに登っているが、夜の冷え込みは山麓でも半端では
ない。田の原でも氷点下に近い。山頂付近なら確実に零下であったと思う。

ところが日中では10℃以上あり、登山中なら夏の服装でも寒さは感じなかったと
思う、晴天なら暑いくらいであり、登山者、特に初心者は軽装ではなかったか。
無論、何もなければこれでOKである。ところがこのような事態となると装備の
あるなしが命に関わってくる。

噴石、または転倒などで行動の自由を奪われ、下山は出来ないが存命して
いた方も、日没後の気温の低下で、自己運動での発熱での体温維持が出来ず
死亡された方がいたと記されている。

これは重要ポイントで従来の報道では触れられていない。つまり装備を持って
いたら助かったかも知れないのである。

装備とは防寒衣服(ライトダウン・フリース)それにツエルトだ。
後者は簡易テントで大人のげんこつ大で軽量。ストックをポールにすれば
保温性の高いビバークが可能となる。彼女はダウンで保温していたようだが
ツエルトも持参していたようで、この装備で生存出来たと記している。

山では何が起きるかわからない、余程の低山でエスケープが可能ならともかく
ツエルト装備はこれからシーズン必須であろう。

以下は私の装備内容
http://www.yamareco.com/modules/yamanote/detail.php?nid=1310



わかお かずまさ

VegaSystems


📷📷📷📷📷📷
#LAN_PRO
#Bloguru
#VegaSystems
#photograph

#トレッキング
#trekking
#キャンプ
#kuma

ワオ!と言っているユーザー

Pythonの実行環境018

関数呼び出しの基本の紹介。
上側は、同じ関数を2度呼び出しています。

下側は、Printを実行し、関数を呼び出し、
printも実行しています。
関数のprintはインデントされ、ここで終了。

このインデントがPythonの大きな特徴で、専用Editorで
コーディングしないと、結構面倒です。
特に修正したり、コピペで他のSourceを持ち込む時
要注意です。


わかお かずまさ

VegaSystems


📷📷📷📷📷📷
#LAN_PRO
#Bloguru
#VegaSystems
#photograph
#kuma

ワオ!と言っているユーザー

酷暑の実害が・・・・

この夏の酷暑の被害の報告です。

まず、お米。室内で備蓄していた白米が乾燥または変質して、美味しくなかったり
炊きあがりに「芯」があったりします、やはり冷蔵庫に保管すべきだったと反省しきり。

電池も問題です、高温でさらされアルカリ電池などは液漏れの恐れがあります、
我が家も、映像機器などで多用しているので要注意です・・・・




わかお かずまさ

VegaSystems


📷📷📷📷📷📷
#LAN_PRO
#Bloguru
#VegaSystems
#photograph
#kuma

ワオ!と言っているユーザー

Pythonの実行環境017

関数の呼び出しと「return」の使い方。
このあたりはVBAでもありますが、使い方がPythonの方が
多様で複雑。


わかお かずまさ

VegaSystems


📷📷📷📷📷📷
#LAN_PRO
#Bloguru
#VegaSystems
#photograph
#kuma

ワオ!と言っているユーザー

×
  • ブログルメンバーの方は下記のページからログインをお願いいたします。
    ログイン
  • まだブログルのメンバーでない方は下記のページから登録をお願いいたします。
    新規ユーザー登録へ