"Fidel Sanchez-Bueno" wrote
What is the best aproach when it comes to import??, is allways better to
make all the import calls in the global scope, making the overall runtime
of the program better because the program is not going to import
something everytime a function is called, or is bett
On Fri, Aug 28, 2009 at 10:34 PM, Fidel
Sanchez-Bueno wrote:
> What is the best aproach when it comes to import??, is allways better to
> make all the import calls in the global scope, making the overall runtime of
> the program better because the program is not going to import something
> everytim
On Fri, 2009-08-28 at 12:24 -0400, Dave Angel wrote:
> > Thank you Dave, very helpful as ever. I made a few tests and experiments
> > to understand better, and I feel I am understanding how it works.
> > Although the mechanic of this is increasingly clear, the logic behind is
> > still a bit obscur
On Fri, 2009-08-28 at 18:03 +0100, Alan Gauld wrote:
> "Mac Ryan" wrote
>
> > I am not sure I understood the difference between staticmethod end
> > classmethod, though, even if I can guess it has to do with subclassing,
>
> I think it is mainly historical. staticmethod came first (I think) and
On Fri, Aug 28, 2009 at 10:16 PM, Ishan Puri wrote:
emma = nltk.corpus.gutenberg.words('austen-emma.txt')
len(emma)
> 192427
>
> So this is the number of words in a particular 'austen-emma.txt'. How would
> I do this
> with my IM50re.txt? It
> seems the code "nltk.corpus.gutenberg.words
> What is still unclear to me, is what the staticmethods are for, though:
> since the reference to the object instance or to the class object are
> stripped away from the call, I wonder why not to use a module function
> instead.
First recall that xsstatic methods were historically the first att
Damon Timm wrote:
Sorry for the double post! Went off by mistake before I was done ...
Anyhow, I would like to have a tuple defined at the beginning of my
code that includes classes *before* they are defined ... as such (this
is on-the-fly-hack-code just for demonstrating my question):
What
thanks both (Alan and Kent)!
now am clear about the right way of making import..
salu2..
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On Sat, 2009-08-29 at 11:44 +, ALAN GAULD wrote:
> First recall that xsstatic methods were historically the first attempt at
> giving Python class methods. (They were called staticmethods because
> C++ and Java define their class methods using the label 'static' )
> ...
> > The only differenc
Hello!
I want to convert compiled files to text files.
I believe compiled files are binary files.
I am able to convert a given string to binary and back to text.
But when it comes to a file it is proving to be impossible.
def p(a):
s=open(a,'rb')
for x in s:
d=map(lambda y
>On 8/29/09, Geneviève DIAGORN wrote:
>
> >Bonjour,
> >Je suis absente jusqu'au 02/09 inclus.
> >En cas d'urgence Soprane, contacter notre adresse générique
> >projet.sopr...@teamlog.com.
> >Cordialement.
>
> >Geneviève
I dont know your language.Please communicate in English.
I am using the cod
Hi Everyone - thanks for your responses. Answered my direct questions:
[1] can't be done at the top and
[2] would have to move the tuple somewhere else
as well as gave me some new ideas about completely rethinking the
design ... I love keeping the RE definitions with the child classes
... makes
On Sat, 2009-08-29 at 18:42 +0530, prasad rao wrote:
> >On 8/29/09, Geneviève DIAGORN wrote:
> >Bonjour,
> >Je suis absente jusqu'au 02/09 inclus.
> >En cas d'urgence Soprane, contacter notre adresse générique
> >projet.sopr...@teamlog.com.
> >Cordialement
Hi,
Yes! It works! I guess I am asking how did you know to use
wordlists.words('IM50re.txt')? Is this a specific command, as I believe it was
not in the book?
Thanks.
From: Kent Johnson
To: Ishan Puri
Cc: *tutor python
Sent: Saturday, August 29,
Damon Timm wrote:
Hi Everyone - thanks for your responses. Answered my direct questions:
[1] can't be done at the top and
actually you can, but it's opening a can of worms that I wouldn't dare
to go near:
VIDEO_RE = {
re.compile(r'regex here'): 'Youtube',
re.compile(r'regex there')
Hi again - thanks for your help with my question early today (and last
night). Tried searching google for this next question but can't get
an answer ... here is what I would like to do (but it is not working)
...
>>>dict = {'test1': 'value1', 'test2': 'value2', 'test3': 'value3'}
>>> class Test()
On Sat, 2009-08-29 at 16:31 -0400, Damon Timm wrote:
> Hi again - thanks for your help with my question early today (and last
> night). Tried searching google for this next question but can't get
> an answer ... here is what I would like to do (but it is not working)
> ...
>
> >>>dict = {'test1':
Hi, I was wondering if anyone could point me in the right direction as
far as the best way to use python to update html. Specifically, I have
a python script which coordinates the rendering of image sequences to
disk (rendered from Nuke, the compositing program) and also automates
the creation
On Sat, Aug 29, 2009 at 2:08 PM, Ishan Puri wrote:
> Hi,
> Yes! It works! I guess I am asking how did you know to use
> wordlists.words('IM50re.txt')? Is this a specific command, as I believe it
> was not in the book?
It is taken directly from the example in the book:
>>> wordlists.fileids()
[
On Sat, Aug 29, 2009 at 9:02 AM, prasad rao wrote:
> Hello!
> I want to convert compiled files to text files.
>
> I believe compiled files are binary files.
I don't understand what you are trying to do. Do you mean compiled
Python files, e.g. .pyc files?
Kent
Hey! I am a newbie too but it works for me:
>>> class Test(object):
... def __init__(self,dict):
... for key in dict:
... self.__setattr__(key,dict[key])
...
>>> t = Test()
>>> t.test1
'hi there'
>>> t.test2
'not so much'
>>> t.test3
'etc'
Thanks!
On Sat, Aug 29, 2009 at 4:59 PM, M
"prasad rao" wrote
I want to convert compiled files to text files.
I believe compiled files are binary files.
If you are talking about compiled executables made from C++ for
example yes. But...
I am able to convert a given string to binary and back to text.
They are not just binary rep
"pedro" wrote
Hi, I was wondering if anyone could point me in the right direction as
far as the best way to use python to update html.
There are a number of modules in the standard library that can help
but the best known module for this is BeautifulSoup which you have
to download - try G
On Sat, Aug 29, 2009 at 6:30 PM, Damon Timm wrote:
> Hey! I am a newbie too but it works for me:
>
class Test(object):
> ... def __init__(self,dict):
> ... for key in dict:
> ... self.__setattr__(key,dict[key])
Use the setattr() builtin:
setattr(self, key, dict[key]}
or just
d
On 2009-08-29 19:34:15 -0400, "Alan Gauld" said:
"pedro" wrote
Hi, I was wondering if anyone could point me in the right direction as
far as the best way to use python to update html.
There are a number of modules in the standard library that can help
but the best known module for this is
25 matches
Mail list logo