On Tue, Oct 27, 2009 at 7:24 PM, Dave Angel wrote:
> (For some reason you keep top-posting. Add your comments to the end, or
> inline if appropriate)
>
Hi Dave,
Noted the top posting thing thanks for reminding :-)
>
> In an earlier example, you already had a for loop on the log_file so the
>
On 10/27/2009 12:15 PM Vincent Jones said...
I created database using the 'python manage.py sycdb'
You're likely to get answers quickly on the django mailing list.
Emile
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
On Tue, Oct 27, 2009 at 3:02 PM, Albert-Jan Roskam wrote:
> I thought reimplementing dict was a matter of defining a __dict__ attribute
> in the Bar class? And isn't the normal dict inherited anyway? (through
> __super__)
>
> Or, if one would want to disable inheritance of the normal dict, one c
On Tue, Oct 27, 2009 at 10:14 AM, Dave Angel wrote:
>
> But if the file contained 0.00 as one of its items, this code would still
> have the other problem I mentioned.
>
> DaveA
> ___
> Tutor maillist - tu...@python.org
> To unsubscribe or change sub
On Tue, Oct 27, 2009 at 12:49 PM, Alan Gauld wrote:
>
> "Wayne" wrote
>
>> My favorite example (and the easiest to understand) deals with shapes:
>>
>> class Shape:
>>def __init__(self):
>> self.sides = 0
>> self.area = 0
>>
>> class Triangle(Shape):
>>Shape.__init__(self)
>>
I created database using the 'python manage.py sycdb'
then proceeded to 'python manage.py sql bookmarks'
and i receive this error:
Error: App with label bookmarks could not be found. Are you sure your
INSTALLED_APPS settings is correct?
I go to Settings py and the INSTALLED_APPS is 'django_bookm
I thought reimplementing dict was a matter of defining a __dict__ attribute in
the Bar class? And isn't the normal dict inherited anyway? (through __super__)
Or, if one would want to disable inheritance of the normal dict, one could use
__slots__. Right?
Or did I misinterpret the New Testament
On Tue, Oct 27, 2009 at 5:33 AM, bibi midi wrote:
> #!/usr/bin/env python
> # -*- coding: utf-8 -*-
>
> '''
> Calculate internet data consumption
> of service provider
> Code as per help of python tutor mailing list
> Created: 26-Oct-2009
>
> '''
>
> intro = raw_input('press enter to view your int
On Tue, Oct 27, 2009 at 10:14 AM, Dave Angel wrote:
> Benno Lang wrote:
>>
>> On Tue, Oct 27, 2009 at 8:21 AM, Dave Angel wrote:
>>
>>>
>>> I agree with Luke's comments. But I'd like to point out an apparent bug
>>> (I
>>> haven't tried the code, this is just by inspection).
>>>
>>> You use the
"Wayne" wrote
My favorite example (and the easiest to understand) deals with shapes:
class Shape:
def __init__(self):
self.sides = 0
self.area = 0
class Triangle(Shape):
Shape.__init__(self)
def __init__(self, base=0, height=0):
self.sides = 3
self.
"John" wrote
> >>> class Bar(dict):
> >>> pass
> >>>
> >>> foo = {'a':100, 'b':200, 'c': 300}
> >>> myvar = Bar()
> >>> myvar.update(foo)
> >>> myvar
>
> {'a': 100, 'c': 300, 'b': 200}
Hey guru's could one of you explain why such a subclass is needed. How
would
it be used. I'm not su
wrote
How do you connect to a different server using python?
(I have not used python before)
Have you programmed before? If so in what languages?
If you are a complete novice any kind of network programming
is quite a challenge. If you are experienced can you give us
a bit more context?
-
hey gang, not sure i made the original announcement on this list a few
months ago, but if you're on this list because you need to learn
Python as quickly and as in-depth as possible for an immediate need, i
have few more openings in my upcoming course in San Francisco, and
below is the reminder i'v
On Tue, Oct 27, 2009 at 11:35 AM, wrote:
> Hi there,
>
> How do you connect to a different server using python? (I have not used
> python before)
What kind of connection? The Python standard library includes modules
which support raw sockets, http, ftp, smtp, xml-rpc and probably a few
others. P
On Tue, Oct 27, 2009 at 10:35 AM, wrote:
> Hi there,
>
> How do you connect to a different server using python? (I have not used
> python before)
>
What kind of server? What do you ultimately want to do?
see: http://catb.org/~esr/faqs/smart-questions.html#beprecise
for more info about asking
Hi there,
How do you connect to a different server using python? (I have not used python
before)
Your help would be much appreciated.
Kindest Regards,
Dave
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http:/
(For some reason you keep top-posting. Add your comments to the end, or
inline if appropriate)
bibi midi wrote:
Yep it works! I understand now it iterates on each line and replaces the old
elements with the new ones. In the end you get the latest date of the last
line of log.
I will work on t
Benno Lang wrote:
On Tue, Oct 27, 2009 at 8:21 AM, Dave Angel wrote:
I agree with Luke's comments. But I'd like to point out an apparent bug (I
haven't tried the code, this is just by inspection).
You use the test
if '0' in row[.]
that's not going to check for a zero value, it's g
On Tue, Oct 27, 2009 at 10:20 AM, John wrote:
>
> Hey guru's could one of you explain why such a subclass is needed. How
> would
> it be used. I'm not sure but does not the deepcopy() work as above?
A subclass is useful for when you want to do pretty much what another class
does, only with so
On Tuesday 27 October 2009 06:25:13 am John wrote:
> I use a 'SuperDict' all the time in my code. Not sure it's a good idea, but
> I find it convenient. Also, I wouldn't mind comments on why/why not to use
> something like this:
>
> class SuperDict(dict):
> def __getattr__(self, attr):
>
I use a 'SuperDict' all the time in my code. Not sure it's a good idea, but
I find it convenient. Also, I wouldn't mind comments on why/why not to use
something like this:
class SuperDict(dict):
def __getattr__(self, attr):
return self[attr]
def __setattr__(self, attr, value):
Yep it works! I understand now it iterates on each line and replaces the old
elements with the new ones. In the end you get the latest date of the last
line of log.
I will work on the exception handling and other refinements. Thanks.
On Tue, Oct 27, 2009 at 8:41 AM, Christian Witts wrote:
>
>
Modulok wrote:
List,
I'm new to the list, (somewhat new to python too). My code feels
hacky. I'd like to know if there is a more eloquent way (more below).
If not, a general thumbs up from more experienced programmers would be
great!
Assume I have a dict, 'foo'. I also have my own class, 'Bar',
bibi midi wrote:
Hey Christian,
There seems to be a missing parenthesis in your join function below.
Correct me if I'm wrong.
I can live with ppp's time format for now. My script is not
world-changing anyway :-). How do i know I'm on the last line of the
log file per the code below? Just as
Hey Christian,
There seems to be a missing parenthesis in your join function below. Correct
me if I'm wrong.
I can live with ppp's time format for now. My script is not world-changing
anyway :-). How do i know I'm on the last line of the log file per the code
below? Just asking as I'm away from m
List,
I'm new to the list, (somewhat new to python too). My code feels
hacky. I'd like to know if there is a more eloquent way (more below).
If not, a general thumbs up from more experienced programmers would be
great!
Assume I have a dict, 'foo'. I also have my own class, 'Bar', which
subclasses
bibi midi wrote:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Calculate internet data consumption
of service provider
Code as per help of python tutor mailing list
Created: 26-Oct-2009
'''
intro = raw_input('press enter to view your internet data consumption: ')
log_file = '/home/bboymen/
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Calculate internet data consumption
of service provider
Code as per help of python tutor mailing list
Created: 26-Oct-2009
'''
intro = raw_input('press enter to view your internet data consumption: ')
log_file = '/home/bboymen/mobily.data.plan'
to
On Tue, Oct 27, 2009 at 8:21 AM, Dave Angel wrote:
> I agree with Luke's comments. But I'd like to point out an apparent bug (I
> haven't tried the code, this is just by inspection).
>
> You use the test
> if '0' in row[.]
>
> that's not going to check for a zero value, it's going to chec
29 matches
Mail list logo