Wilson Mar bio photo

Wilson Mar

Hello. Hire me!

Email me Calendar Skype call 310 320-7878

LinkedIn Twitter Gitter Google+ Youtube

Github Stackoverflow Pinterest

Confusion and errors from many alternatives and options


Overview

Print out the current time:

   import time
   time.ctime()
   

The response:

‘Sat Jan 28 00:35:27 2017’

Break time program

Pengal Programming Foundations with Python course at Udacity consists of videos on YouTube and forums.

import time
import webbrowser

total_breaks = 3
break_count  = 0  

while( break_count < total_breaks ):
   time.sleep(10) # seconds
   webbrowser.open("https://www.youtube.com/playlist?list=PLAwxTw4SYaPnYajEbZvqtcVWQ6XGhvtOW")

Strings

The Unicode standard represents a large variety of characters beyond the roman alphabet (emojis, greek, russian, mathematical symbols, logograms from non-phonetic writing systems such as kanji, etc.)

Define a Unicode string with a prefix, then print a unicode string:

unicode_string = u"aaaàçççñññ"
encoded_string = unicode_string.encode('utf-8')
print encoded_string
   

More on OSX

This is one of a series on Mac OSX: