Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/p/s/psychopy-HEAD/psychopy/iohub/devices/__init__.py   psychopy(Download)
                gc.enable()
                if Computer.system=='win32':
                    Computer.currentProcess.set_nice(psutil.NORMAL_PRIORITY_CLASS)
                    Computer.inHighPriorityMode=False
                elif Computer.system=='linux2' and Computer._process_original_nice_value > 0:

src/p/r/Printrun-HEAD/printrun/power/__init__.py   Printrun(Download)
    def reset_priority():
        set_nice(0 if platform.system() != "Windows" else psutil.NORMAL_PRIORITY_CLASS)
 
    def powerset_print_start(reason):
        set_priority()

src/i/o/ioHub-HEAD/iohub/devices/__init__.py   ioHub(Download)
                gc.enable()
                if Computer.system=='win32':
                    Computer.currentProcess.set_nice(psutil.NORMAL_PRIORITY_CLASS)
                    Computer.inHighPriorityMode=False
                elif Computer.system=='linux2' and Computer._process_original_nice_value > 0:

src/p/s/psutil-2.1.1/test/test_psutil.py   psutil(Download)
                p.nice(psutil.HIGH_PRIORITY_CLASS)
                self.assertEqual(p.nice(), psutil.HIGH_PRIORITY_CLASS)
                p.nice(psutil.NORMAL_PRIORITY_CLASS)
                self.assertEqual(p.nice(), psutil.NORMAL_PRIORITY_CLASS)
            finally:
                p.nice(psutil.NORMAL_PRIORITY_CLASS)
                        meth(1)
                    else:
                        meth(psutil.NORMAL_PRIORITY_CLASS)
                elif name == 'ionice':
                    meth()

src/p/s/psutil-HEAD/test/test_psutil.py   psutil(Download)
                p.set_nice(psutil.HIGH_PRIORITY_CLASS)
                self.assertEqual(p.get_nice(), psutil.HIGH_PRIORITY_CLASS)
                p.set_nice(psutil.NORMAL_PRIORITY_CLASS)
                self.assertEqual(p.get_nice(), psutil.NORMAL_PRIORITY_CLASS)
            finally:
                p.set_nice(psutil.NORMAL_PRIORITY_CLASS)
                p.set_nice(1)
            else:
                p.set_nice(psutil.NORMAL_PRIORITY_CLASS)
        except psutil.NoSuchProcess:
            pass