Hi,
I have here two Python modules (see attached), where newsparser.py defines
(among other things) an object SoupReader and an exception
PageNotAvailable. This object (or its children) is then periodically
created in a loop in reprocess.py.
Now, my question is concerned with the use of exception
Matej Cepl wrote:
> Now, my question is concerned with the use of exception in SoupReader.suck.
> The idea is that when the page is not available for download, whole object
> goes up in flames, the rest of SoapReader.__init__ is skipped over, and the
> exception is then caught in reprocess.py cycle
Please will you find out why the score on your mails are that high?
My ISP is sending them directly to my spambox.
For your convenience I copied the headers.
Especially
0.8 MSGID_FROM_MTA_HEADER Message-Id was added by a relay
2.2 RCVD_IN_BL_SPAMCOP_NET Received via a relay in bl.spamcop.net
In python under windows, how can I create and access a file on the Desktop? The
following do NOT work:
fp = open(r'Desktop\myFile','r')
fp = open(r'\Desktop\myFile','r')
fp = open(r'c:\Desktop\myFile','r')
fp = open(r'c:\Windows\Desktop\myFile','r')
I don't want to drill into c:\Documents and Set
Repost - I forgot a subject
In python under windows, how can I create and access a file on the Desktop? The
following do NOT work:
fp = open(r'Desktop\myFile','r')
fp = open(r'\Desktop\myFile','r')
fp = open(r'c:\Desktop\myFile','r')
fp = open(r'c:\Windows\Desktop\myFile','r')
I don't want to d
You could use this:
import os
fp = open(os.path.expanduser('~')+r'\Desktop\myFile', 'r')
Light
> In python under windows, how can I create and access a file on the
> Desktop? The following do NOT work: fp = open(r'Desktop\myFile','r')
> fp = open(r'\Desktop\myFile','r')
> fp = open(r'c:\Desktop
-- Forwarded message --
Date: Wed, 6 Jul 2005 00:01:52 -0700 (PDT)
From: Mike Cheponis <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Case ?
On Tue, 5 Jul 2005, Danny Yoo wrote:
> On Tue, 5 Jul 2005, Mike Cheponis wrote:
>
>> Why does Python not have
On 7/6/05, Michael Huster <[EMAIL PROTECTED]> wrote:
> In python under windows, how can I create and access a file on the Desktop?
> The following do NOT work:
How about...
>>> userp = os.getenv('USERPROFILE') + '\\Desktop\\MyFile.txt'
>>> fo = file(userp, 'w')
--
_
( ) Mark Thomas ASCII
Hello list,
I'm trying to write a python wrapper for the tkDnD Tk extension to add drag and
drop support
to Tkinter. Looking for a way to give all widgets access to the newly defined
dnd methods
I came to create a subclass of Tkinter.Tk() and pass the dnd methods to
Tkinter.BaseWidget()
(all T
plz I need infor About "Problem with data storage"
Thanks__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___
Tutor maillist - Tutor@python.org
http://
On Wed, 6 Jul 2005, Michael Huster wrote:
> In python under windows, how can I create and access a file on the
> Desktop? The following do NOT work: fp = open(r'Desktop\myFile','r') fp
> = open(r'\Desktop\myFile','r') fp = open(r'c:\Desktop\myFile','r') fp =
> open(r'c:\Windows\Desktop\myFile','
Hi,
I have a file format that ends in a 4-byte (int32) number. I would
like to read this value in python on a WinXP machine with something
like:
fname = 'somefile'
f = open(fname, 'rb')
f.seek(-4,2)
offset = f.read()
... but this doesn't seem to work. The value that Python returns is:
'@\x
> > It's a proposed enhancement:
> >
> >http://www.python.org/peps/pep-0275.html
>
> Since this didn't come out in Python 2.4, is it "automatically"
> re-considered for 2.5 ?
Hello!
It's still in the "open" set of peps:
http://www.python.org/peps/
so there's no guarantee that PEP 275
This will work, but only on an English version of the OS. E.g. in Dutch the desktop is called 'Bureaublad'.On 7/6/05, Mark Thomas <
[EMAIL PROTECTED]> wrote:On 7/6/05, Michael Huster <
[EMAIL PROTECTED]> wrote:> In python under windows, how can I create and access a file on the Desktop? The followi
On Wed, 6 Jul 2005, Marcus Goldfish wrote:
> I have a file format that ends in a 4-byte (int32) number. I would like
> to read this value in python on a WinXP machine with something like:
>
> fname = 'somefile'
> f = open(fname, 'rb')
> f.seek(-4,2)
> offset = f.read()
>
> ... but this doesn't
If you like the switch statement (which I do) and believe Python should
have one (which I do) then you might take a look at this which someone
posted when I asked this same question a few months ago:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/410692
Jeff
-Original Message-
F
At 08:36 AM 7/6/2005, festus freeborn wrote:
plz I need infor About
"Problem with data storage"
We need more information. How does this question relate to Python? What
is the problem you are having? Why do you need to know?
Bob Gailer
mailto:[EMAIL PROTECTED]
510 558 3275 home
720 938 2625 cell
At 01:12 PM 7/6/2005, Marcus Goldfish wrote:
Hi,
I have a file format that ends in a 4-byte (int32) number. I
would
like to read this value in python on a WinXP machine with something
like:
fname = 'somefile'
f = open(fname, 'rb')
f.seek(-4,2)
offset = f.read()
... but this doesn't seem to work.
Quoting Michael Lange <[EMAIL PROTECTED]>:
> I'm trying to write a python wrapper for the tkDnD Tk extension to add
> drag and drop support
Hi Michael,
Just a side issue --- tkDnD seems to be broken in python 2.4: see bug 1164742,
http://sourceforge.net/tracker/index.php?func=detail&aid=1164742&
The reason why Python doresn't have a case statement is simply
because Guido didn't put one in. Why he didn't I don't know,
you'd need to ask him. But I guess that since case stateents
are simply syntactic sugar (well nearly), that providing one
might have seemed like going against Python's eth
From: "festus freeborn" <[EMAIL PROTECTED]>
> plz I need infor About "Problem with data storage"
You might need to give us a clue here.
What kind of problem? What kind of data? What kind of storage?
- for how long? how quickly retrieved?
And if its a homework exercise, which it looks like it mi
--
... but this doesn't seem to work. The value that Python returns is:
'@\x19\x01\x00'
but I know from similar code in Matlab that the correct sequence is:
64 25 1 0
Can someone point out my error?
--
That
Thanks to everyone who helped me with the
problem I had with my "age" program. I now have it working properly
(yay).
So, now I need to know how to insert a
doctype declaration into my python script so that a) the python script runs
properly and b)the page validates as valid XHTML.
Here i
gordnjen wrote:
> So, now I need to know how to insert a doctype declaration into my
> python script so that a) the python script runs properly and b)the page
> validates as valid XHTML.
>
> Here is my code below. It runs fine as a python script, but won't validate:
>
> import time
> print "C
Hi all,
I meant to ask why the main part after the password is not working right.
No one has answered that yet. When I run the code and try to load a file
that has been saved, a TypeError appears. How do I fix the code so no more
errors will show up. Here is the newest code so far:
# Thi
Hi all,
Here's one of the messages that pops up:
Traceback (most recent call last): File "D:\password.py", line
77, in ? filename == raw_input("Filename to load:
")NameError: name 'filename' is not defined
Why is it popping up whenever I try to load a file?
Here's the latest code:
26 matches
Mail list logo