Menu

[025cc2]: / Release PyPy / d3d11_pypy.py  Maximize  Restore  History

Download this file

23 lines (18 with data), 606 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#A helper script for testing with PyPy. Instead of
#'import d3d11' do 'from d3d11_pypy import *'
import sys
import os
try:
import cpyext
except ImportError:
cpyext = None
if cpyext is None:
#Probably not a PyPy interpreter.
import d3d11
else:
#Probably running on PyPy, load the main module (d3d11).
#This assumes that it is in the same directory as this module
#and uses __file__, which is not always available.
modDir = os.path.dirname(__file__)
cpyext.load_module(os.path.join(modDir, "d3d11.pyd"), "d3d11")
d3d11 = sys.modules["d3d11"]
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.