Changeset 2:a572d77184a3 for sage/interfaces/maxima.py
- Timestamp:
- 02/11/06 13:36:43 (7 years ago)
- Branch:
- default
- File:
-
- 1 edited
-
sage/interfaces/maxima.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sage/interfaces/maxima.py
r1 r2 365 365 # TODO: Input and output prompts in maxima can be changed by 366 366 # setting inchar and outchar.. 367 eval_using_file_cutoff = 100367 eval_using_file_cutoff = 200 368 368 self.__eval_using_file_cutoff = eval_using_file_cutoff 369 369 Expect.__init__(self, … … 371 371 prompt = '\(\%i[0-9]+\)', 372 372 command = "maxima", 373 maxread = 1, # CRUCIAL to use less buffering for maxima (or get all kinds of hangs on OS X and 64-bit machines, etc!373 maxread = 1, # CRUCIAL to use less buffering for maxima (or get all kinds of hangs on OS X and 64-bit machines, etc! 374 374 script_subdirectory = script_subdirectory, 375 375 restart_on_ctrlc = False, … … 379 379 ], 380 380 logfile = logfile, 381 eval_using_file_cutoff= 200)381 eval_using_file_cutoff=eval_using_file_cutoff ) 382 382 self._display2d = False 383 384 def _start(self): 385 # For some reason sending a single input line at startup avoids 386 # lots of weird timing issues when doing doctests. 387 Expect._start(self) 388 self(1) 383 389 384 390 # this doesn't work. … … 406 412 407 413 def _eval_line(self, line, reformat=True, allow_use_file=False): 408 line = '%s; %s; %s;'%(SAGE_START, line.rstrip().rstrip(';'), SAGE_END) 414 line = line.rstrip().rstrip(';') 415 if line == '': 416 return '' 417 line = '%s; %s; %s;'%(SAGE_START, line, SAGE_END) 409 418 if self._expect is None: 410 419 self._start() … … 822 831 if n < 1: 823 832 raise ValueError, "n (=%s) must be >= 1"%n 824 s = s elf.eval('qunit(%s)'%n).lower()833 s = str(self('qunit(%s)'%n)).lower() 825 834 r = re.compile('sqrt\(.*\)') 826 835 s = r.sub('a', s) 827 828 836 a = QuadraticField(n, 'a').gen() 829 837 return eval(s)
Note: See TracChangeset
for help on using the changeset viewer.
