Graphics for the Sierpinski Carpet were posted earlier, up to (and including) 5 iterations. I really wanted to get a sixth iteration so I let the code run and run. All I got were warnings from my computer about a script which was either unresponsive or busy. After about 80 minutes I gave up. But that sort of behavior was similar to what I encountered with Sierpinski's Carpet code. That problem was lessened when I experimented with multiple Graphics() assignments which led to about double the iterations; maybe something similar could be done with Sierpinski Carpet code? It sure seemed like at least 1 more iteration seemed possible.
With a little extra tinkering I was able to get that extra iteration by creating other Graphics() objects that get used when the length gets smaller. The basic idea which I learned from Sierpinski's triangle is that it seems like a "fresh" Graphics object is needed to get the extra iterations. This was worked into the code by making it use the other Graphics() objects when the length got small. The sixth iteration of Sierpinsksi's Carpet has added to the others. I quit trying to get a 7th iteration after 30 minutes.
I've posted both codes for Sierpinski's Carpet on the Python/Sage page so you can compare them. Maybe this will be helpful in things you're working on.
Depending on the code and the iterations, be prepared to wait minutes for your output, so you might want to increase that slider one iteration at a time and see how your computer handles it. The screenshot from the original code is posted here.
I might have gotten a glimpse of 7 iterations (count the squares) but, unfortunately, it wasn't saved to PDF, just PNG. After looking at it, it seems like the squares blend together. Here is the output. Click on the image and then (again) use the magnifying glass.