~certify-web-dev/twisted/certify-trunk

« back to all changes in this revision

Viewing changes to twisted/python/runtime.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-01-16 19:56:10 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060116195610-ykmxbia4mnnod9o2
Tags: 2.1.0-0ubuntu2
debian/copyright: Include copyright for python 2.3; some 2.3 files
are included in the upstream tarball, but not in the binary packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
import os
8
8
import sys
9
9
import time
 
10
import imp
10
11
 
11
12
def shortPythonVersion():
12
13
    hv = sys.hexversion
65
66
        # not windows at all...
66
67
        return 0
67
68
 
 
69
    def supportsThreads(self):
 
70
        """Can threads be created?
 
71
        """
 
72
        try:
 
73
            return imp.find_module('thread')[0] is None
 
74
        except ImportError:
 
75
            return False
 
76
 
68
77
platform = Platform()
69
78
platformType = platform.getType()
70
79
seconds = platform.seconds