On Friday, July 19, 2013 7:22:48 AM UTC-6, Devyn Collier Johnson wrote:
> I have some code that I want to simplify. I know that a for-loop would
>
> work well, but can I make re.sub perform all of the below tasks at once,
> or can I write this in a way that is more efficient than using a for-loo
CoffeeScript maybe? http://jashkenas.github.com/coffee-script
--
http://mail.python.org/mailman/listinfo/python-list
On Tuesday, May 24, 2016 at 5:47:55 AM UTC-6, thomas povtal.org wrote:
...
>1: I get "RuntimeWarning: tp_compare didn't return -1 or -2 for
>exception". It's a line like:
>
>"if Foo = False:" where Foo is a global variable (global Foo).
...
Are you really using "if Foo = False:"?
If s
On Wednesday, November 19, 2014 2:08:27 PM UTC-7, Denis McMahon wrote:
> So what I'm looking for is a method to create an html5 document using "dom
> manipulation", ie:
>
> doc = new htmldocument(doctype="HTML")
> html = new html5element("html")
> doc.appendChild(html)
> head = new html5element("
On Tuesday, January 13, 2015 at 2:03:30 AM UTC-7, brice DORA wrote:
> i consume a web service that return a element whose the type is "instance".
> but this element seem be a dictionary but when i want to use it like a
> dictionary, i got some errors. so this is the element and please someone can
On Tuesday, April 15, 2014 12:32:14 PM UTC-6, Mark H. Harris wrote:
> On 4/14/14 2:32 PM, Phil Dobbin wrote:
> > On a related note, Guido announced today that there will be no 2.8 &
> > that the eol for 2.7 will be 2020.
> >
>
> Can you site the announcement?
>
> Thanks
http://hg.python.org/peps/
On Monday, April 6, 2015 at 11:26:15 PM UTC-6, rah...@gmail.com wrote:
> I have an old project which uses web ware, where i want to convert to latest
> version 3.4
>
> I am wondering whether any webware is available for python version 3.4. What
> I am seeing is the webware version 1.1.1 which is
Why is it so many, so called high tech companies, insist on the 19th
century practice of demanding an employee's physical presence in a
specific geographic location.
This is the 21st century with climate change, carbon footprints,
broadband internet, telecommuting, tele-presence, telephones, fax
m
How about:
print ('%s ' + '%-5.4f ' * 7) % ('text',1,2,3,4,5,6,7)
--
http://mail.python.org/mailman/listinfo/python-list
Regular expression are very powerful, and I use them a lot in my
paying job (unfortunately not with Python). You are however,
basically using a second programing language, which can be difficult
to master.
Does this give you the desired result?
import re
matches = re.findall('([\d\.,]+)\s*', c
Or perhaps more generically:
>>> import re
>>> string = 'scatter "http://.yahoo.com quotes and text anywhere
>>> www.google.com" "www.bing.com" or not'
>>> print re.findall(r'(?:http://|www.)[^"\s]+',string)
['http://.yahoo.com', 'www.google.com', 'www.bing.com']
--
http://mail.python
One single line regex solution would be:
re.sub(r'http\://www.mysite.org/\?page=([^"]+)',r'pages/\1.htm',html)
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 16, 10:58 am, Jason Friedman wrote:
> $ python
> Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>> "x.vsd-dir".rstrip("-dir")
>
> 'x.vs'
>
> I expected 'x.vsd' as a return value.
One way to
13 matches
Mail list logo