Skip to content

Commit 8727981

Browse files
committed
Add code to display Coca Cola logo
1 parent 4758f6a commit 8727981

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

cokelogo.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
__ ___ __ .ama ,
2+
,d888a ,d88888888888ba. ,88"I) d
3+
a88']8i a88".8"8) `"8888:88 " _a8'
4+
.d8P' PP .d8P'.8 d) "8:88:baad8P'
5+
,d8P' ,ama, .aa, .ama.g ,mmm d8P' 8 .8' 88):888P'
6+
,d88' d8[ "8..a8"88 ,8I"88[ I88' d88 ]IaI" d8[
7+
a88' dP "bm8mP8'(8'.8I 8[ d88' `" .88
8+
,88I ]8' .d'.8 88' ,8' I[ ,88P ,ama ,ama, d8[ .ama.g
9+
[88' I8, .d' ]8, ,88B ,d8 aI (88',88"8) d8[ "8. 88 ,8I"88[
10+
]88 `888P' `8888" "88P"8m" I88 88[ 8[ dP "bm8m88[.8I 8[
11+
]88, _,,aaaaaa,_ I88 8" 8 ]P' .d' 88 88' ,8' I[
12+
`888a,. ,aadd88888888888bma. )88, ,]I I8, .d' )88a8B ,d8 aI
13+
"888888PP"' `8""""""8 "888PP' `888P' `88P"88P"8m"
14+

virtualcoke.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@
88
import socket, select, errno
99

1010
# for emulator code
11+
import os
1112
import sys
1213
import string
1314

15+
# Ascii Coke Logo
16+
# by Normand Veilleux
17+
# in cokelogo.txt
18+
1419
class ContainedMultiSelect(npyscreen.BoxTitle):
1520
_contained_widget = npyscreen.TitleMultiSelect
1621

@@ -48,6 +53,16 @@ def while_waiting(self):
4853
def create(self, *args, **keywords):
4954
super(VirtualCoke, self).create(*args, **keywords)
5055

56+
logofile = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "cokelogo.txt")
57+
logotext = open(logofile).read()
58+
self.cokelogo = []
59+
60+
cly = 1
61+
for line in logotext.splitlines():
62+
widget = self.add(npyscreen.FixedText, value=line, editable = False, rely = cly)
63+
cly = cly + 1
64+
self.cokelogo.append(widget)
65+
5166
# self.textdisplay = self.add(npyscreen.FixedText, value=self.parentApp.textdisplay, editable=False, relx=9)
5267
# self.textdisplay.important = True
5368

0 commit comments

Comments
 (0)