Exemple #1
0
 def read(self):
     while 1:
         readString = win32trace.blockingread()
         for ch in readString:
             integer = int(ch)
             count = self.buckets[integer]
             assert count != -1
             self.buckets[integer] = count + 1
             if self.buckets[integer] == self.FullBucket:
                 if self.areBucketsFull():
                     return
 def read(self):
     while 1:
         readString = win32trace.blockingread()
         for ch in readString:
             integer = int(ch)
             count = self.buckets[integer]
             assert count != -1
             self.buckets[integer] = count + 1
             if self.buckets[integer] == self.FullBucket:
                 if self.areBucketsFull():
                     return
Exemple #3
0
def RunAsCollector():
    import sys
    try:
        import win32api
        win32api.SetConsoleTitle("Python Trace Collector")
    except:
        pass  # Oh well!
    win32trace.InitRead()
    print "Collecting Python Trace Output..."
    #	import win32api;win32api.DebugBreak()
    while 1:
        #		print win32trace.blockingread()
        sys.stdout.write(win32trace.blockingread())
Exemple #4
0
def RunAsCollector():
	import sys
	try:
		import win32api
		win32api.SetConsoleTitle("Python Trace Collector")
	except:
		pass # Oh well!
	win32trace.InitRead()
	print "Collecting Python Trace Output..."
#	import win32api;win32api.DebugBreak()
	while 1:
#		print win32trace.blockingread()
		sys.stdout.write(win32trace.blockingread())
Exemple #5
0
def RunAsTraceCollector():
    import sys
    try:
        import win32api
        win32api.SetConsoleTitle("Python Trace Collector")
    except:
        pass  # Oh well!
    win32trace.InitRead()
    p("Collecting Python Trace Output...", log_level=4)
    try:
        while 1:
            # a short timeout means ctrl+c works next time we wake...
            sys.stdout.write(win32trace.blockingread(500))
    except KeyboardInterrupt:
        p("}}ybCtrl+C - quitting...}}xx", log_level=3)
def RunAsCollector():
    import sys
    try:
        import win32api
        win32api.SetConsoleTitle("Python Trace Collector")
    except:
        pass  # Oh well!
    win32trace.InitRead()
    print("Collecting Python Trace Output...")
    try:
        while True:
            # a short timeout means ctrl+c works next time we wake...
            sys.stdout.write(win32trace.blockingread(500))
    except KeyboardInterrupt:
        print("Ctrl+C")
def RunAsCollector():
	import sys
	try:
		import win32api
		win32api.SetConsoleTitle("Python Trace Collector")
	except:
		pass # Oh well!
	win32trace.InitRead()
	print "Collecting Python Trace Output..."
	try:
		while 1:
			# a short timeout means ctrl+c works next time we wake...
			sys.stdout.write(win32trace.blockingread(500))
	except KeyboardInterrupt:
		print "Ctrl+C"
 def testBlockingReadUnicode(self):
     win32trace.write('\xa9opyright Syver Enstad')
     # str objects are always returned in py2k (latin-1 encoding was used
     # on unicode objects)
     self.assertEquals('\xa9opyright Syver Enstad', win32trace.blockingread())
 def testBlockingRead(self):
     win32trace.write('Syver Enstad')
     self.assertEquals('Syver Enstad', win32trace.blockingread())
Exemple #10
0
 def testBlockingRead(self):
     win32trace.write('Syver Enstad')
     self.assertEquals('Syver Enstad', win32trace.blockingread())
Exemple #11
0
 def testBlockingReadUnicode(self):
     win32trace.write('\xa9opyright Syver Enstad')
     # str objects are always returned in py2k (latin-1 encoding was used
     # on unicode objects)
     self.assertEquals('\xa9opyright Syver Enstad',
                       win32trace.blockingread())
Exemple #12
0
 def testBlockingRead(self):
     win32trace.write("Syver Enstad")
     self.assertEqual("Syver Enstad", win32trace.blockingread())
Exemple #13
0
 def testBlockingRead(self):
     win32trace.write('Syver Enstad')
     assert 'Syver Enstad' == win32trace.blockingread()
    def trace_writer(self):
        """
        Writes traces in textDebugInfo
        """

        self.ui.textDebugInfo.insertPlainText(win32trace.blockingread(50))