Quantcast
Channel: Pimoroni Buccaneers - Latest posts
Viewing all articles
Browse latest Browse all 54320

Scroll Phat - Scroll Text

$
0
0

Ooh, how are you running it? You should do something like:

python simple-text-scroll.py "Hello this is my text!"

It accepts the text string on the command line. The " " at the end of the write_string line only serves to pad it with spaces so it wraps nicely.

The len(sys.argv) != 2: line is checking to see how many arguments are being passed to the script. By default all scripts get their name passed as the first argument, but this script is expecting at least 2 arguments- the second being the text string to display.


Viewing all articles
Browse latest Browse all 54320

Trending Articles