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 c
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 Pyth
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:
H
With the re/sre module included with Python 2.4:
pattern = "(?Pavi)|(?Pavi|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 also
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),
Phillip Mills wrote:
I've learned enough of the Python language to be mildly dangerous and
have used it in a few personal projects. All my development of
commercial (or production) products over the past dozen years have been
done with C++ or Java.
For a program I'm planning -- to begin during
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 th
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 somethin
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 be
Chris wrote:
Is there a preferred method for having different scripts on different
computers communicate with each other?
For example, script A could tell script B that it is done with a certain
process.
I know how to do this using e-mail, but I would like a more direct
method if possible. If
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
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 = re.compile("word1|word2|word3|...|wordN
12 matches
Mail list logo