John Nagle wrote:
Henning_Thornblad wrote:
What can be the cause of the large difference between re.search and
grep?
This script takes about 5 min to run on my computer:
#!/usr/bin/env python
import re
row=
for a in range(156000):
row+=a
print re.search('[^ =]*/',row)
While
Paddy wrote:
It is not a smarter algorithm that is used in grep. Python RE's have
more capabilities than grep RE's which need a slower, more complex
algorithm.
So you're saying the Python algo is alternatively gifted...
Peter
--
http://mail.python.org/mailman/listinfo/python-list
Filipe Fernandes wrote:
but why would you say this particular
regex isn't common enough in real code?
As Carl says, it's not just the regex, it's the the combination with a long
line that exposes the re library's weakness.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
hi
i am using tix FileSelectBox in my application .I want to get the
selected filename as a string
i do this as follows
fselectbox=FileSelectBox(someframe)
fselectbox.__setitem__(dir,join(fselectbox.cget(dir),..))
fselectbox.pack(side=LEFT)
...
selectedfile=fselectbox.selection.cget(value)
SOLVED: right-click on the install program and Run as administrator
solution courtesy of
http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShowd=34538
On Jun 22, 11:34 am, jim-on-linux [EMAIL PROTECTED] wrote:
On Saturday 21 June 2008 13:28, Herman wrote:
I want to
hello,
I want to create a (local) database viewer for all databases,
it's working now for sqlite3 (python 2.5),
and I now want to get it working through odbc,
so I can manage most other databases.
In sqlite I can get the metadata (tables, stored views, procedures, etc)
through pragma
On Jul 5, 7:01 am, Peter Otten [EMAIL PROTECTED] wrote:
Paddy wrote:
It is not a smarter algorithm that is used in grep. Python RE's have
more capabilities than grep RE's which need a slower, more complex
algorithm.
So you're saying the Python algo is alternatively gifted...
Peter
The
Hi,
this is to inform all of you about the immediate availability of eric
4.1.5.
It is a bug fix release. As usual, it is available via
http://www.die-offenbachs.de/eric/index.html.
Eric4 is a Python IDE written using PyQt4 and QScintilla2. It comes with
batteries included. For more details
I fiddled a little with pyGTK and was quite happy to discover
gtkMozEmbed because I want to write an application for Linux and
Windows with a powerful browser widget. Unfortunatly I couldnt find a
way to make gtkMozEmbed work on Windows. Are there alternatives? I'm
lazy so I prefer to download
H!
I using a script that opens a internet page in a small window (what I
can control)
In XP everything was working fine, but now I'm using Vista with IE7
and this is what happends now:
First a small window opens at the postion x0 y0 (like I want) but then
IE thinks Hey lets open a other main
Paddy [EMAIL PROTECTED]:
On Jul 4, 1:36 pm, Peter Otten [EMAIL PROTECTED] wrote:
Henning_Thornblad wrote:
What can be the cause of the large difference between re.search and
grep?
grep uses a smarter algorithm ;)
This script takes about 5 min to run on my computer:
#!/usr/bin/env
Hey guys. I am having trouble understanding the get() method from the
Tkinter Text() widget. It isn't like the entry.get() one I am used to.
I know you have to put tags in, or at least I read. I tried this but
it didn't work. I think I was putting the tags in wrong but I am not
sure. I
On Jul 5, 4:12 am, Sebastian \lunar\ Wiesner
[EMAIL PROTECTED] wrote:
Paddy [EMAIL PROTECTED]:
On Jul 4, 1:36 pm, Peter Otten [EMAIL PROTECTED] wrote:
Henning_Thornblad wrote:
What can be the cause of the large difference between re.search and
grep?
grep uses a smarter algorithm
Hi
Does anyone here have a good recommendation for an open source crawler
that I could get my hands on? It doesn't have to be python based. I am
interested in learning how crawling works. I think python based
crawlers will ensure a high degree of flexibility but at the same time
I am also torn
Hey guys. I am having trouble understanding the get() method from
the Tkinter Text() widget. It isn't like the entry.get() one I am
used to. I know you have to put tags in, or at least I read. I
tried this but it didn't work. I think I was putting the tags in
wrong but I am not sure.
just crawling is supereasy. its how to index and search that is hard.
just start at yahoo.com, scrape out all the links and then for every
site visit every link.
i wrote a crawler in 15 lines of code. but then it all it did was
visit the sites, not indexing them or anything.
you could write a
Ron Garret wrote:
In article [EMAIL PROTECTED],
Ron Garret [EMAIL PROTECTED] wrote:
In article [EMAIL PROTECTED],
Michael Ströder [EMAIL PROTECTED] wrote:
Ron Garret wrote:
I'm writing a little HTTP server and need to parse request content that
is mime-encoded. All the MIME routines in
akineko schrieb:
Hello everyone,
I have used Python SimpleXMLRPCServer to expose several methods to be
used.
My Python script creates a free-standing server and not a CGI script.
I have tested its exposed methods using the following Python script:
import xmlrpclib
s =
Carl Banks [EMAIL PROTECTED]:
On Jul 5, 4:12 am, Sebastian \lunar\ Wiesner
[EMAIL PROTECTED] wrote:
Paddy [EMAIL PROTECTED]:
On Jul 4, 1:36 pm, Peter Otten [EMAIL PROTECTED] wrote:
Henning_Thornblad wrote:
What can be the cause of the large difference between re.search and
grep?
Okay, so i am trying to have some sort of formatting going on in a
textbox, and I need left margins. I see that there are two, one for
the first line and th other for every line but that line. My program
gives a word and a list of definitions for the word. So my question is
how can I make
Andrew Fong wrote:
Newbie question:
Let's say I open a new file for writing in a certain path. How do I
get that path back?
Example:
f = open('/some/path/file.ext')
some_function(f)
'/some/path/file.ext'
Does some_function(f) already exist? And if not, how would I define
it?
-- Andrew
Hi Ross,
Usually that happens when some module contains too much runtime information
and the static analysis cannot get it... You can probably fix that by adding
'psycopg2' to the list of builtin modules... See
http://fabioz.com/pydev/manual_101_interpreter.html for information on how
to
Hello Paul,
Thank you very much for your prompt and clear answer.
I didn't know the same origin javascript security policy (as I'm not
familiar with javascript).
After reading the description of the same origin javascript policy,
I think you are absolutely correct.
The security policy does make
On Jul 5, 6:44 am, Sebastian \lunar\ Wiesner
[EMAIL PROTECTED] wrote:
Carl Banks [EMAIL PROTECTED]:
On Jul 5, 4:12 am, Sebastian \lunar\ Wiesner
[EMAIL PROTECTED] wrote:
Paddy [EMAIL PROTECTED]:
On Jul 4, 1:36 pm, Peter Otten [EMAIL PROTECTED] wrote:
Henning_Thornblad wrote:
Hello,
for my Python application (Windows platform) to be standards
compliant, I need to embbed Ecmascript(Javascript) interpreter - I
need to execute plugins written in this language. Which engine is
suitable for Python, I have found bunch of them. Any recomendations
are welcome.
To be more
Paddy:
You could argue that if the costly RE features are not used then maybe
simpler, faster algorithms should be automatically swapped in but
Many Python implementations contains a TCL interpreter. TCL REs may be
better than Python ones, so it can be interesting to benchmark the
same RE
On Jul 5, 1:54 pm, Carl Banks [EMAIL PROTECTED] wrote:
I don't think you've illustrated that at all. What you've illustrated
is that one implementation of regexp optimizes something that another
doesn't. It might be due to differences in complexity; it might not.
(Maybe there's something
On Sat, 5 Jul 2008 06:28:42 -0700 (PDT), [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hello,
for my Python application (Windows platform) to be standards
compliant, I need to embbed Ecmascript(Javascript) interpreter - I
need to execute plugins written in this language. Which engine is
On Jul 5, 4:13 pm, Mark Dickinson [EMAIL PROTECTED] wrote:
It seems like an appropriate moment to point out *this* paper:
http://swtch.com/~rsc/regexp/regexp1.html
That's the one!
Thanks Mark.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
You learn something new every day:
On my ubuntu, update-manager is supposed to use the python2.5
installed on /usr/bin. Well, I had subsequently installed a whole
bunch of stuff in /usr/local (/usr/local/bin/python and /usr/local/lib/
python2.5 etc), which I have happily been using for
On Jul 5, 11:09 am, david [EMAIL PROTECTED] wrote:
You learn something new every day:
On my ubuntu, update-manager is supposed to use the python2.5
installed on /usr/bin. Well, I had subsequently installed a whole
bunch of stuff in /usr/local (/usr/local/bin/python and /usr/local/lib/
Hi!
Ecmascript (Jscript) is Active-Scripting compliant.
With PyWin32, you can :
- call JScript functions (with parameters)
- define pieces of code ( run it)
Another way, is to drive Internet-Explorer (via COM). You can set the
IE-Windows as invisible, and connect the motor of execution
Hi!
Your code run OK for me (Vista Ultimate).
This other version run also OK :
def webbrowser(url=None):
import win32com.client, time
ie=win32com.client.Dispatch('InternetExplorer.Application')
while ie.Busy==True:
time.sleep(0.125)
ie.Top = 0
ie.Left = 0
Great! Thanks everyone for so many references and comments. Lots of
doubts have been solved.
On Fri, Jul 4, 2008 at 10:33 AM, Peter Otten [EMAIL PROTECTED] wrote:
Ben Finney wrote:
Peter Otten [EMAIL PROTECTED] writes:
The problem is the structure of your program. The myset module is
Ecmascript (Jscript) is Active-Scripting compliant.
With PyWin32, you can :
- call JScript functions (with parameters)
- define pieces of code ( run it)
Another way, is to drive Internet-Explorer (via COM). You can set the
IE-Windows as invisible, and connect the motor of execution
On Tue, 01 Jul 2008 12:02:24 +, Ben Bullock wrote:
I'm a big fan of code samples - most of my code starts as other people's
code samples.
What I think is missing, Xah, is that the actual result. I.e, showing that
you can do this only covers less than half of the tutorial, showing what
the
Mark Dickinson wrote:
On Jul 5, 1:54 pm, Carl Banks [EMAIL PROTECTED] wrote:
Part of the problem is a lack of agreement on what
'regular expression' means.
Twenty years ago, there was. Calling a extended re-derived grammar
expression like Perl's a 'regular-expression' is a bit like
[EMAIL PROTECTED] wrote:
H!
I using a script that opens a internet page in a small window (what I
can control)
In XP everything was working fine, but now I'm using Vista with IE7
and this is what happends now:
First a small window opens at the postion x0 y0 (like I want) but then
IE thinks
Terry Reedy [EMAIL PROTECTED]:
Mark Dickinson wrote:
On Jul 5, 1:54 pm, Carl Banks [EMAIL PROTECTED] wrote:
Part of the problem is a lack of agreement on what
'regular expression' means.
Twenty years ago, there was. Calling a extended re-derived grammar
expression like Perl's a
In Python, I retrive an Entity from the EntityList:
elist = EntityList()
elist.append(Entity())
elist.append(Entity())
entity = elist.get_at(0)
entity.foo()
But it crashes inside foo() as the private static data is empty; or
rather the string array is empty. I know before that point that the
Bill Davy [EMAIL PROTECTED] wrote:
I am trying to edit Contacts in Outlook. This is so I can transfer numbers
from my address book which is an Excel spreadsheet to my mobile phone.
Are you actually running Outlook? Your news posting was made from Outlook
Express, and Outlook Express cannot be
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
for my Python application (Windows platform) to be standards
compliant, I need to embbed Ecmascript(Javascript) interpreter - I
need to execute plugins written in this language.
What standard are you hoping to comply with? I mean, what kind of a
Kevin Goodsell [EMAIL PROTECTED] added the comment:
Here's a small test script.
Added file: http://bugs.python.org/file10813/test.py
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1754483
___
Mark Dickinson [EMAIL PROTECTED] added the comment:
In the interests of getting early feedback, here's half a patch,
containing an implementation of from.fromhex and tests.
Still to come: float.hex and documentation.
I'll ask on python-dev about C99 and %a.
Added file:
Mark Dickinson [EMAIL PROTECTED] added the comment:
containing an implementation of from.fromhex and tests.
That should be 'float.fromhex', not 'from.fromhex'.
I should also have said that this patch is against the trunk; only minor
changes should be required for py3k.
Changes by Georg Brandl [EMAIL PROTECTED]:
--
assignee: - georg.brandl
nosy: +georg.brandl
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1754483
___
Georg Brandl [EMAIL PROTECTED] added the comment:
Committed in r64722. Thanks everyone!
--
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
___
New submission from Mark Dickinson [EMAIL PROTECTED]:
The float.as_integer_ratio method needs to be documented somewhere other
than whatsnew/2.6.rst.
--
assignee: georg.brandl
components: Documentation
messages: 69277
nosy: georg.brandl, marketdickinson
severity: normal
status: open
Mark Dickinson [EMAIL PROTECTED] added the comment:
Here's an updated patch, complete with both float methods and
documentation.
Added file: http://bugs.python.org/file10815/hex_float2.patch
___
Python tracker [EMAIL PROTECTED]
Hans Ulrich Niedermann [EMAIL PROTECTED] added the comment:
Even with that patch, I'm still getting backtraces similar to this:
Traceback (most recent call last):
File /home/user/foo/src/foo, line 83, in module
foomain(sys.argv)
File /home/uli/foo/src/foo, line 79, in foomain
Mark Dickinson [EMAIL PROTECTED] added the comment:
Add updated patch with expanded documentation.
Added file: http://bugs.python.org/file10816/hex_float2.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3008
Changes by Mark Dickinson [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file10815/hex_float2.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3008
___
Mark Dickinson [EMAIL PROTECTED] added the comment:
Checked in, r64729.
--
resolution: - accepted
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3188
___
Mark Dickinson [EMAIL PROTECTED] added the comment:
Thanks, Jean. I've checked in your workaround in r64735.
Leaving this open for now as a reminder about finite/is_finite.
--
resolution: - fixed
___
Python tracker [EMAIL PROTECTED]
Antoine Pitrou [EMAIL PROTECTED] added the comment:
If I try to follow the chain the consequences:
- all PyArg_ParseTuple(s#) calls that release the GIL afterwards
should be re-written to use another API (which one I don't know exactly,
but hopefully the appropriate functions are already
Antoine Pitrou [EMAIL PROTECTED] added the comment:
By the way, here's a more reliable way to make it crash (on my Linux
machine):
import bz2, threading
bz2c = bz2.BZ2Compressor()
# Span at least a whole arena (256KB long)
junk_len = 512 * 1024
junk = ba * junk_len
buf = bytearray()
for x in
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Now I've just discovered there is the same problem with the
array.array() type (see following code).
import bz2, threading, array
bz2c = bz2.BZ2Compressor()
# Span at least a whole arena (256KB long)
junk_len = 512 * 1024
junk =
New submission from Sacha Varma [EMAIL PROTECTED]:
As I understand it, python-config --cflags is intended to yield the C
compiler flags needed to compile a program that uses Python headers and
libraries (as opposed to the C flags needed to compile python itself).
However, it seems to include
Facundo Batista [EMAIL PROTECTED] added the comment:
Commited in r64745. Thanks for this patch!
--
nosy: +facundobatista
resolution: - accepted
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3289
Mark Dickinson [EMAIL PROTECTED] added the comment:
There is another, perhaps related issue on Solaris. The compiler warns
that function finite is implicitly defined.
Commenting out this line in pyconfig.h as
/* #define HAVE_FINITE 1 */
make that warning go away. If there is no
Martin v. Löwis [EMAIL PROTECTED] added the comment:
Georg, what do you think?
--
assignee: - georg.brandl
nosy: +georg.brandl, loewis
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3290
___
New submission from Antoine Pitrou [EMAIL PROTECTED]:
In the latest py3k versions, rlcompleter doesn't work anymore. Pressing
the tab key (with tab-completion enabled) doesn't produce anything on
screen.
--
components: Library (Lib)
messages: 69293
nosy: pitrou
severity: normal
status:
Benjamin Peterson [EMAIL PROTECTED] added the comment:
Antoine, can you try it before r64671?
--
nosy: +benjamin.peterson
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3291
___
Facundo Batista [EMAIL PROTECTED] added the comment:
Commited in r64746. Thank you!!
--
resolution: - accepted
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3239
___
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Le samedi 05 juillet 2008 à 20:32 +, Benjamin Peterson a écrit :
Benjamin Peterson [EMAIL PROTECTED] added the comment:
Antoine, can you try it before r64671?
Bingo, the regression occurs exactly at r64671.
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Here is a fix (in addition to the one you already committed).
--
keywords: +patch
Added file: http://bugs.python.org/file10820/rlcompleter.patch
___
Python tracker [EMAIL PROTECTED]
Benjamin Peterson [EMAIL PROTECTED] added the comment:
Thanks for the report and the fix! (committed in r64748)
--
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3291
Antoine Pitrou [EMAIL PROTECTED] added the comment:
http://codereview.appspot.com/2439
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2834
___
___
New submission from Terry J. Reedy [EMAIL PROTECTED]:
Suggested changes to Lib Ref Manual: Sequence Types --...(3.6 for 2.5)
(These are mostly based on an issue posted on c.l.p. The Plone
Archetypes package (which I know nothing of) was reported as suggesting
that users pass sys.maxint, to
New submission from Antoine Pitrou [EMAIL PROTECTED]:
The declaration for PyObject_ReleaseBuffer (in Include/abstract.h) has
the following comments attached to it. But the part about the return
value is wrong since the function is defined as returning void. Also,
PEP 3118 says it always succeeds
Martin v. Löwis [EMAIL PROTECTED] added the comment:
I believe the 2.6 s# processing works correctly; the error is in the
bytearray object. This either shouldn't support the buffer interface, or
it shouldn't reallocate the buffer after having returned a pointer to it.
For 3k, convertbuffer
New submission from Antoine Pitrou [EMAIL PROTECTED]:
In the py3k SVN branch I can see the following link. I suppose it is a
mistake?
$ ls -la Mac/IDLE/IDLE.app/Contents/MacOS/Python
lrwxrwxrwx 1 antoine antoine 92 2008-07-01 22:33
Mac/IDLE/IDLE.app/Contents/MacOS/Python -
Antoine Pitrou [EMAIL PROTECTED] added the comment:
For reference, here is a proof-of-concept patch which shows how to fix
the bytearray crasher above (it raises a BufferError instead).
Added file: http://bugs.python.org/file10822/bzcrash.py
___
Python
Changes by Antoine Pitrou [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file10822/bzcrash.py
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3139
___
Changes by Antoine Pitrou [EMAIL PROTECTED]:
Added file: http://bugs.python.org/file10823/bzcrash.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3139
___
Benjamin Peterson [EMAIL PROTECTED] added the comment:
Fixed in r64749.
--
assignee: - benjamin.peterson
nosy: +benjamin.peterson
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3294
New submission from Florian Mayer [EMAIL PROTECTED]:
It is for sure only a minor issue, but the new tutorial should not
confuse readers as the print function is not executed here and does not
do anything at all. Patch is attached.
--
assignee: georg.brandl
components: Documentation
Benjamin Peterson [EMAIL PROTECTED] added the comment:
Done in r64751.
--
nosy: +benjamin.peterson
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3295
Benjamin Peterson [EMAIL PROTECTED] added the comment:
Thanks! Fixed in r64752.
--
nosy: +benjamin.peterson
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3296
Gregory P. Smith [EMAIL PROTECTED] added the comment:
committed to 2.6 trunk in r64753.
--
resolution: - accepted
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2862
___
Gregory P. Smith [EMAIL PROTECTED] added the comment:
committed to release25-maint in r64754.
--
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2632
___
Changes by Gregory P. Smith [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file10027/issue2620-gps01-patch.txt
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2620
___
82 matches
Mail list logo