of high-quality, peer-reviewed codes.
TPPSC is an annual publication using the same fast publication scheme.
We thank all our readers and contributors for their continued support.
Happy reading.
Maurice Ling
Co-EIC, TPPA
--
http://mail.python.org/mailman/listinfo/python-list
Hendrik van Rooyen wrote:
On Saturday 29 March 2008 03:09:46 Steven D'Aprano wrote:
On Fri, 28 Mar 2008 16:59:59 +0100, Robert Bossy wrote:
Gabriel Genellina wrote:
That's what I said in another paragraph. sum of coordinates is using
a different distance definition; it's the way you measure
Hi,
Assuming that I have this code for Cherrypy 3
class Welcome:
def index(self):
return
form action=btn_handler method=POST
input value=Add name=AddBtn type=submit
input value=Edit name=EditBtn type=submit
/form
Carsten Haese wrote:
On Tue, 2008-03-18 at 07:14 +, Maurice LING wrote:
Hi,
Assuming that I have this code for Cherrypy 3
class Welcome:
def index(self):
return
form action=btn_handler method=POST
input value=Add name=AddBtn type=submit
propose to improve The Python Papers
Please direct any queries to [EMAIL PROTECTED]
Thank you
Maurice Ling
Associate Editor, The Python Papers
--
http://mail.python.org/mailman/listinfo/python-list
Maurice Ling
Associate Editor, The Python Papers
--
http://mail.python.org/mailman/listinfo/python-list
Giampaolo Rodola' wrote:
Hi there,
I don't know if such a thing has been already discussed, in which case
I'm sorry.
I was wondering if there's a place for python open source projects
that need help.
It thought it would be very nice having a place where developers could
submit help requests
John Salerno wrote:
Anyone know anything about this book? I've read a few intro Python books
already, but I'm always interested in reading more to reinforce the
language. No reviews on Amazon yet so I'm not sure if it's good or not.
Thanks.
A cursory glance while standing in the bookshop
Diez B. Roggisch wrote:
Maurice LING schrieb:
Hi,
I have a problem:
1. Assuming that my application is a SOAP server that uses SOAPpy,
2. I am given port 35021 for use.
What I normally do (simply) is:
functionlist = [some exposed functions]
import SOAPpy
server = SOAPpy.SOAPServer
Hi,
I have a problem:
1. Assuming that my application is a SOAP server that uses SOAPpy,
2. I am given port 35021 for use.
What I normally do (simply) is:
functionlist = [some exposed functions]
import SOAPpy
server = SOAPpy.SOAPServer((some host, 35021))
for func in functionlist:
The editorial committee of The Python Papers (ISSN 1834-3147) calls for
proposals for The Python Papers Monograph Series.
Potential authors should contact the editors at [EMAIL PROTECTED]
at an early stage of preparation.
We await your indications of interests.
Regards
Maurice Ling
Associate
The editorial committee of The Python Papers (ISSN 1834-3147) calls for
proposals for The Python Papers Monograph Series.
Potential authors should contact the editors at [EMAIL PROTECTED]
at an early stage of preparation.
We await your indications of interests.
Regards
Maurice Ling
Associate
windandwaves wrote:
Can someone tell me why I should learn python? I am a webdeveloper,
but I often see Python mentioned and I am curious to find out what I
am missing out on.
Thank you
Nicolaas
The last edition of The Python Papers (volume 2 issue 2,
- A Python Framework for Modelling Reusable Information
Processing TasksPages 28-43
We will like to thank the community for their contributions and support.
Regards
Maurice Ling
Associate Editor
--
http://mail.python.org/mailman/listinfo/python-list
Rohit wrote:
I am a novice. I want to know whether Python can be used to develop
client/server database and web applications like .NET. Which is the
best book/source to learn Python?
There are database access libraries for almost every RDBMS.
Web applications using Django, CherryPy,
Hi David,
I can't download from your link
http://www.freenet.org.nz/python/yahooquote/YahooQuote-0.1.tar.gz
Cheers
maurice
DavidM wrote:
Hi,
After a 3-year break from working with it, I've just released version 0.1.0
(the first formally packaged release) of YahooQuote. As the name
[EMAIL PROTECTED] wrote:
i use it for text mining, processing large text corpora for scientific
purposes. i'm also working on some neat data mining tools written in
python (called orange, in case someone's interested)
Hi,
I am very interested with your use of Python. I am into text mining
walterbyrd wrote:
I mean other than sysadmins, programmers, and web-site developers?
I have heard of some DBAs who use a lot of python.
I suppose some scientists. I think python is used in bioinformatics. I
think some math and physics people use python.
I suppose some people use python
Developer's Conference 2006 (Melbourne, Australia).
Thank you everyone for all your support.
Cheers
Maurice Ling
(Associate Editor)
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
progman wrote:
I was testing the python+mysql
here are my sample codes:
import MySQLdb
from pprint import pprint
db = MySQLdb.connect(host=localhost, user=root, passwd=password,
db=database)
cursor = db.cursor()
cursor.execute('update promo set
Jerry Hill wrote:
On 11/25/06, Jerry Hill [EMAIL PROTECTED] wrote:
On 23 Nov 2006 15:09:11 -0800, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Yes, it's true that you can't resell copies of The Python Papers for
personal profits, but you may derive from it, reproduce and propagate
it.
Dennis Lee Bieber wrote:
On Wed, 15 Nov 2006 22:41:19 GMT, Maurice LING [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
I'm hoping for a more optimistic outcome that this may open a
possibility for tigher interoperability between java programs and python
programs
I once wrote a partial JVM in Modula-3 (strictly a researchware
effort), so I can imagine it being done technically. But why?
The big problem with Java-and-Python is not the VMs underneath. It is
the fact that Java has layers upon layers upon layers of idiosyncratic
libraries and
Stephen Eilert wrote:
Maurice LING escreveu:
I once wrote a partial JVM in Modula-3 (strictly a researchware
effort), so I can imagine it being done technically. But why?
The big problem with Java-and-Python is not the VMs underneath. It is
the fact that Java has layers upon layers upon
Paul Boddie wrote:
Maurice LING wrote:
Say given cytoscape.jar, I'll like to be able to do this:
from cytoscape javaimport cytoscape
c = cytoscape()
And the tighest way I see that this can be done is for Python VM to
execute Java bytecodes like Python bytecodes. That is, Python VM
walterbyrd wrote:
Some think it will.
Up untill now, Java has never been standard across different versions
of Linux and Unix. Some think that is one reason that some developers
have avoided Java in favor of Python. Now that Java has been GPL'd that
might change.
IMO: it won't make much
Cameron Laird wrote:
In article [EMAIL PROTECTED],
Richard Charts [EMAIL PROTECTED] wrote:
.
.
.
Well on a Win machine, probably.
Almost every Linux machine you come across will have (most likely a
fairly recent build of)
Jim Jones wrote:
I am looking for a system in Python that will easily allow me to distribute
processes across multiple systems?So, if I have a function 'foo', I'd
like to be able to call something along the lines of
distribute(foo(x))
And have the system figure out which node is
Hi,
I've been using SOAPpy for a number of my work. Looks good.
maurice
Mark Harrison wrote:
So I'm investigating doing some SOAP work... Any concensus on
what the best python libraries are for doing this?
Too bad, xmlrpc is choking on our long longs. :-(
Many TIA,
Mark
--
Xavier Morel wrote:
[EMAIL PROTECTED] wrote:
So basically Python Eggs precompiles and compresses
binaries for you so you just have to load it to run
your app?
Nah, Eggs is a packaging system, what you don't have to do is
compile/configure, because the packaging does that for you. It
Tolga wrote:
After a very rapid entrance into the Python, I have immediately looked
for a good IDE. Komodo and Wing IDE look very good and I think they are
enough. But now, I am searching for a Pyhton environment which should
look like Delphi / Kylix, Borland's C++ builder or Allegro Common
Since copy_reg lets you specify arbitrary code to serialize arbitrary
objects, you shouldn't run into any single object that you cannot
serialize to a pickle.
[snip - example of pickling code objects]
I cannot understand 2 things, which I seek assistance for:
1. Is code object the only
Hi,
I need to look into serialization for python objects, including codes,
recursive types etc etc. Currently, I have no idea exactly what needs to
be serialized, so my scope is to be as wide as possible.
I understand that marshal is extended by pickle to serialize class
instances, shared
Since copy_reg lets you specify arbitrary code to serialize arbitrary
objects, you shouldn't run into any single object that you cannot
serialize to a pickle.
In http://www.effbot.org/librarybook/pickle.htm, it specifically
mentions that code objects cannot be pickled and require the use
I had the opportunity to glance through the book in Borders yesterday.
On the whole, I think it is well covered and is very readable. Perhaps I
was looking for a specific aspect, and I find that threads did not get
enough attention. Looking at the index pages, the topics on threads
(about 4-5
Mikael Olofsson wrote:
Monu Agrawal wrote:
Hi I want to know whether the program is being run on windows or on
Xnix. Is there any variable or method which tells me that it's windows?
Will this help?
import sys
sys.platform
'win32'
There is also the platform module, that can
Frithiof Andreas Jensen wrote:
Maurice LING [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I do have another dumb question which is OT here. Say aFunc method
instantiates a SOAP server that serves forever, will it prevent bFunc
from running as a separate thread?
If the SOAP
Mikael Olofsson wrote:
Monu Agrawal wrote:
Hi I want to know whether the program is being run on windows or on
Xnix. Is there any variable or method which tells me that it's windows?
Will this help?
import sys
sys.platform
'win32'
There is also the platform module, that can
Frithiof Andreas Jensen wrote:
Maurice LING [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I do have another dumb question which is OT here. Say aFunc method
instantiates a SOAP server that serves forever, will it prevent bFunc
from running as a separate thread?
If the SOAP
My current implementation may be ugly. I have a class
class myThread(threading.Thread):
def __init__(self, func):
self.func = func
threading.Thread.__init__(self)
def run(self):
print '%s function running' % self.func
self.func()
which is used
Hi,
I'm trying to read some files (video files) that seems to have some
errors in it. Basically, I cannot copy it out of discs as that gives me
an error message but I can still play the file using a media player like
VLC or QuickTime. I understand that copying a file will also invoke
checking
[EMAIL PROTECTED] wrote:
I have written a program to do something similar. My strategy is:
* use os.read() to read 512 bytes at a time
* when os.read fails, seek to the next multiple of 512 bytes
and write '\0' * 512 to the output
I notice this code doesn't deal properly with short reads,
Hi,
I just have a simple question about threads. My classes inherits from
threading.Thread class. I am calling threading.Thread.run() method to
spawn a few threads to parallel some parts of my program. No thread
re-use, pooling, joining ... just plainly spawn a thread, run a routine.
So, at
Thierry Lam wrote:
Is it possible to run an ftp command to connect to some remote computer
on the network.
For example, if I want to retrieve some data from
\\remcomputer\datafiles on the network and copy it to my local
computer, how do I do it in python on the Unix side?
I don't want to
henne wrote:
I should have added that my platform is Linux.
http://davidf.sjsoft.com/mirrors/mcmillan-inc/install1.html
Squeeze works on Linux too.
It tells me that the installer files are not found.
M
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am wondering if Python has services or frameworks that does the same
as Java RMI?
What I am seeking is to do pseudo-clustering. That is, a server will
contains a program to control what is needed for execution. This will be
pretty much like process management. Call this controller,
Thank you
Harald and Alan,
Pyro seems to be used widely in this area but PyLinda is much cleaner
and simpler to use.
However, given that the object or class to be executed by execution
machines are not known at development time, I wish to seek you advice on
remote class loading.
Can an
Hi,
I've been using FB1.5 and access the database using Kinterbasdb +
Python. My connection is established using kinterbasdb.connect() method
and the parameters host, dns, database, user, password are all defaulted
to 'None'.
On my own machine running Mac OSX 10.3, I can connect using the
Mathias Waack wrote:
Maurice LING wrote:
I've been using FB1.5 and access the database using Kinterbasdb +
Python. My connection is established using kinterbasdb.connect() method
and the parameters host, dns, database, user, password are all defaulted
to 'None'.
On my own machine running Mac
[EMAIL PROTECTED] wrote:
Hello, fellow programmers!
I am sitting in front of a nice new PowerBook portable which has OS
10.4 installed. The Python.org web site says that Apple has shipped OS
10.4 with Python 2.3.5 installed. How exactly do I access this? I
have searched through the
say your code is test.py and you usually run it as python test.py,
then the -O option will generate .pyo files.
That is python -O test.py
Cheers maurice
skn wrote:
Hello.,
Does the python compiler provide an option to generate a .pyo(optimized byte
code file) from a .py (source file)?
Thanks James. I've googled a few times and it is always tools that
generates UML from Python codes that comes up in the top hits, which
brings me to wonder if there is something that does the opposite.
maurice
James wrote:
Is there any UML tools that is able to take UML and generate Python
Hi,
I'm writing something that specifies the use of SOAP. One requirement
that fumbles me is the port number(s) to use. Is there any way to find
out which ports are not used by the system? I've looked in the library
reference and doesn't seems to get anything.
Is there a problem with say 2
Hi,
Is there any UML tools that is able to take UML and generate Python codes?
Cheers
Maurice
--
http://mail.python.org/mailman/listinfo/python-list
deelan wrote:
Maurice LING wrote:
Hi Alex,
I am actually working on something like that as an academic project.
At this stage, at least for the purpose of my scope, it will not be as
extensive as CPAN but a set of mechanisms for the same effect for Python.
don't foget to keep an eye
Hi,
Just a philosophical check here. When a program is distributed, is it
more appropriate to provide as much of the required 3rd party libraries,
like SOAPpy, PLY etc etc, in the distribution itself or it is the
installer's onus to get that part done?
Cheers
Maurice
--
Hi Alex,
I am actually working on something like that as an academic project. At
this stage, at least for the purpose of my scope, it will not be as
extensive as CPAN but a set of mechanisms for the same effect for Python.
maurice
Alex Gittens wrote:
I'm new to Python from Perl, and loving
Hi Anthony,
count me in...
Cheers
Maurice
Anthony wrote:
Hi all,
I'm interested in starting a Python user group in Melbourne,
Australia. So far there seems to have been a lot of interest from
various parties, but for whatever reasons it's fizzled out. So I've
decided that if there's
Peter Hansen wrote:
Maurice LING wrote:
It makes big difference (legally) to if the codes are there and
someone sees it, to if the codes are locked in some packaged or zipped
form and someone reverse-engineer it. It is legally as different as if
you drop money on the ground and I pick
Peter Hansen wrote:
Maurice LING wrote:
It makes big difference (legally) to if the codes are there and
someone sees it, to if the codes are locked in some packaged or zipped
form and someone reverse-engineer it. It is legally as different as if
you drop money on the ground and I pick
Bengt Richter wrote:
On Sat, 07 May 2005 14:03:34 +1000, Maurice LING [EMAIL PROTECTED] wrote:
John Machin wrote:
On Sat, 07 May 2005 02:29:48 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote:
On Sat, 07 May 2005 11:08:31 +1000, Maurice LING [EMAIL PROTECTED] wrote:
It doesn't seems
Hi,
I think I've hit a system limit in python when I try to construct a list
of 200,000 elements. My error is
malloc: vm_allocate (size = 2400256) failed..
Just wondering is this specific to my system or what? Will adding more
RAM helps in this case?
Thanks and cheers
Maurice
--
Hi everyone,
thanks for your help.
Yes, I'm using Mac OSX 1.3 with 256MB Ram. Each element in the list is a
float. The list is actually a retrieved results of document IDs from
SOAP interface. And Mac OSX does not have 'unlimit' command as shown,
Maurice-Lings-Computer:~ mauriceling$ unlimit
James Stroud wrote:
Sorry Maurice, apparently in bash its ulimit (no n). I don't use bash, so I
don't know all of the differences offhand. Try that.
James
Thanks guys,
It doesn't seems to help. I'm thinking that it might be a SOAPpy
problem. The allocation fails when I grab a list of
Hi,
It seems that you are just starting on Python, same as my situation a
year ago. After almost going down the same route as you do, I tell
myself just start on something. You can decide on everything but by
the time you've decided, everything changes again.
Initially, I started on Java
lpe wrote:
Hi maurice
thanks for your interest, that surely looks interesting (and promising)
I had no experience with any of the packages you mentioned, but it may
well be usefull.
Please email me with more details of what you had in mind.
Hi,
I've just read PEP 262 last night and finds that it
Peter Saffrey wrote:
(apologies for starting a new thread - Google can't retrieve the other
message for some reason)
Yes, /usr/lib/python/site-packages is in sys.path. This series of
commands should explain what I mean: I've put the Python ID3 module in
a sub-directory of site-packages as an
Hi all,
I reckoned that if I'm on this work, I might as well make it into an
academic engineering-type project for my pass degree. Hence, I am
sending this posting out to everyone to inform of my intentions. Despite
the possible interests in this work, academic requires a 'personal'
project
Martin v. Löwis wrote:
Maurice LING wrote:
I've emailed to catelog-sig mailing list and is still waiting to hear
something. Currently, I have no idea of the structure of PyPI. I hope I
can hear from them soon and generate some starting points...
Posting questions is not the only way to find
steve.leach wrote:
python -o foo.exe foo.py
at the command line, and get an executable, without any further effort.
Hence making the resulting program useless to users of most operating
systems.
In close sourced development, which most corporates may prefer, yes, the
resulting program is
Peter Saffrey wrote:
I'm trying to write a python service, with an executable in
/usr/local/bin, but modules that are kept in a sub-directory of
/usr/lib/python/site-packages.
Using apt-proxy as my template, I've put the modules in
/usr/lib/python/site-packages/mymodules and tried to import them
lpe wrote:
http://www.pycode.com
I was kinda suprised when I could not find any good sites with 3rd
party modules (other than the Vaults of Parnassus, where you must host
files elsewhere), so I decided to write one myself :)
It is brand new and might still be buggy, but hopefully it will be
Michael Soulier wrote:
On 28 Apr 2005 17:45:02 -0700, lpe [EMAIL PROTECTED] wrote:
http://www.pycode.com
I was kinda suprised when I could not find any good sites with 3rd
party modules (other than the Vaults of Parnassus, where you must host
files elsewhere), so I decided to write one myself :)
Martin v. Löwis wrote:
Maurice LING wrote:
technicalities are wrong but situation remains unchanged.
For C modules, it is very likely that new versions of Python
will continue to break the ABI, by changing the layout of
structures.
The most straight-forward way to deal with it as a sysadmin
Terry Reedy wrote:
I doubt anyone disputes that upgrades are more hassle than we would like.
My main point was that freezing CPython's technology is not the solution.
Any other upgrade helper that you can contribute will be welcome.
Terry J. Reedy
So there is no way of releasing a close-source
Martin v. Löwis wrote:
[automatically install a set of packages]
What do you think?
That would certainly be possible. Contributions are welcome.
Regards,
Martin
I've emailed to catelog-sig mailing list and is still waiting to hear
something. Currently, I have no idea of the structure of PyPI. I
2. The current compilation scheme (compiling to bytecode as and when
it is needed) works well for scripting purposes but is less desirable
in commercial settings. Less distribution happens when it is used
purely for scripting purposes, such as system maintenance or tuning.
The solution with the
monkey wrote:
Hi all, I am new to programming, already have a glace on introduction of
c++, java and finally decided on python. But I found that the .py file is
just like the source file, how can I make a program without revealing its
source? (may be my question is a little bit stupid)
It is
Emre Turkay wrote:
Hi Folks,
I am designing a tool, in which there are dynamic types and
variables with these types. In this respect, it is more like an
interpreted language design.
I wonder how these issues are implemented in Python are there any
documents or articles about it, which I can read
The same *can* be said for some decade-old .py files. Certainly, most
everything written for 2.0 onward still works. The same will also be true
for .pyc files as long as you run them with their corresponding binary and
as long as the binary stills run.
However, .pyc files are private,
What can be done in PYAN is to encourage all 3rd party library
developers to centralize their libraries in it, which I think all will
gladly respond. All that is needed to be deposited in PYAN is a
description file, like the simplest setup.py file. All that is needed
in this description file is
Mike Meyer wrote:
Maurice LING [EMAIL PROTECTED] writes:
The idea of having to release the program or library as source files
does ring alarms in many executives in corporate world. Less freezing
the modules (which renders it platform dependent) or using Jython
(which is not possible when C
It is a nuisance. It's more of a nuisance when third part modules with
'c' components are compiled for the new version of python (a windows
specific problem).
I did find that the last upgrade forced me to evaluate which extensions
I actually used. The answer was 'a few less than I thought'. It
Hi,
I've been using Python for about 2 years now, for my honours project and
now my postgrad project. I must say that I am loving it more and more
now. From my knowledge, Python bytecodes are not back-compatible. I must
say that my technical background isn't strong enough but is there any
good
jozo wrote:
I have to work on python lexical definition in Lex. I spent lots of my
time to find regular expresions written for Lex of Python language but
nothing.
Can somebody help me?
I nEED hELP
Jython has a Python language lexer written using JavaCC.
--
Hi,
I am looking for a way to use Jython in Ant build process. I have some
pure Python scripts (not using any C extensions) that I'll like to
incorporate into Java using Jython. I heard that this can be done but
you can I set up Ant to do this? Sorry, I'm no expert with Ant.
By the way, I'm
Hi Tommy,
After reading what you've written, it is still very vague for me. Is it
a program that reads a specification and outputs the corresponding codes
in the langauge you want?
Cheers
Maurice
Tommy Nordgren wrote:
I'm interested in doing a rather ambitious project concerning compiler
Robert Kern wrote:
3. Apple-installed Python's command line tools are symlinked from
/usr/bin to /System/Library/Frameworks/Python.framework but the OSX
installer for Python 2.4.1 places the commandline tools in
/usr/local/bin and symlinked to /Library/Frameworks/Python.framework.
So it seems
... to match inputs
My workaround is to change it to
list of dictionaries, list of REs, list of RE matcher... iterative
matching of inputs.
Can someone kindly help me out here?
Thanks in advance.
Cheers,
Maurice
Maurice LING wrote:
Hi,
I have the following codes:
from __future__ import nested_scopes
import
advices.
Cheers
Maurice
Maurice LING wrote:
Hi all,
I think I might have a workaround to this problem but have no idea how
to work it through. I hope that someone can kindly help me out because I
do not quite understand the mechanics of the _make_regex() method in the
original codes...
My idea
Hi Thomas,
It seems that you've cleanly killed the Apple-installed Python, which
isn't too bad a thing after all. What I can suggest you do is this...
Copy the entire /System/Library/Frameworks/Python.framework directory
from someone and drop it into your system (same place of course). I will
Hi Dennis,
Dennis Benzinger wrote:
Maurice LING schrieb:
Hi,
I have the following codes:
from __future__ import nested_scopes
[...]
Are you still using Python 2.1?
In every later version you don't need the
from __future__ import nested_scopes line.
So, if you are using Python 2.1 I strongly
Thomas Nelson wrote:
I'm on a mac OS X (10.3.8), and I seem to have accidentally destroyed
the default python installation. How should I put it on? Do I need to
use the unix version? any help would be greatly appreciated.
THN
Hi Thomas,
I'm using OSX 10.3.8 as well. Just wondering, how did
I was actually trying to update to the newest python version, and I had
read something saying it would conflict with the old version, so I went
through and deleted all the folders that had python in the name =].
clever of me, huh? now I can't make either the new or the old work.
Once again,
://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81330)
and [EMAIL PROTECTED]
Copyright: The methods _make_regex(), __call__() and substitute()
were the work of Xavier Defrang,
__init__() was the work of [EMAIL PROTECTED], all others were
the work of Maurice Ling
def __init__(self, dict = None
fred.dixon wrote:
google for cx_freeze
nevermind, here
http://starship.python.net/crew/atuining/cx_Freeze/
linux and windows
Thanks. I think the question is really asking is there an application
that can compile standalone python applications in various platforms?
That is, is it possible to
Sells, Fred wrote:
I'm no expert on internals, but I seem to recall that in the past, the
string module could be implemented in either C or Python and I think there
is a strop module that is related to all this. Could it be that on the Mac,
your string processing is using interpreted Python byte
Hi,
I'm looking for a way to do this: I need to scan a text (paragraph or
so) and look for occurrences of text-x (text-x). That is, if the
text just before the open bracket is the same as the text in the
brackets, then I have to delete the brackets, with the text in it.
Does anyone knows any
Matt wrote:
Try this:
import re
my_expr = re.compile(r'(\w+) (\(\1\))')
s = this is (is) a test
print my_expr.sub(r'\1', s)
#prints 'this is a test'
M@
Thank you Matt. It works out well. The only think that gives it problem
is in events as there (there), where between the word and the same
Matt wrote:
I'd HIGHLY suggest purchasing the excellent a
href=http://www.oreilly.com/catalog/regex2/index.html;Mastering
Regular Expressions/a by Jeff Friedl. Although it's mostly geared
towards Perl, it will answer all your questions about regular
expressions. If you're going to work with
1 - 100 of 114 matches
Mail list logo