mirror of
ssh://devgit.janware.com/janware/proj/jw-python
synced 2026-06-18 01:16:38 +02:00
Arguments to --irrelevant-symbols are not meant to be represented in the AST resulting from parsing.
Also, add pad() to misc.py.
Signed-off-by: Jan Lindemann <jan@janware.com>
17 lines
439 B
Python
17 lines
439 B
Python
import os, errno
|
|
|
|
def silentremove(filename): #export
|
|
try:
|
|
os.remove(filename)
|
|
except OSError as e:
|
|
if e.errno != errno.ENOENT:
|
|
raise # re-raise exception if a different error occurred
|
|
|
|
def pad(token, total_size, right_align = False):
|
|
add = total_size - len(token)
|
|
if add <= 0:
|
|
return token
|
|
space = ' ' * add
|
|
if right_align:
|
|
return space + token
|
|
return token + space
|