Hello
I am using regular expressions to grab URL's from a string(of HTML
code). I am getting on very well & I seem to be grabbing the full URL
[b]but[/b]
I also get a '"' character at the end of it. Do you know how I can get
rid of the '"' char at the end of my URL
[b]Example of problem:[/b]
[quo
Anyone responding to this thread, please delete python-dev and
gmane.comp.python.dev from the followup list of where your response is
sent. It should never have been part of this overly cross-posted thread.
--
http://mail.python.org/mailman/listinfo/python-list
On 30Apr2010 07:15, Stefan Behnel wrote:
| Cameron Simpson, 30.04.2010 00:47:
| >Here's a function from a script I wrote to bulk edit a web site. I was
| >replacing OBJECT and EMBED nodes with modern versions:
| >
| > def recurse(node):
| > global didmod
| > [...]
| > didmod=Tr
Cameron Simpson, 30.04.2010 00:47:
Here's a function from a script I wrote to bulk edit a web site. I was
replacing OBJECT and EMBED nodes with modern versions:
def recurse(node):
global didmod
[...]
didmod=True
continue
recurse(O)
>
The calling end
dmtr, 30.04.2010 04:57:
I'm referring to xmlns/URI prefixes. Here's a code example:
from xml.etree.cElementTree import iterparse
from cStringIO import StringIO
xml = """http://www.very_long_url.com";>"""
for event, elem in iterparse(StringIO(xml)): print event, elem
The output is:
endh
Hi Robert,
On Thu, 2010-04-29 at 11:56 -0500, Robert Kern wrote:
> On 4/29/10 11:23 AM, Dietrich Bollmann wrote:
> > Hi,
> >
> > I would like to represent graphs as cyclic dictionaries in Python.
> >
> > The python code for the graphs is generated by some other program
> > (written in lisp) and I
On Apr 29, 2010, at 10:22 PM, elsa wrote:
> Hi people,
>
> I'm having a problem getting the info I need out of a file.
>
> I've opened the file with f=open('myFile','r').
>
> Next, I take out the first line with line=f.readline()
>
> line looks like this:
>
> '83927 300023_25_5_09_FL 9086 91
Thanks for the suggestion. It turns out that the problem was a copy of
fowprof.dll, or something like that, which win7 included in my
compiled program's dir. I was testing the program on xp, which has its
own version of this dll, so deleting the dll from the dir solved it.
On 4/29/10, alex23 wrot
Hi Chris and Garrick :)
On Thu, 2010-04-29 at 18:09 +, Garrick P wrote:
> Chris Rebert rebertia.com> writes:
>
> ...
>
> > If you want a prettier print, you could try serializing it to YAML and
> > printing the result out; YAML has syntax for "tags".
> >
> > Cheers,
> > Chris
> > --
> > ht
On Thu, 29 Apr 2010 04:12:29 -0700, Astley Le Jasper wrote:
> ... oh ... that simple. Now I feel dumb.
It's really difficult to tell what you're talking about, but I assume
that you're talking about Chris' solution:
x or y or z
Be careful, as Chris' solution is rather risky (read his disclaime
On Fri, 30 Apr 2010 05:41:26 +1000, Lie Ryan wrote:
> On 04/29/10 20:40, Gregory Ewing wrote:
>> Lie Ryan wrote:
>>> No, the implicit concatenation is there because Python didn't always
>>> have triple quoted string. Nowadays it's an artifact and triple quoted
>>> string is much preferred.
>>
>>
Alex Hall wrote:
> I am stumped. The compiled version of my project works on my pc, but
> when I put it on a thumb drive and try it on a laptop without python
> installed I get this:
> ImportError: DLL load failed: The specified procedure could not be found.
Are you using py2exe? If so, are you i
On Apr 30, 8:43 am, John Doe wrote:
> I would very much like to stop code from expanding automatically.
> Like when several consecutive lines of code have a plus sigh in the
> left margin, meaning they are collapsed, when I go to copy or cut one
> of those collapsed lines, the collapsed lines that
I'm referring to xmlns/URI prefixes. Here's a code example:
from xml.etree.cElementTree import iterparse
from cStringIO import StringIO
xml = """http://www.very_long_url.com";>"""
for event, elem in iterparse(StringIO(xml)): print event, elem
The output is:
end http://www.very_long_url.com}ch
On 30.04.2010 04:22, * elsa:
Hi people,
I'm having a problem getting the info I need out of a file.
I've opened the file with f=open('myFile','r').
Next, I take out the first line with line=f.readline()
line looks like this:
'83927 300023_25_5_09_FL 9086 9134 F3LQ2BE01AQLXF 1 49 + 80
ZA8Z89H
Hi people,
I'm having a problem getting the info I need out of a file.
I've opened the file with f=open('myFile','r').
Next, I take out the first line with line=f.readline()
line looks like this:
'83927 300023_25_5_09_FL 9086 9134 F3LQ2BE01AQLXF 1 49 + 80
ZA8Z89HIB7M'
I then split it into par
On 30.04.2010 01:29, * Carl Banks:
On Apr 28, 11:16 am, "Alf P. Steinbach" wrote:
On 28.04.2010 18:54, * Lie Ryan:
Python have triple-quoted string when you want to include large amount
of text;
Yes, that's been mentioned umpteen times in this thread, including the *very
first* quoted sent
Hi all,
I am stumped. The compiled version of my project works on my pc, but
when I put it on a thumb drive and try it on a laptop without python
installed I get this:
Traceback (most recent call last):
File "sw.pyw", line 3, in
File "modes\arm.pyc", line 4, in
File "dependencies\wmi1_3\wm
You could use dictionary of lists
test = {
A: [1, 3],
B: [2, 4]
}
print test[A]
[1, 3]
test[A].append(5)
print test[A]
[1, 3, 5]
Cheers,
Fil
_
From: melbourne-pug-bounces+filipz=3g.nec.com...@python.org
[mailto:melbourne-pug-bounces+fil
Chris Rebert wrote:
On Thu, Apr 29, 2010 at 1:06 PM, Alan Harris-Reid
wrote:
Hi there,
I want to send an email with an attachment using the following code (running
under Python 3.1, greatly simplified to show example)
from email.mime.multipart import MIMEMultipart
from email.mime.text
On Apr 28, 11:16 am, "Alf P. Steinbach" wrote:
> On 28.04.2010 18:54, * Lie Ryan:
> > Python have triple-quoted string when you want to include large amount
> > of text;
>
> Yes, that's been mentioned umpteen times in this thread, including the *very
> first* quoted sentence above.
>
> It's IMHO
Mirko Vogt wrote:
Hey,
is there a way to use python2.6 without having used the installation
routine?
When I install python2.6 and copy over the python-directory (C:\programs
\python2.6) to another windows host and trying to execute python.exe
there, I get an error that python26.dll could not be
On Apr 29, 5:21 pm, Laszlo Nagy wrote:
> I have some ten thousand rows in a table. E.g.
>
> columns = ["color","size","weight","value"]
> rows = [
> [ "Yellow", "Big", 2, 4 ],
> [ "Blue", "Big", 3, -4 ],
> [ "Blue", "Small", 10, 55 ],
> ...
> ]
>
> Some columns are dimensions,
On Apr 29, 4:32 pm, Terry Reedy wrote:
>
> Try Movable Python - The Portable Python Distribution.
> www.voidspace.org.uk/python/movpy/
You could also try Portable Python, which is somewhat newer and has
2.5, 2.6, and 3.0:
http://www.portablepython.com/
John
--
http://mail.python.org/mailman/
Laszlo Nagy wrote:
I have some ten thousand rows in a table. E.g.
columns = ["color","size","weight","value"]
rows = [
[ "Yellow", "Big", 2, 4 ],
[ "Blue", "Big", 3, -4 ],
[ "Blue", "Small", 10, 55 ],
...
]
Some columns are dimensions, others are measures. I want to convert this
On 29Apr2010 05:03, james_027 wrote:
| On Apr 29, 5:31 am, Cameron Simpson wrote:
| > On 28Apr2010 22:03, Daniel Fetchinson wrote:
| > | > Any idea how I can replace words in a html file? Meaning only the
| > | > content will get replace while the html tags, javascript, & css are
| > | > remain
Komodo Edit 5.1
I would very much like to stop code from expanding automatically.
Like when several consecutive lines of code have a plus sigh in the
left margin, meaning they are collapsed, when I go to copy or cut one
of those collapsed lines, the collapsed lines that follow that line
automa
I have some ten thousand rows in a table. E.g.
columns = ["color","size","weight","value"]
rows = [
[ "Yellow", "Big", 2, 4 ],
[ "Blue", "Big", 3, -4 ],
[ "Blue", "Small", 10, 55 ],
...
]
Some columns are dimensions, others are measures. I want to convert this
to an indexed vers
On Apr 29, 11:49 am, Tim Chase wrote:
> On 04/29/2010 01:00 PM, goldtech wrote:
>
> > Trying to start out with simple things but apparently there's some
> > basics I need help with. This works OK:
> import re
> p = re.compile('(ab*)(sss)')
> m = p.match( 'absss' )
>
> f=r'abss'
Le 29/04/2010 18:33, Dodo a écrit :
Le 29/04/2010 17:07, Antoine Pitrou a écrit :
Le Thu, 29 Apr 2010 12:53:53 +0200, Dodo a écrit :
@Antoine : It not sys.stdout.buffer.write but sys.stdout.write()
instead. But it still doesn't work, now I have empty content
Let me insist: please use sys.std
Le 29/04/2010 22:21, Antoine Pitrou a écrit :
Le Thu, 29 Apr 2010 18:33:08 +0200, Dodo a écrit :
Oh, I tested on my windows machine avec sys.stdout.buffer.write() didn't
work.
I just tested on my linux server, and it works
So, let's modify the script
sys.stdout.buffer.write
News123 wrote:
Mumbling to myself, perhaps somebody else is interested.
Yes I am.
News123 wrote:
Hi,
I wanted to know who can recommend a good module/library, that allows to
modify an Open Office spreadsheet.
One can assume, that Open Office is installed on the host.
Following url give
On 29-Apr-10 14:46 PM, MRAB wrote:
Bill Jordan wrote:
Hey guys,
I am sorry if this is not the right list to post some questions. I
have a simple question please and would appreciate some answers as I
am new to Python.
I have 2 D array: test = [[A,1],[B,2],[A,3][B,4]]
I want to arrang this arra
On Fri, Apr 30, 2010 at 5:53 AM, gert wrote:
> How do you upload a plain text .py file as a source file?
http://lmgtfy.com/?q=python+distutils+tutorial
--
http://mail.python.org/mailman/listinfo/python-list
I have a bunch of 3rd party packages loaded in my site-packages
folder. Will these packages be affected if I upgrade my Python
(32-bit Windows) installation from 2.6.4 to 2.6.5?
Are there any gotchas I should watch out for when performing this
type of upgrade? Does it ever make sense (and is it ev
On 29/04/2010 17:22, Michael Torrie wrote:
> On 04/29/2010 10:03 AM, Wolfnoliir wrote:
>> On 29/04/2010 17:03, Joe Riopel wrote:
>>> On Thu, Apr 29, 2010 at 11:43 AM, Wolfnoliir wrote:
I would like to add a method to the gtk.TextBuffer class to save a text
buffer to a file, but I get an
On Thu, Apr 29, 2010 at 1:06 PM, Alan Harris-Reid
wrote:
> Hi there,
>
> I want to send an email with an attachment using the following code (running
> under Python 3.1, greatly simplified to show example)
>
> from email.mime.multipart import MIMEMultipart
> from email.mime.text import MIMETex
On 4/29/2010 11:25 AM, Mirko Vogt wrote:
Hey,
is there a way to use python2.6 without having used the installation
routine?
When I install python2.6 and copy over the python-directory (C:\programs
\python2.6) to another windows host and trying to execute python.exe
there, I get an error that py
Mumbling to myself, perhaps somebody else is interested.
News123 wrote:
> Hi,
>
>
> I wanted to know who can recommend a good module/library, that allows to
> modify an Open Office spreadsheet.
>
> One can assume, that Open Office is installed on the host.
>
>
Following url gives a small intr
On Thu, Apr 29, 2010 at 12:01 PM, Michel Claveau - MVP
wrote:
> Hi!
>
>> print x or y or z
>> If none of the potential values are considered boolean false
>
> But :
> a=None
> b=False
> c=None
> print a or b or c
> > None
Consider:
def read_default_from_config(cfg_file):
#pseudocode
On 4/29/2010 5:38 AM, Karin Lagesen wrote:
Hello.
I have approx 83 million strings, all 14 characters long. I need to be
able to take another string and find out whether this one is present
within the 83 million strings.
If the 'other string' is also 14 chars, so that you are looking for
exac
Le Thu, 29 Apr 2010 18:33:08 +0200, Dodo a écrit :
> Oh, I tested on my windows machine avec sys.stdout.buffer.write() didn't
> work.
> I just tested on my linux server, and it works
>
> So, let's modify the script
>
> sys.stdout.buffer.write( f.read() )
> sys.stdo
On 04/29/10 16:34, Steven D'Aprano wrote:
> On Thu, 29 Apr 2010 02:16:46 +0100, MRAB wrote:
>
>> Steven D'Aprano wrote:
>>> On Thu, 29 Apr 2010 06:17:42 +1000, Lie Ryan wrote:
>>>
> Consider that the concatenation language feature probably is there
> because it's useful (e.g. it preserves
Hi there,
I want to send an email with an attachment using the following code
(running under Python 3.1, greatly simplified to show example)
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
msg = MIMEMultipart()
msg['From'] = from_addr
msg['To
cjw wrote:
> On 28-Apr-10 23:18 PM, Kushal Kumaran wrote:
>> On Thu, Apr 29, 2010 at 5:46 AM, News123 wrote:
>>> Hi,
>>>
>>> I'm making first attempts to modify a few cells of an openoffice
>>> spreadsheet.
>>>
>>
>> Try the xlrd and xlwt modules, and the documentation at
>> http://www.python-exce
How do you upload a plain text .py file as a source file?
I get
Error processing form
invalid distribution file
--
http://mail.python.org/mailman/listinfo/python-list
On 04/29/10 20:40, Gregory Ewing wrote:
> Lie Ryan wrote:
>> No, the implicit concatenation is there because Python didn't always
>> have triple quoted string. Nowadays it's an artifact and triple quoted
>> string is much preferred.
>
> I don't agree. I often use implicit concatenation when I'm
>
On 4/29/2010 2:30 AM, mathan kumar wrote:
I m trying port pyfsevents coded in python2.6 to python3.1.
Specifying system and compiler/version might help responders.
--
http://mail.python.org/mailman/listinfo/python-list
Re!
Look also :
>>> print False or None
None
>>> print None or False
False
--
MCI
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
> print x or y or z
> If none of the potential values are considered boolean false
But :
a=None
b=False
c=None
print a or b or c
> None
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 29, 7:23 pm, Miki wrote:
> > Is there a way to print a query for logging purpose as it was or will
> > be sent to database, if I don't escape values of query by myself?
> > ...
> > Im using psycopg2, btw
>
> http://initd.org/psycopg/docs/advanced.html#connection-and-cursor-fac...
>
> HTH,
>
On 04/29/2010 01:00 PM, goldtech wrote:
Trying to start out with simple things but apparently there's some
basics I need help with. This works OK:
import re
p = re.compile('(ab*)(sss)')
m = p.match( 'absss' )
f=r'abss'
f
'abss'
m = p.match( f )
m.group(0)
Traceback (most recent call last):
Bill Jordan wrote:
Hey guys,
I am sorry if this is not the right list to post some questions. I have
a simple question please and would appreciate some answers as I am new
to Python.
I have 2 D array: test = [[A,1],[B,2],[A,3][B,4]]
I want to arrang this array in different arrays so each on
goldtech wrote:
Hi,
Trying to start out with simple things but apparently there's some
basics I need help with. This works OK:
import re
p = re.compile('(ab*)(sss)')
m = p.match( 'absss' )
m.group(0)
'absss'
m.group(1)
'ab'
m.group(2)
'sss'
...
But two questions:
How can I operate a regex
Chris Rebert rebertia.com> writes:
...
> If you want a prettier print, you could try serializing it to YAML and
> printing the result out; YAML has syntax for "tags".
>
> Cheers,
> Chris
> --
> http://blog.rebertia.com
Works fairly well.
$ python
Python 2.6.4 (r264:75706, Mar 1 2010, 14:28:0
Le 29/04/2010 20:00, goldtech a écrit :
Hi,
Trying to start out with simple things but apparently there's some
basics I need help with. This works OK:
import re
p = re.compile('(ab*)(sss)')
m = p.match( 'absss' )
m.group(0)
'absss'
m.group(1)
'ab'
m.group(2)
'sss'
...
But two questions:
Ho
Hi,
Trying to start out with simple things but apparently there's some
basics I need help with. This works OK:
>>> import re
>>> p = re.compile('(ab*)(sss)')
>>> m = p.match( 'absss' )
>>> m.group(0)
'absss'
>>> m.group(1)
'ab'
>>> m.group(2)
'sss'
...
But two questions:
How can I operate a regex
Hey guys,
I am sorry if this is not the right list to post some questions. I have a
simple question please and would appreciate some answers as I am new to Python.
I have 2 D array: test = [[A,1],[B,2],[A,3][B,4]]
I want to arrang this array in different arrays so each one will have what is
att
> I have approx 83 million strings, all 14 characters long. I need to be
> able to take another string and find out whether this one is present
> within the 83 million strings.
Have a look at the shelve module.
If you want to write the algorithm yourself, I suggest
http://en.wikipedia.org/wiki/Tr
On Fri, Apr 30, 2010 at 3:00 AM, Mark Olbert
wrote:
> Okay. But I compiled & installed gdbm from source obtained from the gnu
> archive, so I presume the necessary files would be included
> (this is on a linux system).
Perhaps check where gdbm has installed it's development sources
and whether o
> Is there a way to print a query for logging purpose as it was or will
> be sent to database, if I don't escape values of query by myself?
> ...
> Im using psycopg2, btw
http://initd.org/psycopg/docs/advanced.html#connection-and-cursor-factories
HTH,
--
Miki
http://pythonwise.blogspot.com
--
ht
> Is it possible to include python26.dll in the application folder or
tell
> python not to look in C:\windows\system32 for its library?
The needed DLLs should be in the PATH. The simplest way is to place
all
the required DLLs next to the python executable.
You can use http://www.dependencywalker.
Thank you to posters for help to my question. Seems I had trouble with
triple quotes strings in the PythonWin shell. But using the Idle shell
things work as expected. But this is probably another issue...any way,
w/Idle's shell I got the "action" regarding multiline strings I
expected.
--
http://m
On Thu, 29 Apr 2010 15:51:26 +1000, James Mills
wrote:
>On Thu, Apr 29, 2010 at 1:12 PM, Mark Olbert
> wrote:
>> I'm getting an error message about make not being able to find the necessary
>> bits to build modules related to _dbm. Yet I have
>> libgdbm installed installed on my system. Suggest
On Thu, Apr 29, 2010 at 9:23 AM, Dietrich Bollmann wrote:
> Hi,
>
> I would like to represent graphs as cyclic dictionaries in Python.
>
> The python code for the graphs is generated by some other program
> (written in lisp) and I wonder what would be the best syntax for writing
> the cycles in Py
On 4/29/10 11:23 AM, Dietrich Bollmann wrote:
Hi,
I would like to represent graphs as cyclic dictionaries in Python.
The python code for the graphs is generated by some other program
(written in lisp) and I wonder what would be the best syntax for writing
the cycles in Python?
You can impleme
On Apr 29, 2010, at 12:01 PM, someone wrote:
Hello!
Is there a way to print a query for logging purpose as it was or will
be sent to database, if I don't escape values of query by myself?
cursor.execute(query, [id, somestring])
I could print query and values separate, but it would be great,
Le 29/04/2010 17:07, Antoine Pitrou a écrit :
Le Thu, 29 Apr 2010 12:53:53 +0200, Dodo a écrit :
@Antoine : It not sys.stdout.buffer.write but sys.stdout.write()
instead. But it still doesn't work, now I have empty content
Let me insist: please use sys.stdout.buffer.write().
You'll also have
Hi,
I would like to represent graphs as cyclic dictionaries in Python.
The python code for the graphs is generated by some other program
(written in lisp) and I wonder what would be the best syntax for writing
the cycles in Python?
The following works:
>>> a = {}
>>> a['a'] = a
As can be seen
Hello!
Is there a way to print a query for logging purpose as it was or will
be sent to database, if I don't escape values of query by myself?
cursor.execute(query, [id, somestring])
I could print query and values separate, but it would be great, if I
could see how query is constructed and can t
>> > | > Any idea how I can replace words in a html file? Meaning only the
>> > | > content will get replace while the html tags, javascript, & css are
>> > | > remain untouch.
>> > |
>> > | I'm not sure what you tried and what you haven't but as a first trial
>> > | you might want to
>> > |
>> > |
Hey,
is there a way to use python2.6 without having used the installation
routine?
When I install python2.6 and copy over the python-directory (C:\programs
\python2.6) to another windows host and trying to execute python.exe
there, I get an error that python26.dll could not be found.
On the host
On 04/29/2010 10:03 AM, Wolfnoliir wrote:
> On 29/04/2010 17:03, Joe Riopel wrote:
>> On Thu, Apr 29, 2010 at 11:43 AM, Wolfnoliir wrote:
>>> I would like to add a method to the gtk.TextBuffer class to save a text
>>> buffer to a file, but I get an error:
>>
>> I don't know gtk, but can you inheri
Hello!
I want to get route tables from Cisco routers in the network. What i
have:
import re
from pysnmp.entity.rfc3413.oneliner import cmdgen
s = r'(%s)' % ('(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.)\
{3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)')
pattern = re.compile(s)
file = 'routers.txt
Le Thu, 29 Apr 2010 12:53:53 +0200, Dodo a écrit :
>
> @Antoine : It not sys.stdout.buffer.write but sys.stdout.write()
> instead. But it still doesn't work, now I have empty content
Let me insist: please use sys.stdout.buffer.write().
You'll also have to call sys.stdout.flush() before doing so.
On 29/04/2010 17:03, Joe Riopel wrote:
> On Thu, Apr 29, 2010 at 11:43 AM, Wolfnoliir wrote:
>> I would like to add a method to the gtk.TextBuffer class to save a text
>> buffer to a file, but I get an error:
>
> I don't know gtk, but can you inherit from the TextBuffer class create
> your own Te
On Thu, Apr 29, 2010 at 11:43 AM, Wolfnoliir wrote:
> I would like to add a method to the gtk.TextBuffer class to save a text
> buffer to a file, but I get an error:
I don't know gtk, but can you inherit from the TextBuffer class create
your own TexBuffer subclass with the save_to_file method?
--
Hi,
I would like to add a method to the gtk.TextBuffer class to save a text
buffer to a file, but I get an error:
line 22, in
gtk.TextBuffer.save_to_file = gtk_TextBuffer_save_to_file
TypeError: can't set attributes of built-in/extension type 'gtk.TextBuffer'
Here is the code:
10 import gtk
MRAB wrote:
> Karin Lagesen wrote:
>> Hello.
>>
>> I have approx 83 million strings, all 14 characters long. I need to
>> be able to take another string and find out whether this one is
>> present within the 83 million strings.
>>
>> Now, I have tried storing these strings as a list, a set and
Karin Lagesen wrote:
Hello.
I have approx 83 million strings, all 14 characters long. I need to be
able to take another string and find out whether this one is present
within the 83 million strings.
Now, I have tried storing these strings as a list, a set and a dictionary.
I know that finding t
On Apr 29, 10:38 am, Daniel Fetchinson
wrote:
> > | > Any idea how I can replace words in a html file? Meaning only the
> > | > content will get replace while the html tags, javascript, & css are
> > | > remain untouch.
> > |
> > | I'm not sure what you tried and what you haven't but as a first tr
On Apr 29, 6:37 am, Wolfgang Strobl wrote:
> Look at it from the point of view of people walking by, trying to decide
> whether they should invest some of their time into digging into yet
> another framework and library.
yes. _their_ time - not mine. the pyjamas project has always been
done on
On 28-Apr-10 23:18 PM, Kushal Kumaran wrote:
On Thu, Apr 29, 2010 at 5:46 AM, News123 wrote:
Hi,
I'm making first attempts to modify a few cells of an openoffice
spreadsheet.
Try the xlrd and xlwt modules, and the documentation at
http://www.python-excel.org/
The tutorial here is beautiful
On Apr 29, 5:31 am, Cameron Simpson wrote:
> On 28Apr2010 22:03, Daniel Fetchinson wrote:
> | > Any idea how I can replace words in a html file? Meaning only the
> | > content will get replace while the html tags, javascript, & css are
> | > remain untouch.
> |
> | I'm not sure what you tried and
... oh ... that simple. Now I feel dumb.
Thanks!
ALJ
--
http://mail.python.org/mailman/listinfo/python-list
"Karin Lagesen" wrote in message
news:416f727c6f5b0edb932b425db9579808.squir...@webmail.uio.no...
Hello.
I have approx 83 million strings, all 14 characters long. I need to be
able to take another string and find out whether this one is present
within the 83 million strings.
Now, I have trie
Hi,
I have Lighttpd web server running on port 80.
and i have a xmlrpc web server running on port 8085
How i can send all my request/response to xmlrpc server through lighttpd
server running on port 80?
Thanks and regards,
Gopal
--
http://mail.python.org/mailman/listinfo/python-list
Le 29/04/2010 01:45, Antoine Pitrou a écrit :
Le Wed, 28 Apr 2010 23:54:07 +0200, Dodo a écrit :
Help! this is driving me crazy lol
I want to print raw binary data to display an image file BUT
python3 outputs b'' instead of so the
browser can't read the image!!
f = open("/some/path/%s"
Lie Ryan wrote:
No, the implicit concatenation is there because Python didn't always
have triple quoted string. Nowadays it's an artifact and triple quoted
string is much preferred.
I don't agree. I often use implicit concatenation when I'm
writing a format string that won't fit on one source l
On Thu, Apr 29, 2010 at 3:16 AM, Astley Le Jasper
wrote:
> I realise I could roll my own here, but I wondered if there was an
> inbuilt version of this?
>
>>.
> def default_if_none(*args):
> for arg in args:
> if arg:
> return arg
> r
Karin Lagesen, 29.04.2010 11:38:
I have approx 83 million strings, all 14 characters long. I need to be
able to take another string and find out whether this one is present
within the 83 million strings.
Now, I have tried storing these strings as a list, a set and a dictionary.
I know that findi
I realise I could roll my own here, but I wondered if there was an
inbuilt version of this?
>.
def default_if_none(*args):
for arg in args:
if arg:
return arg
return None
x = None
y = 5
z = 6
print default_if_none(x,y,z)
>> 5
>
Karin Lagesen wrote:
> I have approx 83 million strings, all 14 characters long. I need to be
> able to take another string and find out whether this one is present
> within the 83 million strings.
>
> Now, I have tried storing these strings as a list, a set and a dictionary.
> I know that findin
Hello.
I have approx 83 million strings, all 14 characters long. I need to be
able to take another string and find out whether this one is present
within the 83 million strings.
Now, I have tried storing these strings as a list, a set and a dictionary.
I know that finding things in a set and a di
James Mills wrote:
> 2010/4/29 sanam singh :
>> hi,
>> it is saying
>> sa...@ubuntu:~/Desktop/Python-2.6.5$ sudo apt-get install gdbm-dev
>> Reading package lists... Done
>> Building dependency tree
>> Reading state information... Done
>> E: Couldn't find package gdbm-dev
>
> I'm sorry, but I don
> | > Any idea how I can replace words in a html file? Meaning only the
> | > content will get replace while the html tags, javascript, & css are
> | > remain untouch.
> |
> | I'm not sure what you tried and what you haven't but as a first trial
> | you might want to
> |
> |
> |
> | f = open( 'new
Peter Otten wrote:
> News123 wrote:
>>>
>> The drawback would be, that
>> b = A(123)
>> b.f()
>> would still be called with a as bound object.
>
> There is no b.f until you explicitly assign it with
>
> b.f = f
you are sooo right.
My fault.
--
http://mail.python.org/mailman/listinfo/python-lis
GZ wrote:
Hi All,
I am looking at the following code:
def fn():
def inner(x):
return tbl[x]
tbl={1:'A', 2:'B'}
f1 = inner # I want to make a frozen copy of the values of tbl
in f1
tbl={1:'C', 2:'D'}
f2 = inner
return (f1,f2)
f1,f2 = fn()
f1(1) # output C
f2
hi,
i have tried
sa...@ubuntu:~/Desktop/Python-2.6.5$ sudo apt-get build-dep python
but still the problem persists . when i make the package i get :
Failed to find the necessary bits to build these modules:
_bsddb _curses_curses_panel
_sqlite3 bsddb185
News123 wrote:
> Peter Otten wrote:
>> Richard Lamboj wrote:
>>
>>> i want to add functions to an instance of a class at runtime. The added
>>> function should contain a default parameter value. The function name and
>>> function default paramter values should be set dynamical.
>>
> class A(
1 - 100 of 115 matches
Mail list logo