~ubuntu-branches/ubuntu/trusty/python-sfml/trusty

« back to all changes in this revision

Viewing changes to examples/voip/voip.py

  • Committer: Package Import Robot
  • Author(s): James Cowgill
  • Date: 2013-12-09 17:50:52 UTC
  • mfrom: (1.1.3) (8.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20131209175052-11v6drpb6g3yksst
Tags: 1.5.1.is.1.3+dfsg-1
* New upstream version 1.3 (from python-sfml.org)
  - This is a complete rewrite of the Python bindings for SFML2, and
    the new maintainer is using a different version numbering scheme.
* Added myself to the list of uploaders
* Change package priority from extra to optional
* Bumped standards version (to 3.9.5) and debhelper compat (to 9)
* Added Python 3 and documentation packages
* Improve package description for debug packages

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python3
 
2
# -*- coding: utf-8 -*-
 
3
#
 
4
# pySFML - Python bindings for SFML
 
5
# Copyright 2012-2013, Jonathan De Wachter <dewachter.jonathan@gmail.com>
 
6
#
 
7
# This software is released under the LGPLv3 license.
 
8
# You should have received a copy of the GNU Lesser General Public License
 
9
# along with this program. If not, see <http://www.gnu.org/licenses/>.
 
10
 
 
11
import sfml as sf
 
12
import client, server
 
13
 
 
14
# python 2.* compatability
 
15
try: input = raw_input
 
16
except NameError: pass
 
17
 
 
18
# choose a random port for opening sockets (ports < 1024 are reserved)
 
19
PORT = 2435
 
20
 
 
21
# client or server ?
 
22
print("Do you want to be a server (s) or a client (c) ?")
 
23
who = input()
 
24
 
 
25
if who == 's':
 
26
        server.do_server(PORT)
 
27
else:
 
28
        client.do_client(PORT)
 
29
 
 
30
input("Press any key to exit...")