If it makes you feel any better, this isn't an easy problem to get 100%
right, traditionally. Heck, it might not even be possible.
A series of compromises might be the best you can hope for.
Some things to think about, however. Can you choose the
characters you want, instead of the (many, many
> I have been using winpdb recently, it is a pretty decent standalone Python
> debugger for Windows. http://www.digitalpeers.com/pythondebugger/
It looks the part and I've downloaded a copy.
Thamks for the tip,
Alan g
___
Tutor maillist - Tutor@py
Hi tutors, in my application I found convenient to store all the data
in a data structure based on a dictionary containing a lot of keys,
and each of them host other dictionary with lists and dictionaries
nested inside and so on...
First of all I'd like to know if it is normal to use so complex da
On Monday 10 of October 2005 20:10, Oliver Maunder wrote:
> > >Simple question: Is it possible to stop a running function after certain
> > >predefined time?
> > >
> > >I would like to convert this routine to Python using pycurl module, or
> >
> > maybe
> >
> > >even standard urllib.urlretrieve.
>
Thank you, Andrew, for your wise and thoughtful comments.
Andrew P wrote at 23:58 10/10/2005:
>If it makes you feel any better, this isn't an easy problem to get 100%
>right, traditionally. Heck, it might not even be possible. A series of
>compromises might be the best you can hope for.
Yes,
Kent Johnson wrote:
> Roel Schroeven wrote:
>
>> Danny Yoo wrote:
>>
>>
>>> Looking at pageimgs(): I'm not sure what 't' means in the open
>>> statement:
>>>
>>> f = open(filename, "rt")
>>
>> It's not a typo. 't' opens the file in text mode.
>
>
> Are you sure? Is that documented anywhere?
John Fouhy wrote at 14:47 10/10/2005:
>Some comments:
>
>
>textAsString = input.read()
>
>S = ""
>for c in textAsString:
> if c == "\n":
> S += ' '
> else:
> S += c
>
>
>You could write this more concisely as:
>
>S = textAsString.replace('\n', ' ')
Yes! Thanks. Tha
Kent Johnson wrote at 15:25 10/10/2005:
>Dick Moores wrote:
> > Specifically, I'm hoping for comments on or help with:
> > 1) How to debug. I'm using v2.4, IDLE on Win XP.
>
>I have been using winpdb recently, it is a pretty decent standalone
>Python debugger for Windows. Start it with the -t swi
Danny Yoo wrote at 15:47 10/10/2005:
> > 3) No modularization. Couldn't see a reason to do so. Is there one or
> > two? Specifically, what sections should become modules, if any?
>
>
>Hi Dick,
>
>My recommendation is to practice using and writing functions.
I certainly will, Danny. You've convinc
On Mon, 10 Oct 2005 17:07:47 -0600
Joseph Quigley <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Unfortunately I get this error:
>
> Exception in Tkinter callback
> Traceback (most recent call last):
> File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 1345, in __call__
> return self.func(*args)
> File "P
Exceptional Python Ladies and Gents
How about to make this great wordFrequency.py script
to support Unicode/Locale wordFrequency.py for example
this is an Arabic code page 1256 windows
I guess it is a matter of character encoding. Try
execute the following command before running
wordFrequency.py
> First of all I'd like to know if it is normal to use so complex data
> structures in which store data, or if it possible in some way to
> organize them using smaller "organizational units".
Its not uncommon but often it can be simplified by using classes.
In particular the classes can expose an
Firstly are you using this to store or alter data regarding Microsoft
Active Directory?. If so I suggest you look at some of their ADSI /
WMI interfaces for COM (if you use win32com from Mark Hammond or
activeState life becomes a lot easier. Well the Windows programming
part of it does)
As for the
2005/10/11, paul brian <[EMAIL PROTECTED]>:
> Firstly are you using this to store or alter data regarding Microsoft
> Active Directory?. If so I suggest you look at some of their ADSI /
> WMI interfaces for COM (if you use win32com from Mark Hammond or
> activeState life becomes a lot easier. Well
Dick Moores wrote:
> (Execution took about 30 sec. with my computer.)
That's way too long
>
> Specifically, I'm hoping for comments on or help with:
> 2) I've tried to put in remarks that will help most anyone to understand
> what the code is doing. Have I succeeded?
Yes, i think so
> 3) No mo
hello,
when i run the following code to Read and tokenize data from a tagged text as follows :
from nltk.corpus import brownfrom nltk.tagger import TaggedTokenizerfrom nltk.tokenizer import *tagged_txt_str=open('corpus.txt' ).read()tagged_txt_token=Token(TEXT=tagged_txt_str)TaggedTokenizer.token
What version of NLTK are you using? From a look at the API docs,
nltk.tagger.TaggedTokenizer seems to have been removed in v1.4.
Kent
enas khalil wrote:
> hello,
>
>
> when i run the following code to Read and tokenize data from a
> tagged text as follows :
>
>
>
> You are welcome. This time I would like to help you but the code is
> incomplete
> (import error for Image) and I have never used urllib2 so I don't really know
> what to
> do.
> Again, try to debug it with pdb. Place "import pdb; pdb.set_trace()" where
> you want
> the break point and see
Hi
from nltk.tagger import TaggedTokenizer
I’m not familiar with this module but looking at the error it
looks like the TaggedTokenizer module maybe misspelled or does not exists or
the same with tagger
Maybe an upcase letter or something like that
Check your library for the correct
Kent Johnson wrote at 03:24 10/11/2005:
>Dick Moores wrote:
> > (Execution took about 30 sec. with my computer.)
>
>That's way too long
How long would you expect? I've already made some changes but haven't
seen the time change much.
> >
> > Specifically, I'm hoping for comments on or help with:
Dick Moores wrote:
> Kent Johnson wrote at 03:24 10/11/2005:
>
>>Dick Moores wrote:
>>
>>>(Execution took about 30 sec. with my computer.)
>>
>>That's way too long
>
>
> How long would you expect? I've already made some changes but haven't
> seen the time change much.
A couple of seconds at mo
Kent Johnson wrote:
> Dick Moores wrote:
>
>> Kent Johnson wrote at 03:24 10/11/2005:
>>
>>> Dick Moores wrote:
>>>
(Execution took about 30 sec. with my computer.)
>>>
>>>
>>> That's way too long
>>
>>
>>
>> How long would you expect? I've already made some changes but haven't
>> seen the t
-- Forwarded message --
Date: Tue, 11 Oct 2005 20:55:24 +0200
From: lmac <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: Re:code improvement for beginner ?
Danny Yoo wrote:
>
>>>The point of this restructuring is to allow you to add more image
>>>types without too
Kent Johnson wrote at 10:37 10/11/2005:
>Kent Johnson wrote:
> > Dick Moores wrote:
> >
> >> Kent Johnson wrote at 03:24 10/11/2005:
> >>
> >>> Dick Moores wrote:
> >>>
> (Execution took about 30 sec. with my computer.)
> >>>
> >>>
> >>> That's way too long
> >>
> >>
> >>
> >> How long would y
Dick Moores wrote:
> Kent Johnson wrote at 10:37 10/11/2005:
>>The reason psyco doesn't make much difference is because all the time is
>>spent in list.count() which is already C code.
>
>
> Ah. But how can I know what is in C code and what isn't? For example, in
> a previous post you say that
Just want to add a little something here, because reading over this thread, I think there may have been some confusion:
Kent wrote:
for e in saveRemovedForLaterL: L.append(e)could be
L.extend(e)
I think he might have meant:
for e in saveRemovedForLaterL: L.append(e)could be
L.extend(sav
Andrew P wrote:
> Just want to add a little something here, because reading over this
> thread, I think there may have been some confusion:
>
> Kent wrote:
>
> for e in saveRemovedForLaterL:
>L.append(e)
> could be
> L.extend(e)
>
> I think he might have meant:
>
> for e in saveRemovedForL
lmac wrote:
> ---
>
>The problem with downloading the images is this:
>
>-
>http://images.nfl.com/images/globalnav-shadow-gray.gif
>Traceback (most recent call last):
> File "/home/internet/bin/nflgrab.py", line 167, in ?
>urllib.urlretrieve(img,img[f:])
> File "/usr/
28 matches
Mail list logo