Re: more simple to split the string?

2014-08-07 Thread Christopher Welborn
l]/&V4NXPpCuTvY-"' partpat = re.compile(r'(\(.+\)) "(.+)" "(.+)"') partsmatch = partpat.search(s) if partsmatch is None: print('No matches.') else: print(partsmatch.groups()) # Results (a Tuple of strings): ('(\\HasNoChil

Re: beautiful soup get class info

2014-03-11 Thread Christopher Welborn
attrs={'class': 'date'}) I haven't tested it, but it's worth looking into. -- \¯\ /¯/\ \ \/¯¯\/ / / Christopher Welborn (cj) \__/\__/ / cjwelborn at live·com \__/\__/ http://welbornprod.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Simple % question

2014-02-11 Thread Christopher Welborn
ction also. -- \¯\ /¯/\ \ \/¯¯\/ / / Christopher Welborn (cj) \__/\__/ / cjwelborn at live·com \__/\__/ http://welbornprod.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.x adoption

2014-01-15 Thread Christopher Welborn
reak their site by upgrading too early (without migrating code) it's the user's fault. -- - Christopher Welborn http://welbornprod.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Constructive Criticism

2014-01-09 Thread Christopher Welborn
for one second (no need to import time again). time.sleep(1) # Example usage: print('hello') # Prints the countdown. countdown(10) sys.exit(0) -- - Christopher Welborn http://welbornprod.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help with file object

2013-12-12 Thread Christopher Welborn
move('/tmp/file2', '/tmp/file1') -- - Christopher Welborn http://welbornprod.com -- https://mail.python.org/mailman/listinfo/python-list

Re: adding values from a csv column and getting the mean. beginner help

2013-12-11 Thread Christopher Welborn
. When I saw the video at http://docopt.org my jaw dropped. I couldn't believe all of the arg parsing junk I had been writing for even the smallest scripts. The other arg parsing libs make it easier than manually doing it, but docopt is magic. -- - Christopher Welborn http://welbornpro

Re: python programming help

2013-12-09 Thread Christopher Welborn
o bad he got an answer, even worse he doesn't know what to do with it. -- - Christopher Welborn http://welbornprod.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Total Python Newbie needs geting started info.

2013-11-20 Thread Christopher Welborn
are different approaches and styles for using Gtk, so don't think my 'process' is set in stone. Someone else here may have a different view. The great thing about Gtk is the amount of control you have over everything. Large projects may require a different style than small one

Re: Bug asking for input number

2013-11-15 Thread Christopher Welborn
Sorry about my previous post, gmane is being really slow. :( I wouldn't have posted if I knew the question was already answered. -- - Christopher Welborn http://welbornprod.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug asking for input number

2013-11-15 Thread Christopher Welborn
int(s[0]) ones = int(s[2]) return abs(hundreds - ones) >= 2 prompt = 'Give me a number --> ' res = input(prompt) while not is_valid_input(res): print('\nInvalid number!: {}\n'.format(res)) res = input(prompt) ...Of course you don't have to make it a funct