Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7880369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:07:46+00:00 2026-06-03T04:07:46+00:00

I have a python module that I’ve made that contains regular function defintions as

  • 0

I have a python module that I’ve made that contains regular function defintions as well as classes. For some reason when I call the constructor and pass a value, it’s not updating the class variable.

My module is called VODControl (VODControl.py). The class I have declared inside the module is called DRMPath. The DRMPath class has two instance vairables: logfile and results. logfile is a string and results is a dictionary.

My constructor looks like this:

def __init__(self, file):
    self.logilfe = file
    self.results['GbE1'] = ""
    self.results['GbE2'] = ""
    self.results['NetCrypt'] = ""
    self.results['QAM'] = ""

when I import it from my other python script I do:

import VODControl

The call i use is the following:

d = VODControl.DRMPath('/tmp/adk.log')

However, when I print the value of the logfile instance variable, it isn’t updated with what I passed to the constructor:

print d.logfile

After printing, it’s still an empty string. What gives?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:07:47+00:00Added an answer on June 3, 2026 at 4:07 am

    self.logilfe = file is not the same as self.logfile = file In addition, it is likely returning None, not an empty string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a python module that defines a number of classes: class A(object): def
I have some python module, that I import as: from mygraph.draw import pixel The
I have a single Python module which contains 3 classes: A, A1 and A2.
I have a python module that imports a module generated with swig. When I
I have a python module that I've been using over the years to process
I have a simple Python script that uses the socket module to send a
I have a Python module that I would like to upload to PyPI. So
I have a Python module, wrapper.py , that wraps a C DLL. The DLL
If I have a Python module implemented as a directory (i.e. package) that has
How does one call a python module that has been installed, into the folder

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.