DRAMsim3 icon indicating copy to clipboard operation
DRAMsim3 copied to clipboard

Insert a space between value and inline comment in config files

Open smosanu opened this issue 4 years ago • 0 comments

Hello! I would like to adopt the DRAMsim3 configuration files as a standard for defining memories in a python-based framework. There is one tiny issue. The python configparser has the option to ignore inline comments, but there is a bug, and it only works when the value and the comment are delimited by a space character. I tried a way around, but the easiest fix is to add a space. :)

config = configparser.ConfigParser(inline_comment_prefixes=';')
tRPRE = 1 ; read preamble
tRPRE = 1; read preamble - this fails because there is no space between 1 and ;

smosanu avatar Jan 27 '22 22:01 smosanu