Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is not a specific answer to how to solve your problem, but instead an answer for how to step through what you want to do and work on simpler problems as they arise:</p> <p>1) Forget about classes at first, and instead</p> <p>2) Use the Python command line or a Python program like IDLE,</p> <p>3) To establish your goals by writing calls to open the MongoDB database to accomplish your task or tasks. In other words, write the simplest code to accomplish your goals before worrying about classes.</p> <p>4) Once you get that done, and feel good to move on, then write a test class using the <a href="http://docs.python.org/tutorial/classes.html" rel="nofollow">documentation</a>. My link is one of many you could find.</p> <p>5) I think part, but not all, of your problem is your class is not set up correctly. My class -- not shown completely -- is as follows:</p> <pre><code>class GlobalData: def set_xfer_date(self, value): self.xfer_date = value self.date_str = str(value) self.xfer_date_base = self.date_str[0:10] + " " + "00:00:00" # Now build tomorrow. self.xfer_date_tomorrow = datetime.today() + timedelta(1) self.date_str_tomorrow = str(self.xfer_date_tomorrow) self.xfer_date_tomorrow = \ self.date_str_tomorrow[0:10] + " " + "00:00:00" self.section_totals = {} self.billable_reads = {} def set_xfer_fnam_out(self, value): self.xfer_fnam_out = value def set_xfer_dir_in(self, value): self.xfer_dir_in = value . . . def get_billable_reads(self): return self.billable_reads </code></pre> <p>One of the problems I see is you are not referring to data using <code>self.</code> Good luck.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload