Site Sponsors:
Whose STILL better @Python? 
Apologies for previous posts on political topics - I hate to care so much about non-technical issues - but I do.

Maybe you do, too?

Getting back to what we all know and love, surely the best way to push a post BACK, be to push something onto the stack, BEFORE it?

With such a laudable goal placed FIRMLY in mind, allow me to note that - even though Python 2.7 is decidedly deprecated - how, even at this late stage in the game - Ubuntu has the hands-down BEST Python 3 support for Apache2.

I cannot understand how tenured veterans are yet in denial over the ultimate demise of the 2.x standard... over the epoch, that pattern of deprivation has taken place over, and over, over, and over .. and over (!) again?

Indeed, Python 3 "just works" so well out-of-the-box (*) that I recently gave up at even trying to get the LAMP2 (Python3 + PHP) 'stack to work under CentOS 7. --At the day's ending, turn-key is ever so much to be preferred, 'oer toss-and-turn!


LAMP-Py?


... we are even running Ubuntu 16.04 - even as so decidedly dated - upon our clouds ... to absolutely great effect!

GO - DADDY, GO! (That pun ... intended!)

8-)

Note: Following the previous ('how to' link, below) we yet (P2) had to:
apt search php7
apt search libapache2-mod-php7
-then, with respect to our option set, and in as much as php -v was a dud:
apt-get install php
apt-get install libapache2-mod-php7.0

To be followed by the requisite:
systemctl restart apache2

(*) (how to)


[ view entry ] ( 807 views )   |  permalink  |  related link
Clone File Dates & Times 
I would be willing to wager that anyone who copies files on Linux has been stung by this one: After copying your files from one place, to another, you notice that the file dates & time have been changed?

While there are many ways to deal with the problem, few I have seen allow us to create a snapshot of the "good" file data (mtime) so as to apply them over several other copies... especially when we have thousands of files, scattered about different (let alone, multiple!) cloned-tree locations?

Submitted for your enjoyment therefore, we felt the need to share our 'cpdates.py' strategy with you.



All we need do is to (1) create a snapshot of the good-tree, then (2) apply those dates over the destination tree. Upon (2), the script will replace the source, with the destination folder-location & then apply the snapshot source file's date & time to the destination file.

By way of a bonus, any (1) can be used over many (2)s.

Source Code: cpdates.py

Students who are interested in learning how to work with file information in Python 3 on Windows, Linux, macOS and elsewhere will also enjoy our Python 3000 training opportunity.


Note: For our purposes, we wanted the mtime of the source, to become the mtime + atime on the destination. --Your mileage might vary?



Google Fodder: touch recursive delta fix stat apply recover recovery


[ view entry ] ( 325 views )   |  permalink  |  related link
REALLY easy data entry for Python... 
Had to share this one: Create a field-name dictionary, show the window, then enumerate-out the results.



Code: To see the code on GitHub, click here


[ view entry ] ( 380 views )   |  permalink  |  related link

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>