Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Implementing the Plan

00:00 At this point, it’s assumed you have a reasonable and sound plan. Codex will always produce something different, so make sure you go through the plan, make sure it looks reasonable.

00:12 If it doesn’t or if there’s something you’d like to change, tweak the plan, and once you’re happy, you can press yes, “Implement this plan.” And now what Codex will do is go through the plan, go through your codebase, and implement the changes.

00:28 While it’s working, again, you can see what’s happening because the interface will show you what’s going on, and after a while you’ll have your results. Now here, for example, the first thing you could see was that Codex tried to run Python through the python command, but realized it couldn’t because on this machine, Python is only available through uv.

00:50 So then Codex tried to run Python through uv, but realized because of the sandbox, it couldn’t run uv with its default values. This sandbox is the protected, safe environment that Codex uses so that by default it doesn’t change the things that are outside of your current project.

01:11 And sometimes it might also happen that Codex will ask for your permission to run a specific command that might interact with the network or that might access something outside of this sandbox, but that does not happen in this instance.

01:25 Once Codex is done, you can run the command /diff to see a diff of all the changes that Codex implemented. So at this point you can see in the file tui.py, a couple of functions were added and a couple of methods, and you can see the handlers, and that’s it.

01:51 So once you’re happy with the diff, you can press Q to quit the diff, and now you want to run your application, just to make sure it works. So what you can do is run the command /quit, and now you can run your app with uv run rpcontacts.

02:09 So at this point, let’s start by making sure that add, well, there was nothing changed there, but let’s add a third contact, just to make sure it’s fine. So random number, and a fake email.

02:24 And now you can select the middle contact and press the button Delete, and it’s gone. And now let’s try using the keyboard shortcut C to clear all, so you press C, and all of the contacts are gone. So it looks like the implementation was successful. Now I’ll quit the app, and might as well run it again to make sure that the deletion was actually persisted, and the database also got cleared of the contacts.

02:55 So now we can quit the application. Now that the feature is implemented, and you tried it out directly in the interface, you can move on to the next lesson where you’ll refine the feature that Codex implemented.

Become a Member to join the conversation.