Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Python threads in PSSE

I tried to implement wxPython aplication with additional thread for calculations and update wxPython progress dialog within that thread. But psse crashes all the time.

So after that i tried to run really simple multithread python script in psse and it also caused psse crash. There is simple multithread psse script

`` import threading import time

class TestThread(threading.Thread): def init(self): threading.Thread.init(self)

def run(self):
    for i in range(0, 60, 3):
        print "T2: ", i
        time.sleep(3)

TestThread().start()

for i in range(0, 60, 2): print "T1: ", i time.sleep(1) ``

So my question is does psse allow to use threads in python script?

Python threads in PSSE

I tried to implement wxPython aplication with additional thread for calculations and update wxPython progress dialog within that thread. But psse crashes all the time.

So after that i tried to run really simple multithread python script in psse and it also caused psse crash. There is simple multithread psse script

``

import threading
import time

time

class TestThread(threading.Thread): def init(self): __init__(self): threading.Thread.init(self)

threading.Thread.__init__(self)
 def run(self):
     for i in range(0, 60, 3):
         print "T2: ", i
         time.sleep(3)
TestThread().start()

TestThread().start()

for i in range(0, 60, 2): print "T1: ", i time.sleep(1) ``

So my question is does psse allow to use threads in python script?

Python threads in PSSE

I tried to implement wxPython aplication with additional thread for calculations and update wxPython progress dialog within that thread. But psse crashes all the time.

So after that i tried to run really simple multithread python script in psse and it also caused psse crash. There is simple multithread psse script

import threading
import time

class TestThread(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)

    def run(self):
        for i in range(0, 60, 3):
            print "T2: ", i
            time.sleep(3)
 TestThread().start()
 for i in range(0, 60, 2):
    print "T1: ", i
    time.sleep(1)

So my question is does psse allow to use threads in python script?