We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5cb8738 commit 8dc645dCopy full SHA for 8dc645d
raffle.py
@@ -1,5 +1,6 @@
1
# -*- coding: utf-8 -*-
2
import random
3
+import webbrowser
4
5
from pythonkc_meetups import PythonKCMeetups
6
from optparse import OptionParser
@@ -8,7 +9,10 @@ def raffle_time(api_key=None, event_id=None):
8
9
client = PythonKCMeetups(api_key=api_key)
10
attendees = client.get_event_attendees(event_id)
11
winner = random.choice(attendees)
- print "And the winner is, %s" % winner.name
12
+ if winner.photo:
13
+ webbrowser.open_new(winner.photo.url)
14
+ print "\n\nAnd the winner is, %s \n\n" % winner.name
15
+
16
17
if __name__ == '__main__':
18
parser = OptionParser()
0 commit comments