On Thu, Jul 25, 2013 at 12:26:40PM -0700, Russell Johnson wrote: > > On Jul 25, 2013, at 11:55 AM, "John Meissen" <[email protected]> wrote: > > > Un-printable characters (including cr/lf) in the data read from the file? > > That was it. I looked at the file with vi after :set list, and it had a > newline. I added: > > HOST_NAME = HOST_NAME[:-1] > and now it works.
And when someone edits the file and removes the newline it will break again. consider HOST_NAME.restrip() to remove any whitespace without touching your needed data. If this were Perl I'd say use chomp, but it's not. I found the suggestion on stackoverflow. http://stackoverflow.com/questions/275018/how-can-i-remove-chomp-a-newline-in-python -- Michael Rasmussen, Portland Oregon Be Appropriate && Follow Your Curiosity Other Adventures: http://www.jamhome.us/ or http://gplus.to/MichaelRpdx A special random fortune cookie fortune: The basic currency of the Internet is human ignorance, and, frankly, our database holds a strong cash position! ~ http://blog.okcupid.com/index.php/the-best-questions-for-first-dates/ _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
