Monday, August 22, 2022

the CC

Intersting piece on how Credit Card companes make their money...

 https://www.economist.com/finance-and-economics/2022/08/17/can-the-visa-mastercard-duopoly-be-broken

Persistence

 New week; and I have been looking at creating and writing

to file in Python. I have created a file called CallEvents.txt programmatically.

                                                             


                                                                       


I closed and reopened the project, and everything is still there. Because that is the 

problem with the Calendar project, at this point. setting something up that persists.

https://www.w3schools.com/python/python_file_handling.asp

                                                   *     *     *

So now - thanks to some helpful code from the Web - I can get the date

from the event, and vice-versa. (Assuming, I am entering the event date, and 

the event name on different lines).  I can see deleting entries, or replacing them. 

Maybe there is a way to handle multiple entries with this capability)...                                                             



                                                                              



                                                          *     *     *
a more straightforward approach is built-in frpython: sqlite databases.
 
There is an sqlite3 module one merely iports and uses. Below, from a tutorial,

I have created a database called 'text.db' and added records to it, which can be listed

I am noe free to condsult the db, and make changes to it.

                                                            


So where is this db, physically, in my computer. Interesting question. If one

tries to find ot, one is told it is a unreachable system file.

                                                                    

Doesn't augur well to packaging a db with our calendar ‽




Sunday, August 21, 2022

Long_hold

 


Of course, I can put the chosen date in an array. Been exploring the possibilities 

from there 🤔

(BTW, there are two ways to print an interrobang in windows:

1- With the virtual keyboard, long-hold the interrogation mark; it will appear:

                                                              


On a blank sheet in Document, type in 203d, then hold Alt and x at the same time.

The u-code will disappear in favor of the glyph. )

                                                                  *     *     *

Got things down to a simplified form:

                                                                            


Liking this elegant approach:

                                                                              




Saturday, August 20, 2022

Buckle Up

 A rather bemused gentleman was asking, yesterday, what a

blueberry buckle might be. Clearly, a late summer dessert with

blueberries, but what...


I made one, last night, from a 1980's recipe I have kept on a card.

                                                   


There is a cake layer, at the bottom, with blueberries. On top, more

blueberries in a streussel topping. Sweet and delicious. Although a

'buckle' is the tie on a belt, the verb buckle could be used to describe

a road damaged by heat, or flood. In this cake, the cake looks 'buckled'

from all those blueberries...


BLUEBERRY BUCKLE     375°F                     50-60 min

Cake:

2/3 cups granulated sugar

1/2 cup butter

2 eggs

1 tsp vanilla

1 1/3 cups all-purpose flour

1 1/2 tsp baking powder

1/4 tsp nutmeg

1/3 cups milk

3 cups blueberries


Topping

1/2 cup all-purpose flour

1/4 cup granulated sugar

1/4 tsp cinnamon

1/4 cup butter


Sprinkle half the blueberries with topping



Difficulty_Ahead

 Been looking for ready-made code for calevents; there doen't seem to

de any. The hard way, all the way...


                                                                    


This would appear to be the limit to what I can do with it, for now:



 
                                                                          


                                                                            

                                                                               
So now I need to reposition on the main window, ans wire thins...

Thursday, August 18, 2022

TKC

 Found an awesome calendar program: tkcalendar. having fun

with this. One can even go from one month to the next!!

                                                      


There is a simple Calendar module, not equipped for tkinter. A quick view

of the month, below. Note that one needs to indicate we want Sunday as first

day of the week; the module - by default - is to the European standard.


                                                                    


*     *     *




                                                                      *     *     *

There are a LOT of styling options. A rundown in the reference below. As well

as those 'cornsilky' CSS colours 🙄

                                                                         

                                                                               

Should one need to create a larger calendar, pack() with fill set to both will

expand the calendar to fill the specified window!

                                                                                



                                                                    *     *     *

Changing the first day of the week was easy enough. One enters

firstweekday = 'sunday' inthe widget description.

                                                                     




                                                                       


Is this color scheme now too chaotic‽

WBorder

 Been looking at the window border issue, in Windows10. 


Looks like I'm getting a border effect, like it or not; the window

needs to be demarcated. Then, I'm also getting 400 pixels to work

with, inside that border. See winfo.


To be noted: one must import ttk after tkinter itself for the switch to ttk

rules to happen. One needs to update the window before using winfo().


                                                           


                                                                             


                                                                         *     *     *
By the way, font size is measured in points; label size in pixels. there are 72 points

to an in inch, and the size of the font is measured from the top of the B  to the

lowest point of a bottom extension on the p. At font 20, that p should be 20/72 inches

and it is on my larger  'work' screen.


Pixels are another story. ppi - pixels per inch- depend on resolution. 85 was long a standard;

and the given pixels on my scteen eension matches that. In point of fact, my current computer 

boasts over 200 ppi...

                                                                    


                                                                        *     *     *



My pizza image is 30x34, here in a 50x50 label!

                                                                                

But can I move it up a tad, for effect ...