Please check your code with PyLint or PEP8.
A lot of potential issues can be identified by these tools and make the code more easy to maintain.
I'm using Atom as editor with Atom-linter & linter-pylint plugins installed and make me help to avoid stupid Python errors.
No config file found, using default configuration
************* Module las_reader
C: 1, 0: Missing module docstring (missing-docstring)
C: 4, 0: Missing function docstring (missing-docstring)
W: 4, 0: Unused argument 'kwargs' (unused-argument)
************* Module las_reader._logging
C: 23, 0: Trailing whitespace (trailing-whitespace)
C: 26, 0: Trailing whitespace (trailing-whitespace)
C: 6, 0: Missing function docstring (missing-docstring)
W: 6,21: Redefining name 'logger' from outer scope (line 26) (redefined-outer-name)
C: 26, 0: Invalid constant name "logger" (invalid-name)
W: 27, 0: Specify string format arguments as logging function parameters (logging-not-lazy)
************* Module las_reader.las
W:203, 0: TODO: Issue #5 (fixme)
C: 62, 0: Exactly one space required after comma
("VERS", Metadata("VERS", "", 2.0, "CWLS log ASCII Standard -VERSION 2.0")),
^ (bad-whitespace)
C: 63, 0: Exactly one space required after comma
("WRAP", Metadata("WRAP", "", "NO", "One line per depth step")),
^ (bad-whitespace)
C: 64, 0: Exactly one space required after comma
("DLM", Metadata("DLM", "", "SPACE", "Column Data Section Delimiter"))]),
^ (bad-whitespace)
C: 66, 0: Exactly one space required after comma
("STRT", Metadata("STRT", "m", numpy.nan, "START DEPTH")),
^ (bad-whitespace)
C: 67, 0: Exactly one space required after comma
("STOP", Metadata("STOP", "m", numpy.nan, "STOP DEPTH")),
^ (bad-whitespace)
C: 68, 0: Exactly one space required after comma
("STEP", Metadata("STEP", "m", numpy.nan, "STEP")),
^ (bad-whitespace)
C: 69, 0: Exactly one space required after comma
("COMP", Metadata("NULL", "", -9999.25, "NULL VALUE")),
^ (bad-whitespace)
C: 70, 0: Exactly one space required after comma
("COMP", Metadata("NULL", "", -9999.25, "COMPANY")),
^ (bad-whitespace)
C: 71, 0: Exactly one space required after comma
("WELL", Metadata("NULL", "", -9999.25, "WELL")),
^ (bad-whitespace)
C: 72, 0: Exactly one space required after comma
("FLD", Metadata("NULL", "", -9999.25, "FIELD")),
^ (bad-whitespace)
C: 72, 0: Exactly one space required after comma
("FLD", Metadata("NULL", "", -9999.25, "FIELD")),
^ (bad-whitespace)
C: 73, 0: Exactly one space required after comma
("LOC", Metadata("NULL", "", -9999.25, "LOCATION")),
^ (bad-whitespace)
C: 73, 0: Exactly one space required after comma
("LOC", Metadata("NULL", "", -9999.25, "LOCATION")),
^ (bad-whitespace)
C: 74, 0: Exactly one space required after comma
("PROV", Metadata("NULL", "", -9999.25, "PROVINCE")),
^ (bad-whitespace)
C: 75, 0: Exactly one space required after comma
("CNTY", Metadata("NULL", "", -9999.25, "COUNTY")),
^ (bad-whitespace)
C: 76, 0: Exactly one space required after comma
("STAT", Metadata("NULL", "", -9999.25, "STATE")),
^ (bad-whitespace)
C: 77, 0: Exactly one space required after comma
("CTRY", Metadata("NULL", "", -9999.25, "COUNTRY")),
^ (bad-whitespace)
C: 78, 0: Exactly one space required after comma
("SRVC", Metadata("NULL", "", -9999.25, "SERVICE COMPANY")),
^ (bad-whitespace)
C: 79, 0: Exactly one space required after comma
("DATE", Metadata("NULL", "", -9999.25, "DATE")),
^ (bad-whitespace)
C: 80, 0: Exactly one space required after comma
("UWI", Metadata("NULL", "", -9999.25, "UNIQUE WELL ID")),
^ (bad-whitespace)
C: 80, 0: Exactly one space required after comma
("UWI", Metadata("NULL", "", -9999.25, "UNIQUE WELL ID")),
^ (bad-whitespace)
C: 81, 0: Exactly one space required after comma
("API", Metadata("NULL", "", -9999.25, "API NUMBER"))
^ (bad-whitespace)
C: 81, 0: Exactly one space required after comma
("API", Metadata("NULL", "", -9999.25, "API NUMBER"))
^ (bad-whitespace)
C:120, 0: Unnecessary parens after 'not' keyword (superfluous-parens)
C:122, 0: Trailing whitespace (trailing-whitespace)
C:182, 0: Line too long (132/100) (line-too-long)
C:197, 0: Line too long (101/100) (line-too-long)
C:204, 0: Exactly one space required after comma
self.version['WRAP'] = Metadata('WRAP', '', 'NO', 'One line per depth step')
^ (bad-whitespace)
C:205, 0: Trailing whitespace (trailing-whitespace)
C:238, 0: Wrong hanging indentation.
l_left - len(wm_leftmost))
| ^ (bad-continuation)
C:242, 0: Wrong hanging indentation.
l_left - len(wm_leftmost))
| ^ (bad-continuation)
C:258, 0: Wrong hanging indentation.
**cm.todict()).ljust(l_mnem_unit)
| ^ (bad-continuation)
C:275, 0: Wrong hanging indentation.
**pm.todict()).ljust(l_mnem_unit)
| ^ (bad-continuation)
C:385, 0: Trailing whitespace (trailing-whitespace)
C:493, 0: Trailing whitespace (trailing-whitespace)
C:530, 0: Final newline missing (missing-final-newline)
W:441, 0: Anomalous backslash in string: '\d'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
W:441, 0: Anomalous backslash in string: '\.'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
W:441, 0: Anomalous backslash in string: '\d'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
W:441, 0: Anomalous backslash in string: '\.'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
W:441, 0: Anomalous backslash in string: '\d'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
W:442, 0: Anomalous backslash in string: '\d'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
W: 17, 0: No exception type(s) specified (bare-except)
F: 16, 4: Unable to import 'cStringIO' (import-error)
F: 25, 4: Unable to import 'StringIO' (import-error)
F: 28, 0: Unable to import 'namedlist' (import-error)
F: 29, 0: Unable to import 'numpy' (import-error)
C: 32, 0: Invalid constant name "logger" (invalid-name)
C: 36, 0: Invalid constant name "Metadata" (invalid-name)
C: 37, 0: Invalid constant name "Curve" (invalid-name)
C: 38, 0: Invalid constant name "Parameter" (invalid-name)
C: 42, 0: Missing class docstring (missing-docstring)
C: 44, 8: Invalid variable name "l" (invalid-name)
C: 46,12: Invalid variable name "s" (invalid-name)
C: 48, 8: Invalid variable name "s" (invalid-name)
C: 52, 4: Invalid attribute name "_d" (invalid-name)
C: 52, 4: Missing method docstring (missing-docstring)
C:123, 4: Missing method docstring (missing-docstring)
C:124, 8: Invalid variable name "f" (invalid-name)
C:145, 8: Invalid variable name "n" (invalid-name)
E:146,23: Instance of 'tuple' has no 'name' member (no-member)
C:155,15: Invalid variable name "c" (invalid-name)
C:160,15: Invalid variable name "c" (invalid-name)
C:161,12: Invalid variable name "d" (invalid-name)
W:164,16: Specify string format arguments as logging function parameters (logging-not-lazy)
C:173, 4: Missing method docstring (missing-docstring)
E:174,29: Instance of 'tuple' has no 'data' member (no-member)
E:176, 4: Method should have "self" as first argument (no-self-argument)
E:185,58: Undefined variable 'unit' (undefined-variable)
E:188,58: Undefined variable 'unit' (undefined-variable)
C:190, 4: Missing method docstring (missing-docstring)
R:190, 4: Too many local variables (30/15) (too-many-locals)
C:209,12: Invalid variable name "vm" (invalid-name)
C:214,12: Invalid variable name "vm" (invalid-name)
E:218,25: Undefined variable 'VERS_FMT' (undefined-variable)
C:227,12: Invalid variable name "wm" (invalid-name)
E:228,30: Undefined variable 'WELL_REV_MNEMONICS' (undefined-variable)
C:234,12: Invalid variable name "wm" (invalid-name)
E:236,30: Undefined variable 'WELL_REV_MNEMONICS' (undefined-variable)
C:248, 8: Invalid variable name "l_API_code" (invalid-name)
C:249,12: Invalid variable name "cm" (invalid-name)
E:250,55: Instance of 'tuple' has no 'todict' member (no-member)
C:253,12: Invalid variable name "s_API_code" (invalid-name)
E:253,29: Instance of 'tuple' has no 'API_code' member (no-member)
C:255,16: Invalid variable name "l_API_code" (invalid-name)
C:256,12: Invalid variable name "cm" (invalid-name)
E:258,26: Instance of 'tuple' has no 'todict' member (no-member)
E:259,26: Instance of 'tuple' has no 'API_code' member (no-member)
E:260,57: Instance of 'tuple' has no 'descr' member (no-member)
C:266,12: Invalid variable name "pm" (invalid-name)
C:273,12: Invalid variable name "pm" (invalid-name)
E:287,39: Instance of 'tuple' has no 'data' member (no-member)
C:290, 8: Invalid argument name "n" (invalid-name)
C:290, 8: Invalid argument name "l" (invalid-name)
C:290, 8: Missing function docstring (missing-docstring)
R:190, 4: Too many branches (24/12) (too-many-branches)
C:302, 4: Missing method docstring (missing-docstring)
E:304,15: Instance of 'tuple' has no 'name' member (no-member)
E:308,17: Bad first argument 'OrderedDictionary' given to super() (bad-super-call)
C:317, 4: Missing method docstring (missing-docstring)
C:320, 4: Missing method docstring (missing-docstring)
C:323, 4: Missing method docstring (missing-docstring)
C:327, 4: Missing method docstring (missing-docstring)
C:328, 8: Invalid variable name "d" (invalid-name)
C:329,12: Invalid variable name "di" (invalid-name)
C:330,19: Invalid variable name "v" (invalid-name)
C:335, 4: Missing method docstring (missing-docstring)
W:335,23: Unused argument 'value' (unused-argument)
R:335, 4: Method could be a function (no-self-use)
C:339, 4: Missing method docstring (missing-docstring)
C:344, 0: Missing class docstring (missing-docstring)
C:349, 0: Missing class docstring (missing-docstring)
C:357, 4: Missing method docstring (missing-docstring)
C:367, 4: Missing method docstring (missing-docstring)
C:384, 4: Missing method docstring (missing-docstring)
C:388, 4: Missing method docstring (missing-docstring)
C:390, 8: Invalid variable name "d" (invalid-name)
W:395,12: No exception type(s) specified (bare-except)
C:401, 4: Missing method docstring (missing-docstring)
C:403, 8: Invalid variable name "l" (invalid-name)
W:407,12: No exception type(s) specified (bare-except)
C:413, 4: Missing method docstring (missing-docstring)
C:414, 8: Invalid variable name "s" (invalid-name)
C:418,12: Invalid variable name "s" (invalid-name)
W:420,12: Specify string format arguments as logging function parameters (logging-not-lazy)
W:421,12: Specify string format arguments as logging function parameters (logging-not-lazy)
W:427,12: Specify string format arguments as logging function parameters (logging-not-lazy)
W:428, 8: Specify string format arguments as logging function parameters (logging-not-lazy)
C:432, 4: Missing method docstring (missing-docstring)
C:439, 8: Invalid variable name "s" (invalid-name)
C:440, 8: Invalid variable name "s" (invalid-name)
C:441, 8: Invalid variable name "s" (invalid-name)
C:442, 8: Invalid variable name "s" (invalid-name)
C:447, 0: Missing class docstring (missing-docstring)
C:471, 8: Invalid variable name "r" (invalid-name)
C:474, 4: Invalid argument name "x" (invalid-name)
C:474, 4: Missing method docstring (missing-docstring)
W:479, 8: No exception type(s) specified (bare-except)
W:482,12: No exception type(s) specified (bare-except)
R:474, 4: Method could be a function (no-self-use)
C:485, 4: Missing method docstring (missing-docstring)
C:492, 4: Missing method docstring (missing-docstring)
R:492, 4: Method could be a function (no-self-use)
C:496, 4: Missing method docstring (missing-docstring)
C:501, 0: Missing function docstring (missing-docstring)
C:502, 4: Invalid variable name "d" (invalid-name)
C:504, 4: Invalid variable name "m" (invalid-name)
C:510, 0: Missing function docstring (missing-docstring)
C:517,12: Invalid variable name "f" (invalid-name)
C:521,12: Invalid variable name "f" (invalid-name)
C:523, 8: Invalid variable name "f" (invalid-name)
W:528, 8: No exception type(s) specified (bare-except)
************* Module las_reader.las2excel
C: 6, 0: Trailing whitespace (trailing-whitespace)
C: 24, 0: Trailing whitespace (trailing-whitespace)
C: 29, 0: Trailing whitespace (trailing-whitespace)
C: 35, 0: Trailing whitespace (trailing-whitespace)
C: 36, 0: Trailing whitespace (trailing-whitespace)
C: 38, 0: Final newline missing (missing-final-newline)
C: 1, 0: Missing module docstring (missing-docstring)
C: 10, 0: Missing function docstring (missing-docstring)
C: 25, 4: Invalid variable name "l" (invalid-name)
E: 26,16: Undefined variable 'core' (undefined-variable)
C: 30, 0: Missing function docstring (missing-docstring)
Report
======
396 statements analysed.
Statistics by type
------------------
+---------+-------+-----------+-----------+------------+---------+
|type |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module |4 |NC |NC |50.00 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
|class |5 |NC |NC |20.00 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
|method |31 |NC |NC |29.03 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
|function |7 |NC |NC |0.00 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
External dependencies
---------------------
::
las_reader
\-las (las_reader,las_reader.las2excel)
Raw metrics
-----------
+----------+-------+------+---------+-----------+
|type |number |% |previous |difference |
+==========+=======+======+=========+===========+
|code |459 |84.38 |NC |NC |
+----------+-------+------+---------+-----------+
|docstring |39 |7.17 |NC |NC |
+----------+-------+------+---------+-----------+
|comment |11 |2.02 |NC |NC |
+----------+-------+------+---------+-----------+
|empty |35 |6.43 |NC |NC |
+----------+-------+------+---------+-----------+
Duplication
-----------
+-------------------------+------+---------+-----------+
| |now |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines |0 |NC |NC |
+-------------------------+------+---------+-----------+
|percent duplicated lines |0.000 |NC |NC |
+-------------------------+------+---------+-----------+
Messages by category
--------------------
+-----------+-------+---------+-----------+
|type |number |previous |difference |
+===========+=======+=========+===========+
|convention |125 |NC |NC |
+-----------+-------+---------+-----------+
|refactor |5 |NC |NC |
+-----------+-------+---------+-----------+
|warning |22 |NC |NC |
+-----------+-------+---------+-----------+
|error |17 |NC |NC |
+-----------+-------+---------+-----------+
% errors / warnings by module
-----------------------------
+---------------------+------+--------+---------+-----------+
|module |error |warning |refactor |convention |
+=====================+======+========+=========+===========+
|las_reader.las |94.12 |86.36 |100.00 |87.20 |
+---------------------+------+--------+---------+-----------+
|las_reader.las2excel |5.88 |0.00 |0.00 |8.00 |
+---------------------+------+--------+---------+-----------+
|las_reader._logging |0.00 |9.09 |0.00 |3.20 |
+---------------------+------+--------+---------+-----------+
|las_reader.__init__ |0.00 |4.55 |0.00 |1.60 |
+---------------------+------+--------+---------+-----------+
Messages
--------
+------------------------------+------------+
|message id |occurrences |
+==============================+============+
|invalid-name |46 |
+------------------------------+------------+
|missing-docstring |35 |
+------------------------------+------------+
|bad-whitespace |24 |
+------------------------------+------------+
|trailing-whitespace |11 |
+------------------------------+------------+
|no-member |9 |
+------------------------------+------------+
|undefined-variable |6 |
+------------------------------+------------+
|logging-not-lazy |6 |
+------------------------------+------------+
|bare-except |6 |
+------------------------------+------------+
|anomalous-backslash-in-string |6 |
+------------------------------+------------+
|import-error |4 |
+------------------------------+------------+
|bad-continuation |4 |
+------------------------------+------------+
|no-self-use |3 |
+------------------------------+------------+
|unused-argument |2 |
+------------------------------+------------+
|missing-final-newline |2 |
+------------------------------+------------+
|line-too-long |2 |
+------------------------------+------------+
|too-many-locals |1 |
+------------------------------+------------+
|too-many-branches |1 |
+------------------------------+------------+
|superfluous-parens |1 |
+------------------------------+------------+
|redefined-outer-name |1 |
+------------------------------+------------+
|no-self-argument |1 |
+------------------------------+------------+
|fixme |1 |
+------------------------------+------------+
|bad-super-call |1 |
+------------------------------+------------+
Global evaluation
-----------------
Your code has been rated at 4.02/10