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
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
ction also.
--
\¯\ /¯/\
\ \/¯¯\/ / / Christopher Welborn (cj)
\__/\__/ / cjwelborn at live·com
\__/\__/ http://welbornprod.com
--
https://mail.python.org/mailman/listinfo/python-list
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
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
move('/tmp/file2', '/tmp/file1')
--
- Christopher Welborn
http://welbornprod.com
--
https://mail.python.org/mailman/listinfo/python-list
.
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
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
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
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
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
11 matches
Mail list logo