ctually has a mechanism for finding out that
files have changed, so that will work.
Note that if you're doing this as a means of interprocess
communication, there are better ways.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
his probl;em in a portable way.
The code is somewhat dated, but it's on the right track.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
under Linux
or Windows. It's intended for artists who want to build projects that need
some computer control.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
d one,
you have to license a patent from Price Waterhouse. Try
"http://www.10kwizard.com/";, which has an API for retrieving this info.
It's not free.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
rs? We couldn't see a way.
That's what CGI does.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
uses that undocumented feature,
that code probably ought to come out. Comments?
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
Were Python "eggs" a flop, or what?
We need to have one packager that everyone agrees on.
Otherwise, installs become a mess, and then you have to have
installers that handle multiple packagers.
John Nagle
Gary Duzan wrote:
> In ar
000)
(For test purposes, I run with GC turned off, so if any
memory leaks, collectable or otherwise, are introduced, they're noticed.)
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
QL table type. 'charset="utf8"' tells
MySQL to do the conversion to UTF8, which can be reliably converted
to Unicode.
John Nagle
Robin Becker wrote:
> I am seeing different outcomes from simple requests against a common
> da
Robin Becker wrote:
> John Nagle wrote:
>
>> Try:
>>
>> db=MySQLdb.connect(host='appx',db='sc_0',user='user',passwd='secret',
>> use_unicode=True, charset = "utf8")
>>
>> The distinction is that
sures: Yes.
Design by contract: No.
That's Python.
Biggest headache is finding out what doesn't work in the libraries.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
nux
Don't turn off atomic transactions, use them.
Otherwise, two copies of your program running at the
same time will probably not do what you want.
Just call "commit" at the end of each transaction.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
meday, along with all-Unicode Python,
but meanwhile, the documentation should be clear about this.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
uot; for conversions.
Neither of these mentions that "str" is ASCII-only.
I think that you can use "unicode()" on any object on
which you can use "str()", but I'm not sure that's official.
Incidentally, is "repr" ASCII-only, or does it understand
Unicode? And what happens if the __str__() method of an object
returns Unicode?
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
need to access the file in
database fashion. The files are too big to read into RAM all at once,
though.
I tried "MDBtools", but the only (last) release was
a pre-release three years ago, and I've encountered
many build problems trying to make it work on Fedora
Core 6.
Diez B. Roggisch wrote:
> John Nagle schrieb:
>
>> I'm looking for something that can read .MDB files, the format
>> Microsoft Access uses, from Python. I need to do this on
>> Linux, without using Microsoft tools. I just need to read
>> the files once, so
[EMAIL PROTECTED] wrote:
> On Mar 19, 2:45 pm, John Nagle <[EMAIL PROTECTED]> wrote:
>
>>Diez B. Roggisch wrote:
>>
>>>John Nagle schrieb:
>>
>>>> I'm looking for something that can read .MDB files, the format
...
> I've read .MD
they don't scale.
MDBtools would be the right answer, if it worked. I have some questions
out on the MDBtools forum, trying to work around some build problems.
MDBtools hasn't had a release in three years, and it won't build with
Fedora Core 6.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
hat
operating system you're using. Thanks.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
Here's a useful online tool that might help you see what's happening:
http://www.sitetruth.com/experimental/viewer.html
We use this to help webmasters see what our web crawler is seeing.
This reads a page, using Python and FancyURLOpener, with a
USER-AGENT string of "SiteTruth.co
ormat converter. It's the extra
guck that has portability problems.
I posted the makefiles I used to the MDBtools forums on
SourceForge.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
error, write to a drive
reached over a network, or a removable medium like a floppy
or flash card. Open a file for writing and disconnect the
network or remove the removable medium.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
Alex Martelli wrote:
> John Nagle <[EMAIL PROTECTED]> wrote:
>...
>
>>The real problem is the published books on Python:
>>
>>"Learning Python", by Lutz and Ascher:
>>"str(string) -- returns the string representation of
Gzipped files aren't a good random access medium. It's
unlikely that anyone will implement this.
John Nagle
Paul Smith wrote:
> Hi,
>
> I'd like to read a series of sqlite database files that have already been
> gzipped and was wo
> Python performs chained assignments backwards compared to other languages...
C and C++ are both right-to-left, like Python. In Pascal,
Modula I/II/III, and Ada, assignments are not expressions, so it's not
a meaningful question there.
John Nagle
--
http
;titletext" as a string.
groups = kreextractitem.search(titletext)
if groups :
goodsitem = groups.group(1).strip()
# "goodsitem" now contains everything before "()"
This approach will work no matter where the line br
Mark T wrote:
>
> "Alex Martelli" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>> John Nagle <[EMAIL PROTECTED]> wrote:
>>
>>> Marcin Ciura wrote:
>>>
>>> > Neither would I. I must have expressed
on are version-dependent.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
ing into the size range where it may be time to
use a database.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
(page)
htags = soup.findAll({'h2':True, 'H2' : True}) # get all H2 tags, both cases
myFile = open('Soup_Results.html', 'w')
for htag in htags : # for each H2 tag
texts = htag.findAll(text=True) # find all text items within this h2
s = ' &
Robert Kern wrote:
> ZMY wrote:
>
>>I am trying to convert some old Fortran code into Python program and
>>get them work on a QNX 4.25 system. Since the program requires speed,
>>I think using Numpy is really necessary. But I haven't found anything
>>on web about using numpy on QNX 4.25 (especiall
happen, but looking at the Windows
UNICODE support, it might not be impossible.
Information needed:
- Platform (Windows, Linux, ...)
- Python version
- A hex dump of the first few bytes of the input file.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
as well as real text. What's the right way
to collect ordinary text only?
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
Duncan Booth wrote:
> John Nagle <[EMAIL PROTECTED]> wrote:
>
>
>>Strictly speaking, it's Microsoft's fault.
>>
>> title="". So all that following stuff is from what
>>follows the next "-->" which terminates a comment.
27;s probably
not worth having in Python, but there is an approach that will work.
LISP-type systems tend to be more suitable for this sort of thing.
Traditionally, LISP had the concept of a "break", where
execution could stop and the programmer (never the end user) could
interact with
tegrated environment.
Programs can be written in Python.
There's a published book ("Blender GameKit")
German documentation may be hard to come by, though.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
meric
>>>values in a string. I want to insert the '-' character to use in
>>>conjunction with the getopt.getopt() function.
' '.join(map(lambda x: '-' + x, s.split()))
assuming that you just want to put a "-" in front of each field,
regardless of its content.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
o much better. Ook!
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
ed Skin mailing list.
Find out where the time is going before spending it on that.
A good test: BeautifulSoup. Many people use it for parsing
web pages, and it's seriously compute-bound.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
Shed Skin may be able to do that job
automatically, which is a step forward and more compatible with
existing code. Doing more at compile time means doing less work
at run time, where it matters. This looks promising.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
s,
independent of the string operators.
Efficient handling of lists of bytes would do it.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
Kay Schluehr wrote:
> On Apr 1, 6:07 pm, John Nagle <[EMAIL PROTECTED]> wrote:
>
>>Kay Schluehr wrote:
>>
>>>Indeed. The only serious problem from an acceptance point of view is
>>>that Mark tried to solve the more difficult problem first and hung on
ype inference easier.
Yes. And, more than that, most programs have relatively
simple type behavior for most variables. The exotic stuff
just doesn't happen that often.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
out for ten years now.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
page as a text chunk. It's actually
HTMLParser that parses comments, so this is really an HTMLParser
level problem.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
edia. You can't even embed an image
in your program; it has to be in some completely separate file.
Interestingly, PHP breaks this model; PHP programs are web pages.
They may be on to something.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
ocessing of
ASCII strings to do that. The current setup is really a legacy of when
most things in Python didn't work in Unicode mode, and you didn't want to
introduce Unicode unnecessarily. It's another one of those obscure
Unicode "gotchas" that really should go away.
Bruno Desthuilliers wrote:
> John Nagle a écrit :
>
>> Nate Finch wrote:
> Having source code as text files may not be such a bad thing. Diffing,
> grepping and versioning binary files is not that easy...
There are tools for that sort of thing, although they're not
do not. That works adequately.
Javascript got it wrong. They have declarations, but the default,
in the absence of a declaration, is global, not local or an error.
Bad design. It's a result of retrofitting declarations to a language,
which usually has painful aftereffects.
Paul Rubin wrote:
> John Nagle <[EMAIL PROTECTED]> writes:
>
>>In a language with few declarations, it's probably best not to
>>have too many different nested scopes. Python has a reasonable
>>compromise in this area. Functions and classes have a scope,
hould be a decade into the language's life cycle.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
user=username, passwd=password, db=database)
You need to specify both "use_unicode" (which sets the
mode in MySQLdb), and "charset" (which sets the connection mode).
Once you've put all the components into these modes, you
should have end-to-end Unicode database capability.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
The documentation for Python's CGI module doesn't seem to say how to get
the IP address of the client. Don't see an obvious way to get that info
from reading the source, either. Ideas?
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
doesn't insist on cookies.
See "http://mail.python.org/pipermail/python-list/2005-March/314301.html";
for another problem involving "HTTP error -1".
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
The crash is a known bug, and is fixed in the Subversion repository,
but not in any released version. The problem is that if the server
returns an blank line, instead of "HTTP 1", httplib goes off into
some old HTTP 0.9 code that's broken.
J
John J. Lee wrote:
> John Nagle <[EMAIL PROTECTED]> writes:
> Can you create an example (preferably small) that fails? Feel free to
> email it to me if it includes something you don't want to post.
It's not a Python problem, as it turns out. It's a problem
Paul Rubin wrote:
> Less clutter, and avoids yet another temp variable
> polluting the namespace.
Are we in danger of running out of temp variables?
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
Is there a Windows binary for M2Crypto 0.18 yet?
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
pile errors in the 24,000 lines of code that come out of SWIG.
That was for M2Crypto 0.17.
It's still broken in M2Crypto 0.18.
And there's no RPM or Windows binary.
Nobody actually uses this stuff, do they?
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
Paul Boddie wrote:
> On 20 Sep, 22:12, John Nagle <[EMAIL PROTECTED]> wrote:
>
>>That was for M2Crypto 0.17.
>>
>>It's still broken in M2Crypto 0.18.
>>
>>And there's no RPM or Windows binary.
>>
>>Nobody actually
Heikki Toivonen wrote:
> John Nagle wrote:
>
>>Back in March, I posted this:
>>
>>
>>>Hit that with OpenSSL. Red Hat took elliptical curve cryptography
>>>out of Fedora 6 for patent reasons. With that missing, M2Crypto won't
>>>bui
Heikki Toivonen wrote:
> John Nagle wrote:
>
>>But notice that the -D entry didn't appear on the SWIG command line.
>>Neither did the "-includeall". The "swig_opts" values around line
>>129 aren't actually being used. I think that'
hat's what I mean by "working".
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
Alex Martelli wrote:
> John Nagle <[EMAIL PROTECTED]> wrote:
>
>> TheFlyingDutchman wrote:
>>> It seems that Python 3 is more significant for what it removes than
>>> what it adds.
>>>
>>> What are the additions that people find the most com
George Sakkis wrote:
> On Sep 28, 11:53 am, John Nagle <[EMAIL PROTECTED]> wrote:
>
>> Alex Martelli wrote:
>>> John Nagle <[EMAIL PROTECTED]> wrote:
>>>> TheFlyingDutchman wrote:
>>>>> It seems that Python 3 is more significant for
roject.org/Projects/MeTooCrypto
Any progress on getting M2Crypto 0.18 to build successfully
on Fedora Core?
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
tally bogus certificates, even ones with the wrong
domain name.
M2Crypto actually checks. M2Crypto has much better functionality,
but it's rather hard to build.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
What actually works and what doesn't in socket timeouts in
Python 2.5? What breaks with timeouts turned on? There are lots
of patches and bug reports, but no coherent summary.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
g Python will
ignore. If you can't open the site with HTTPS at all, even after bypassing
warning messages, then the certificate at the other end may be nonexistent
or invalid.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
other robots.txt files, and it
normally works. It even used to work on Wikipedia's older file.
But there's something in there now that robotparser doesn't like.
Any ideas?
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
Lawrence D'Oliveiro wrote:
> In message <[EMAIL PROTECTED]>, John Nagle
> wrote:
>
>> For some reason, Python's parser for "robots.txt" files
>> doesn't like Wikipedia's "robots.txt" file:
>>
>> >
Filip Salomonsson wrote:
> On 02/10/2007, John Nagle <[EMAIL PROTECTED]> wrote:
>> But there's something in there now that robotparser doesn't like.
>> Any ideas?
>
> Wikipedia denies _all_ access for the standard urllib user agent, and
> when the rob
John Nagle wrote:
> Heikki Toivonen wrote:
>That's progress, but the build still doesn't work:
...
> during a C compile, we get
>
> SWIG/_m2crypto_wrap.c:2529:18: error: _lib.h: No such file or directory
>
> and the build goes downhill from there, with many co
which object or class causes the problem?
>
> Thanks
>
Is this a subclass? Look at the parent classes.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
y).
> L.
SSL isn't SUPPOSED to work through proxies. That's the whole point of
SSL - to prevent somebody in the middle from tapping into the connection.
Look up "man in the middle attack".
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
;, that's the platform with the
most points.
The survey asks a question worth thinking about, but doesn't
ask it very well.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
lass and use "slots" to bind
the positions at compile time, so you don't pay for a dictionary
lookup on every feature.
(Someday I need to overhaul BeautifulSoup to use "slots".
That might speed it up.)
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
enough of the pieces.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
hy it didn't work, or why Python is still using the
old version, or something.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
you
have to have long-running threads of your own and a scheduling system
to coordinate them with the Twisted threads.
libshout's "nonblocking" mode isn't very nonblocking. See
https://trac.xiph.org/browser/icecast/trunk/libshout/examples/nonblocking.c
There's a t
u feed 0 to
"perror". It failed once on "verisign.com"'s cert, then worked
on the next try.
This is on Windows, running Python 2.4 (which is what M2Crypto
supports on Windows.)
I'm trying to make this reproduceable. More later.
John Nagle wrote:
> I just "upgraded" from M2Crypto 0.17 to M2Crypto 0.18, and I'm
> running my regression tests. I'm seeing occasional cases where
> M2Crypto raises the exception SSL.SSLError, and the associated
> error is "(0, 'Error')"
John Nagle wrote:
> John Nagle wrote:
>> I just "upgraded" from M2Crypto 0.17 to M2Crypto 0.18, and I'm
>> running my regression tests. I'm seeing occasional cases where
>> M2Crypto raises the exception SSL.SSLError, and the associated
>> error
Heikki Toivonen wrote:
> John Nagle wrote:
>> Still having trouble reproducing the problem. But somewhere,
>> something raised that bogus no-error exception three times.
>> Anything that returns "(0, 'Error')" as exception data is a bug.
>
> I
John Nagle wrote:
> Heikki Toivonen wrote:
>> John Nagle wrote:
>>> Still having trouble reproducing the problem. But somewhere,
>>> something raised that bogus no-error exception three times.
>>> Anything that returns "(0, 'Error')" as
s/US.pm.html
There are features in those regular expressions that I can't find in three
Perl books or the online documentation.
If anyone has a first-rate address parser in Python that will cover
most of the developed world, I'd like to talk to them.
John
ing and conditionals. Template inheritance would be a
> bonus.
HTMLTemplate is a minimal system for that sort of thing.
It doesn't drag in some big "framework".
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
s = u'Test'
rather than
s = 'Test'
Instead of "str()", use "unicode()".
Once everything is set up like this, you can pass Unicode in and out of MySQL
databases freely, and all the SQL commands will work properly on Unicode data.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
ing byte-strings with unicode-objects. That's what the
> use_unicod-parameter is for: it makes the API accept and deliver
> unicod-objects. But it would do so even if the charset-parameter was
> "latin1".
Yes, and that's taken care of if the connection is set up as above.
For legacy reasons, there are both "unicode" and "charset" parameters
to "connect", and they can be set in incompatible ways.
Also, you need MySQL 5 or later to get full Unicode support.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
World of Warcraft guild?
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
Tried that on Python 2.5 on Windows and it worked.
John Nagle
Abandoned wrote:
> Hi..
> I want to threading but i have a interesting error..
> ==
> class SelectAll(threading.Thread):
>def __init__(self, name):
>
ete, do zombies accumulate under UNIX/Linux?
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
detail&aid=1651995&group_id=5470&atid=105470
This is only happening for Python bugs; bugs in non-Python areas are still
accessable. So it's not a general SourceForge bug.
Is this a dumb policy change or a dumb administrator action?
John Nagle
Jean-Paul Calderone wrote:
> On Wed, 31 Oct 2007 07:53:01 -0700, John Nagle <[EMAIL PROTECTED]> wrote:
>> I'm now getting messages like this from the Python bug tracker on
>> SourceForge:
>>
>> Artifact: This Artifact Has Been Made Private. Only Group Membe
ut() breaks smtplib.starttls()
But that should have been fixed in Python 2.4.4, right? Or did that patch
not make it in?
John Nagle
(And no, I can't run Python 2.5, because MySQLdb support doesn't work for
2.5 yet.)
he certificate itself in some reasonably sane form.
And I need to time out an SSL connection if it can't connect and
verify within 4 seconds. It's embarassing that this doesn't work,
despite four different wrappers for OpenSSL.
I'm willing to spend a few hundred dollars towards making this happen.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
not
return certificate" errors.
John Nagle
Animats
--
http://mail.python.org/mailman/listinfo/python-list
ASN1_STRFLGS_UTF8_CONVERT flag on as_text, but unclear if the
M2 glue code handles this correctly. Haven't found a UTF8 cert
to test it on yet.
Other than that, I'm having relatively good results with M2Crypto.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
Heikki Toivonen wrote:
> John Nagle wrote:
>
>>def connect(self, addr):
>>self.socket.connect(addr)
>>self.addr = addr
>>self.socket.settimeout(None) # Back to normal timeout (NEW)
>
>
> I am not sure if this is always appropriate. In fact, do
Heikki Toivonen wrote:
> John Nagle wrote:
>
>> A list of small problems and bugs in the current M2Crypto:
>>I need to look at SSL certificates in some detail, so this
>>is all about the access functions for certificates.
>
>
> Thanks, got the reports, w
401 - 500 of 1270 matches
Mail list logo