1 | #!/usr/bin/env python |
---|
2 | # This file is part of Xpra. |
---|
3 | # Copyright (C) 2019 Antoine Martin <antoine@xpra.org> |
---|
4 | # Xpra is released under the terms of the GNU GPL v2, or, at your option, any |
---|
5 | # later version. See the file COPYING for details. |
---|
6 | |
---|
7 | import sys |
---|
8 | import time |
---|
9 | |
---|
10 | def print_thread(): |
---|
11 | while True: |
---|
12 | sys.stdout.write("*") |
---|
13 | sys.stdout.flush() |
---|
14 | time.sleep(0.1) |
---|
15 | |
---|
16 | from threading import Thread |
---|
17 | t = Thread(target=print_thread) |
---|
18 | t.daemon = True |
---|
19 | t.start() |
---|
20 | |
---|
21 | time.sleep(0) |
---|
22 | from pycuda import driver |
---|
23 | |
---|
24 | print("initilizing device") |
---|
25 | device = driver.Device(0) |
---|
26 | print("device=%s" % (device,)) |
---|
27 | context = device.make_context() |
---|
28 | print("context=%s" % (context,)) |
---|
29 | print("done") |
---|