Lists highly divisible numbers, oeis squence: A002182
Consider writing your middle while loop as a separate function - it'll make breaking out of the inner loop easier.

For example, your code could look like this:

def highlydiv(n):
    plist = ...set up plist...
    candidates = divisor_candidates(n, plist)
    ...

def divisor_candidates(n, plist):
    ...set up calcSum, mark, pows, candidates...
    while True:
        ...
        while calcSum &gt; n:
            marker += 1
            if marker &gt; len(pows):
                return candidates
            pows[marker] += 1
            ...
        candidates.append(...)


and you get rid of the breakout flag.

Additionally, this makes the middle part of your program testable.