mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Removed stripping of whitespaces from script commands.
Added the capability to ignore empty lines. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37378 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
090aac89d0
commit
e4df1f08fb
@ -143,15 +143,15 @@ class CommandSourceFromFile(CommandSource):
|
||||
if self.i >= len(self.lines):
|
||||
self.loops = self.loops + 1
|
||||
if self.loops >= int(max_loops):
|
||||
os._exit(0)
|
||||
return None
|
||||
self.i = 0
|
||||
return 'Loop'
|
||||
line = self.lines[self.i]
|
||||
line = self.lines[self.i].rstrip('\n')
|
||||
self.count = self.count + 1
|
||||
self.i = self.i + 1
|
||||
#print 'Line read: <<' + line + '>>\n'
|
||||
#print '\nLine read: <<' + line + '>>\n'
|
||||
sys.stdout.write('r')
|
||||
return line.rstrip('\n').rstrip()
|
||||
return line
|
||||
|
||||
def lyx_exists():
|
||||
if lyx_pid is None:
|
||||
@ -283,6 +283,10 @@ failed = False
|
||||
while not failed:
|
||||
#os.system('echo -n LOADAVG:; cat /proc/loadavg')
|
||||
c = x.getCommand()
|
||||
if c is None:
|
||||
break
|
||||
if c == "":
|
||||
continue
|
||||
outfile.writelines(c + '\n')
|
||||
outfile.flush()
|
||||
if c[0] == '#':
|
||||
|
Loading…
Reference in New Issue
Block a user