Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)

src/p/i/pifacecad-HEAD/examples/tweets.py   pifacecad(Download)
 
UPDATE_INTERVAL = 60
PAGE_WIDTH = pifacecad.lcd.LCD_WIDTH * 2
 
CONSUMER_KEY = "6eMHbsNHcxRLIzF4wZWf6g"
        end = PAGE_WIDTH * (page + 1)
        top_line = text[start:start+pifacecad.lcd.LCD_WIDTH].ljust(
            pifacecad.lcd.LCD_WIDTH)
        bottom_line = text[start+pifacecad.lcd.LCD_WIDTH:end].ljust(
            pifacecad.lcd.LCD_WIDTH)

src/p/i/pifacecad-HEAD/examples/hangman.py   pifacecad(Download)
import pifacecad
import pifacecad.tools
from pifacecad.lcd import LCD_WIDTH
 
 
    def say_well_done(self):
        print("Well done!")
        self.cad.lcd.set_cursor(3, 1)
        self.cad.lcd.write("Well done!".ljust(LCD_WIDTH-HANGMAN_WIDTH))
 
    def say_gave_over(self):
        print("GAME OVER!")
        self.cad.lcd.set_cursor(3, 1)
        self.cad.lcd.write("GAME OVER!".ljust(LCD_WIDTH-HANGMAN_WIDTH))

src/p/i/pifacecad-HEAD/examples/radio.py   pifacecad(Download)
import pifacecommon
import pifacecad
from pifacecad.lcd import LCD_WIDTH
 
 
    def update_station(self):
        """Updates the station status."""
        message = self.current_station['name'].ljust(LCD_WIDTH-1)
        self.cad.lcd.set_cursor(1, 0)
        self.cad.lcd.write(message)

src/p/i/pifacecad-HEAD/examples/traintimes.py   pifacecad(Download)
 
        self.cad.lcd.set_cursor(0, 1)
        self.cad.lcd.write(later_times_string.ljust(pifacecad.lcd.LCD_WIDTH))
 
    def next_later_times_page(self, event=None):

src/p/i/pifacecad-HEAD/pifacecad/tools/question.py   pifacecad(Download)
        # pad with spaces to overwrite previous answer (ljust)
        prev_ans = self.answers[self._displayed_answer_index]
        prev_ans_len = max(len(prev_ans), pifacecad.lcd.LCD_WIDTH)
        answer = self.answers[new_answer_index].ljust(prev_ans_len)