Python Forum
Creating a script with a class have specific properties
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating a script with a class have specific properties
#6
Thank you for you help. I need to create a script that passes the values for each line of text (like the sample in my previous reply) to create a tree object, and then prints the properties of the object as opposed to keeping the print function in the class. I want to be able to use it differently and repeatedly. At this point I am brain dead so would welcome any suggestions and/or references to use. Preferably something on the Python for Dummies level that I can access via the web. I believe it should be something like this but I feel there is a need for a for loop unless I am trying to make this harder than it needs to be.

import tree2class
mytree2 = tree2class.tree2("DHB", "")
print "Report: ", mytree2.Block, mytree2.Plot, mytree2.Species, mytree2.DHB
myDIB = self.dhb/1.09
print myDIB
Reply


Messages In This Thread
RE: Creating a script with a class have specific properties - by dvldgs05 - Oct-13-2018, 04:36 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  I need help writing this code for string properties and methods hannah71605 4 3,180 Mar-22-2021, 12:36 PM
Last Post: menator01
  Creating Email Message Class in Python QuavoJ 1 2,205 Jul-20-2020, 08:30 PM
Last Post: Yoriz
  Sort objects by protected properties. Sigriddenfeta 1 1,929 Mar-17-2020, 04:11 AM
Last Post: Larz60+
  Creating class with getters and setters. amandacstr 3 2,369 Jun-19-2019, 07:10 PM
Last Post: nilamo
  newbie questions about objects properties... slowbullet 2 2,690 Aug-12-2018, 01:12 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020