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 3362106
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:14:00+00:00 2026-05-18T03:14:00+00:00

So, I’ve been programming in python and I’ve run into this really annoying issue.

  • 0

So, I’ve been programming in python and I’ve run into this really annoying issue. I wrote a small matrix library and started using it in another module (eg, import matrixlib). I’d find a bug, fix it and run the program again. Bug still there.

I’d throw in a few print statements to see what’s going on, but they wouldn’t print. I eventually figured out that my changes weren’t registering with python. So I started deleting .pyc files (precompiled python) but that didn’t help.

I eventually gave up and just started programming straight from the matrix lib file, but now that issue has come back. I threw in a print statement to figure out what was going on with a method, fixed the issue, and took it out. But it still prints. I even did a search for ‘print’ in a different text editor than IDLE, but found only not a single print statement in the code.

This isn’t really a code issue per say, I’ve probably mucked up my python install somehow. (This only happens on my windows box, not my linux box). If you want to see the code anyway, feel free. The hiesenbug-print statement is commented out in my code, yet still executes.

    def det(self):
        #Had better be a square matrix.
        if self.colCount() != self.rowCount():
            return None
        #Are we a 1x1 matrix?
        if self.colCount() == self.rowCount() == 1:
            return self.a[0][0]
        #Are we a 2x2 matrix?
        if self.colCount() == self.rowCount() == 2:
            return self.a[0][0]*self.a[1][1]-self.a[1][0]*self.a[0][1]
        #Not a 2x2... so lets start recursing.
        d = 0
        for e in range(0,self.colCount()):
            tmp = partition(self.a, 0, e)
            if e%2 == 0:
                d = d + self.a[0][e]*self.detRecursive(tmp)
            else:
                d = d - self.a[0][e]*self.detRecursive(tmp)
        #print d
        return d

    def detRecursive(self, matrix):
        m = Matrix()
        m.setMatrix(matrix)

        return m.det()

    def partition(a, r, c):
        out = []
        for row in range(0, len(a)):
            if r != row:
                out.append([])
                for col in range(0, len(a[0])):
                    if col != c:
                        out[-1].append(a[row][col])
        return out
  • 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-05-18T03:14:01+00:00Added an answer on May 18, 2026 at 3:14 am

    i think that when you have installed your package the first time you did:

    python setup.py install
    

    rather than:

    python setup.py develop
    

    because when you do setup.py install the setup.py just copy the package files in the system path so every time you do a change in the package file you have to rerun setup.py install
    in the other hand setup.py develop install your package in ‘development mode’ which mean that it just create a link (an eggs) to your “local” package files so every changes in the library “local” files is detected (it just a link)

    Hope this will help 🙂

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

Sidebar

Related Questions

No related questions found

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.