Re: Suppressing newline writing to file after variable

2011-07-14 Thread Chris Angelico
On Fri, Jul 15, 2011 at 12:53 AM, Ellerbee, Edward wrote: > Holy cow, that's perfect! > > Thanks so much :) > > Would it be alright if I post my code on the list for critiquing? I'm > learning python to supplement my voice engineering position - time > consuming tasks that can be automated will ta

RE: Suppressing newline writing to file after variable

2011-07-14 Thread Ellerbee, Edward
- From: python-list-bounces+eellerbee=bbandt@python.org [mailto:python-list-bounces+eellerbee=bbandt@python.org] On Behalf Of Chris Angelico Sent: Thursday, July 14, 2011 10:39 AM To: python-list@python.org Subject: Re: Suppressing newline writing to file after variable On Fri, Jul 15, 201

Re: Suppressing newline writing to file after variable

2011-07-14 Thread Chris Angelico
On Fri, Jul 15, 2011 at 12:04 AM, Ellerbee, Edward wrote: > Hey Chris, > > I was reading over this again, trying to understand the logic (I'm a > n00b) > > Could you explain this a bit? I'd like to build this emit function, but > I still don't have a firm grasp on functions. All of my code is line

Re: Suppressing newline writing to file after variable

2011-06-28 Thread Chris Angelico
On Wed, Jun 29, 2011 at 8:56 AM, Chris Angelico wrote: >      else emit(lastprefix+tails) >  else emit(lastprefix+tails) Typo in the above code. The else needs a colon after it, both times. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Suppressing newline writing to file after variable

2011-06-28 Thread Chris Angelico
On Wed, Jun 29, 2011 at 3:32 AM, Ellerbee, Edward wrote: > How to condense a group of numbers to a wildcard list. For example: > > 252205 > 252206 > 252208 > > Condense to: > 25220[568] Assuming you have the list sorted (if not, that's the first place to start), I'd do a six-pass approach - one p

Re: Suppressing newline writing to file after variable

2011-06-28 Thread Noah Hall
On Tue, Jun 28, 2011 at 6:32 PM, Ellerbee, Edward wrote: > Thank you! > > That works perfect, I'll have to look into string formatting more. > > My next issue to solve I've been researching is: > > How to condense a group of numbers to a wildcard list. For example: > > 252205 > 252206 > 252208 > 2

RE: Suppressing newline writing to file after variable

2011-06-28 Thread Ellerbee, Edward
@gmail.com] Sent: Tuesday, June 28, 2011 12:18 PM To: Ellerbee, Edward Cc: python-list@python.org Subject: Re: Suppressing newline writing to file after variable On Tue, Jun 28, 2011 at 5:05 PM, Ellerbee, Edward wrote: > Hi all, newbie question here. I'm using python 2.7. I've built

Re: Suppressing newline writing to file after variable

2011-06-28 Thread Noah Hall
On Tue, Jun 28, 2011 at 5:05 PM, Ellerbee, Edward wrote: > Hi all, newbie question here. I'm using python 2.7. I've built my first > program to pull some info off the web, process it, and build dialpeers for a > cisco router. I have 2 problems - the first is the formatting of printing > the gather

Suppressing newline writing to file after variable

2011-06-28 Thread Ellerbee, Edward
Hi all, newbie question here. I'm using python 2.7. I've built my first program to pull some info off the web, process it, and build dialpeers for a cisco router. I have 2 problems - the first is the formatting of printing the gathered information to a file. It seems to be inserting a new line afte