I'm trying to create a SSL-enabled server in Python, and in the doc for
the socket module:
ssl(sock[, keyfile, certfile])
Initiate a SSL connection over the socket sock. keyfile is the
name of a PEM formatted
file that contains your private key. certfile is a PEM formatted
certificate
Instead of using regular expressions, you could perhaps
use a multiple keyword matcher, and then for each match,
replace it with the correct string.
http://hkn.eecs.berkeley.edu/~dyoo/python/ahocorasick/
contains the Aho-Corasick algorithm written in C with
a Python extension.
Maurice LING wrote:
The Internal error in regular expression engine occurs also
in Python 2.4.0 when creating a regular expression containing
more than or's (|).
Dennis Benzinger wrote:
Maurice LING schrieb:
Hi,
I have the following codes:
from __future__ import nested_scopes
[...]
Are you still using Python
With the re/sre module included with Python 2.4:
pattern = (?Pid1avi)|(?Pid2avi|mp3)
string2match = some string with avi in it
matches = re.finditer(pattern, string2match)
...
matches[0].groupdict()
{'id2': None, 'id1': 'avi'}
Which was expected since overlapping matches are ignored.
But I would
Raghul wrote:
Is it possible to monitor a folder in the python?My question is if I
put any file in it that particular folder my script should monitor the
folder and read the file name.If so what function can I use?
Thanx in advance
If you do not want to poll (check for changes yourself regularly),
Bill Mill wrote:
On Tue, 01 Mar 2005 22:04:15 +0100, André Søreng [EMAIL PROTECTED] wrote:
Kent Johnson wrote:
André Søreng wrote:
Hi!
Given a string, I want to find all ocurrences of
certain predefined words in that string. Problem is, the list of
words that should be detected can
Daniel Yoo wrote:
Kent Johnson [EMAIL PROTECTED] wrote:
: Given a string, I want to find all ocurrences of
: certain predefined words in that string. Problem is, the list of
: words that should be detected can be in the order of thousands.
:
: With the re module, this can be solved something like
Ola Natvig wrote:
André Søreng wrote:
Yes, but I was looking for a solution which would scale. Searching
through the same string 1+++ times does not seem like a suitable
solution.
André
Just for curiosity, what would a regexp do? Perhaps it's a clue in how
you could do this in the way
Hi!
Given a string, I want to find all ocurrences of
certain predefined words in that string. Problem is, the list of
words that should be detected can be in the order of thousands.
With the re module, this can be solved something like this:
import re
r =
Kent Johnson wrote:
André Søreng wrote:
Hi!
Given a string, I want to find all ocurrences of
certain predefined words in that string. Problem is, the list of
words that should be detected can be in the order of thousands.
With the re module, this can be solved something like this:
import re
r
10 matches
Mail list logo