Ticket #3942: trac_3942_pid-interfaces.patch
| File trac_3942_pid-interfaces.patch, 1.3 kB (added by rlm, 4 months ago) |
|---|
-
a/sage/interfaces/expect.py
old new 53 53 54 54 import cleaner 55 55 56 import os 57 56 58 from sage.misc.misc import SAGE_ROOT, verbose, SAGE_TMP_INTERFACE, LOCAL_IDENTIFIER 57 59 from sage.structure.element import RingElement 58 60 BAD_SESSION = -2 59 61 60 62 failed_to_start = [] 61 63 62 tmp_expect_interface_local='%s/tmp'%SAGE_TMP_INTERFACE 64 #tmp_expect_interface_local='%s/tmp'%SAGE_TMP_INTERFACE 65 66 def tmp_expect_interface_local(): 67 return '%s/tmp'%SAGE_TMP_INTERFACE + str(os.getpid()) 63 68 64 69 ## On some platforms, e.g., windows, this can easily take 10 seconds!?! Terrible. And 65 70 ## it should not be necessary or used anyways. … … 545 550 try: 546 551 return self.__local_tmpfile 547 552 except AttributeError: 548 self.__local_tmpfile = tmp_expect_interface_local 553 self.__local_tmpfile = tmp_expect_interface_local() 549 554 return self.__local_tmpfile 550 555 551 556 def _remote_tmpdir(self):