Hello,

Does anyone have a program that will read txt file data and insert -9999
or similar for missing data?  I have 10minute data and there are hour
chunks that are missing that need a missing data insert for that missing
hour but not the 10min period.  The txt file has a date column (yymmdd),
a time (hhmm) column and the rest are data columns shown below.  See
column 1 below with i

080618 1000  4.62  7.00 227.0  -3.38  -3.15   0.00 9999.99 9999.99  0.91
080618 1410  5.19  7.30 232.0  -4.09  -3.20   0.00 9999.99 9999.99  1.03
 
Muchas gracias,



Randall P. Benson, PhD
Global Technical Division/Energy Resources
O:  503-796-7129
M: 971-227-2477


-----Original Message-----
From: tutor-bounces+randall.benson=iberdrolaren....@python.org
[mailto:tutor-bounces+randall.benson=iberdrolaren....@python.org] On
Behalf Of Corey Richardson
Sent: Monday, January 10, 2011 1:25 PM
To: tutor@python.org
Subject: Re: [Tutor] __init__() - is it required?

On 01/09/2011 04:27 PM, Steven D'Aprano wrote:
> Corey Richardson wrote:
>> Do all classes need an __init__() method? I have classes that look
much
>> like this one starts out:
>>
>> class GenerateXML(object):
>>     """Defines methods to be inherited for StaticXML and
AnimationXML"""
>>     def __init__(self):
>>         pass
>>
>> I would rather not do that. Code without it runs fine, but will there
be
>> any negative consequences down the road? Does object define an
__init__
>> method for me?
> 
> You don't need to define an __init__ if you don't need one. A 
> placeholder __init__ that does nothing, as above, is a waste of space.
> 
> object includes an __init__ method that not only does nothing, but 
> ignores any arguments you pass to it:
> 
>  >>> object.__init__
> <slot wrapper '__init__' of 'object' objects>
>  >>> object.__init__(1, 2, 3)
>  >>>
> 
> In Python 2.x, you can have "old-style" classes that don't inherit
from 
> object. They too don't need an __init__:
> 
>  >>> class Old:  # *don't* inherit from object
> ...     pass
> ...
>  >>> o = Old()
>  >>>
> 
> 

Thank you very much Alan and Steven!

~Corey Richardson
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Please be advised that email addresses for Iberdrola Renewables personnel have 
changed to first.l...@iberdrolaren.com effective Aug. 16, 2010.  Please make a 
note.  Thank you.

This message is intended for the exclusive attention of the recipient(s) 
indicated.  Any information contained herein is strictly confidential and 
privileged.  If you are not the intended recipient, please notify us by return 
e-mail and delete this message from your computer system. Any unauthorized use, 
reproduction, alteration, filing or sending of this message and/or any attached 
files may lead to legal action being taken against the party(ies) responsible 
for said unauthorized use. Any opinion expressed herein is solely that of the 
author(s) and does not necessarily represent the opinion of the Company. The 
sender does not guarantee the integrity, speed or safety of this message, and 
does not accept responsibility for any possible damage arising from the 
interception, incorporation of viruses, or any other damage as a result of 
manipulation.


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to