Search
  • Aldo Gonzalez

4/5 Randomizer, Much TK Debugging, and More First Population Ideas

Done:

Mid-last-week, I reviewed Python lists and loops so I could code a random generator. For each loop pass, I built a string up containing the randomly chosen file name.

4-5

After that, I ran into some TK issues where certain images would take up space but not display. I debugged, cleaned my labels (thanks to Eric), and looked around for resources, but nothing worked.


The next day, I had my walkthrough, where I presented my project's current status to the class. After that, Dr. McVey and I debugged my code for some time. We fixed one of the issues; that was due to a variable reuse of the TK image object. The other one, however, is still somewhat unresolved. It turns out the last line of code run needs to be an error (like 5/0) for the images to load on the second frame. I have that line in now just to continue with visual testing, but we will hopefully find why that's happening.





More recently, I cleaned my code, saved another version, and added a third option to the first frame.

4-5

I also displayed random images in frame two just to get a visual of my randomizer function and test TK.

4-54-54-5

Lastly, I thought a bit about how I will build my first population. The slicer call "join" had some initial promise, but upon testing, I realized it requires the initial tile objects; this renders it pretty much useless. I had wanted to change the disk images to the random ones and then join those together (since they'd have the same name), but that will not occur via "join."


Next Steps:

I am going to try to convert the tuple tile objects to a list and manipulate them. If I can get the properties to switch and rejoin to work with the updated image objects, this can work! If not, I can try saving my random image objects to disk (not necessarily with the same name) and then searching the libraries for a way to put them together.

0 views0 comments