Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert a space between value and inline comment in config files #29

Open
smosanu opened this issue Jan 27, 2022 · 0 comments
Open

Insert a space between value and inline comment in config files #29

smosanu opened this issue Jan 27, 2022 · 0 comments

Comments

@smosanu
Copy link

smosanu commented Jan 27, 2022

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 ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant