Wednesday, August 31, 2022

Cookies

 Not naming any names, here, but there are some constraints

in the making of cookies that cookie critics need to be aware

of. Below - this came through my Facebook feed - we see that,

for an equivalent amount of flour, the thinner cookie will

have a higher concentration of sugars and butter. The larger

more cake-like cookie might take a frosting for that function. 

It's just about what will cook... and rise! 😊


                            


P_Party

 Working on an events list:

                                                         


                                                                            


                                                                                




   With button:

                                                                          

                                                                             



Tuesday, August 30, 2022

Frame

 Today I take the plunge and start putting my calendar app

together. Best way to start is to design the interface, with the

use of ttk Frame to group little interaction widgets together.

Will then use the grid layout managet to situate the frames.

https://www.pythontutorial.net/tkinter/tkinter-frame/


Found a helpful color chart for python, where one an work with

color names:

                                              


Also investigated the notorious color 'puce' (a puce in a flea, in French):

                                                                      

Maybe not...

                                                                *     *     *
Conventional App Layout:
                                                                   

                                                                       *     *     *

      So, I am connected!!                                                           




Monday, August 29, 2022

ComboB

 Tkinter widgets and ttk widgets need to be coded differently. 

the caledar with DateEntry is similar to a ttk combobox widget.

Below, the code for that from Codemy:

                                                                   


                                                                                    



                                                                       *     *     *

Starting to see where the resources and hidden code on theTKCalendar widget

can be found. I am on the PYCharm editor.


From READ I copied the examples code, into Pycharm, and ran it. The result

is a window givinga choice of what each of the 3 example snipets produces.

                                                                    

Read also informed me I could access the options on the calendar widget by asking for

keys().  
                                                                               

Here is the output from that request:
                                                                           

                                                                            
Finally, a right-click on DateEntry in Example 3, goto, opened the file with all

the goodies, including the hidden codethat created DateEntry!!

                                                                       


                                                                   

I now have a LOT to work with! 

Sunday, August 28, 2022

Countdown

 No dearth of information on the Artemis Moon launch, Monday. Did find

this interesting tidbit in the New York Times, about what was learnt from

previous missions:

                                              

*     *     *

Meanwhile, still trying to use the given handles to wire up tkcalendar with events.

Making requests in French, I did find some code with a lambda function I have

been adapting:

                                                                       




                                                                                


It's really all about my becoming more proficient with Python; so I'm keeping on...



Saturday, August 27, 2022

Dangerous

 source Le Monde, AFP, 8/27/2022

From the Zaporijia power plant: the Ukrainian operator warns against a risk of " discharge of fine radioactive substances"

Energoatom, the Ukrainian operator of  nuclear power plants, claims that the Russians bombed the site several times and that "the plant's infrastructure was damaged". Moscow shifts responsibility for the bombing to Kyiv.

Satellite image of the Zaporizhia nuclear power plant on August 24, 2022, showing smoke at the perimeter of the plant. PLANET LABS PBC/AP

The Zaporijia nuclear power plant remains at the heart of concerns. The Ukrainian operator Energoatom announced on Saturday August 27 that the plant cold be connected to the electricity grid, but the presence of Russian military equipment on the site still constituted a major danger.

Russian troops shelled the site “repeatedly over the past day ,” Ukraine's national carrier said. "As a result of periodic bombardments, the plant's infrastructure has been damaged and there are risks of hydrogen leakage and spraying of radioactive substances ," she said, noting as well "a high risk of fire” .

Between Thursday and Friday, the plant and its six reactors of 1,000 megawatts each were "totally disconnected" from the national grid due to damage to the power lines, according to Kiev. Energoatom finally announced that “one of the reactors shut down the day before” had been “reconnected to the electricity grid” on Friday. It “produces electricity for the needs of Ukraine” and “an increase in [its] power is in progress ,” the company said.

Kyiv and Moscow continue to blame each other for the bombardments near the complex, near the town of Enerhodar, on the Dnieper River, and thus putting the plant in danger. Russia has thus accused Ukraine of having fired seventeen shells on the enclosure of the power plant during the last twenty-four hours. “Four fell on the roof of the building (…) where 168 American nuclear fuel assemblies from the WestingHouse firm are located ,” the Russian Defense Ministry said in a statement. Shells also reportedly crashed 30 meters from a used fuel depot and near another containing “fresh fuel” .

According to the Russian army, the Ukrainian army fires from the outskirts of the town of Marhanets, which faces the plant, on the opposite bank of the Dnieper, still controlled by Kyiv. According to the governor of the Dnipropetrovsk oblast, Valentyn Reznitchenko, the Russians, conversely, sent from the Zaporijia power station Grad missiles and artillery shells on the towns of Nikopol and Marhanets.

Deeming the situation "dangerous" , the Ukrainian President, Volodymyr Zelensky, on Friday urged the International Atomic Energy Agency (IAEA) to send a mission tosite as soon as possible, deploring that the Russian troops "are pushing permanently towards a worst-case scenario” . The UN has called for a cessation of all military activity in the surrounding area while, faced with a "very real risk of nuclear disaster" , the IAEA is demanding access to it.

IAEA experts are expected there "next week" , according to the adviser to the Ukrainian energy minister, Lana Zerkal, who accused the Russians of "artificially creating obstacles" to this mission, which Moscow denies . The Agency, for its part, has not confirmed any date forits mission.


                                                              

Friday, August 26, 2022

Connected

 Using widget code - which works with the stand-alone cal - and getting

a new color for an Event day:


                                                     








Soving the 'on_hover' problem:


                                                                     



   Adding a state: disabled  to the entry widget:
                              
                                                                             

                                                                          



Thursday, August 25, 2022

Student Debt

 https://www.lefigaro.fr/conjoncture/joe-biden-fait-un-cadeau-de-10-000-dollars-a-43-millions-d-etudiants-endettes-20220824

Calevents

 Looking at how to interact with the calendar when

entering events...

                                           


                                                                               

                                                                                     

Added a balloon to show events list on hover:
                                                                                   




Now I need the calendar to indicate there is an event on said day!!

                                                                        


                                                                            

Wednesday, August 24, 2022

Set_up

 So the set-up for a 'pythonesque' take on sqlite will look

as follows:

                                                        


Noteworthy, here: the database lives in RAM memory. One starts all over at

every run; avoiding the pesky overwriting problems. This is the better set-up

to develop our functionality. As well, the 'with conn' line is a python environmental

feature. The connection closes itself at the end of every run.

                                                                                  



For the rest, one is working with Python economy: a class definition for the layout,

functions for the various operations. Rather nice!!

Tuesday, August 23, 2022

DBTut

 Starting to find my way around sqlite3 Python. Following a very clear tuto

on the subject:

                                               


https://stackoverflow.com/questions/6318126/why-do-you-need-to-create-a-cursor-when-querying-a-sqlite-database

https://youtu.be/pd-0G0MigUA


                                                                      



                                                                               


                                                                    


                                                                                  


                                                                            

In the light of sanity - the next morning - added a record for Vicky Mouse 60000. 

Everyone is still in the database, as expected.

Made a correction (W3Schools)

                                                                       







                                                                      *     *     *

The next part of the tutorial is setting up a backend...