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

Add keyword arguments to writer.py:write to accommodate #412 #418

Merged
merged 1 commit into from
Jan 19, 2021

Conversation

kinverarity1
Copy link
Owner

This PR adds some keyword arguments to the writer.py:write function to accommodate the request in issue #412.

For example:

import lasio
import lasio.examples

las = lasio.examples.open("sample.las")
from sys import stdout

las.write(stdout, lhs_spacer="", len_numeric_field=-1, spacer=" ")

It adds the option len_numeric_field=-1 which is needed to constrain the column width. spacer=" " sets the width between numbers. lhs_spacer="" makes the width of the whitespace on the left hand side to zero characters.

~ASCII -----------------------------------------------------
1670.00000 123.45000 2550.00000 0.45000 123.45000 123.45000 110.20000 105.60000
1669.87500 123.45000 2550.00000 0.45000 123.45000 123.45000 110.20000 105.60000
1669.75000 123.45000 2550.00000 0.45000 123.45000 123.45000 110.20000 105.60000

@kinverarity1 kinverarity1 merged commit 40b75b3 into master Jan 19, 2021
@kinverarity1 kinverarity1 deleted the issue412 branch January 19, 2021 12:32
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

Successfully merging this pull request may close these issues.

1 participant