MoonPoint Support Logo


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals

Advanced Search
Sun Mon Tue Wed Thu Fri Sat

Wed, Jun 22, 2016 11:15 pm

Python - Checking times and dates

In Python, you can use a function called to retrieve the current date and time. First you need to import the datetime library so that it can be used in the script, which can be done with from datetime import datetime. You can then display the current date and time with print E.g.:

$ python
Python 2.7.10 (default, Jul 14 2015, 19:46:27) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> print
2016-06-22 12:34:06.719688

You can also use

>>> print
2016-06-22 14:31:26.736321

The time is in hours, minutes, seconds, and fractions of a second.

[ More Info ]

[/languages/python] permanent link

Wed, Jun 22, 2016 12:02 am

Open sites list for a Chrome process on OS X

Chrome on a MacBook Pro laptop running OS X Yosemite (10.10.5) that I was using became unresponsive. Activity Monitor showed a Google Chrome process was using about 100% of the CPU cycles. I wanted to see what web sites the process was accessing in the browser tabs associated with the process. One way to do so is to double-click on the Chrome process in the Activity Monitor, which will open a smaller window showing information on that process. Click on the Open Files and Ports tab on that window. You can then copy the information you see in that window into a file and, using grep, extract all of the lines containing the IP address of the system, which will provide a list of sites accessed by the Chrome process.

[ More Info ]

[/network/web/browser/chrome] permanent link

Once You Know, You Newegg AliExpress by

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo