Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Using Databases in Python Gettin' CRUD-y With It Add An Entry

Sending EOF (End-of-file) on Windows

For anyone who tried Ctrl+D on Windows and found they couldn't properly send the EOF to finish adding the entry, try using Ctrl+Z. You will probably also have to press Enter afterwards (you'll probably see a ^Z printed in the command prompt, but that won't be included in the entry text).

Ctrl+D on Windows outputs a nice little diamond character when you view the entry in the database. Nice, but not so helpful!


Also, not sure of the exact cause, but using PuTTY on WIndows to connect to my Raspberry Pi and run the script, I found I had to press Ctrl+D twice to get it to send the EOF and stop editing the entry. Weird!

Viktor LΓ©hner
Viktor LΓ©hner
12,771 Points

This is the most useful , thanks!

2 Answers

Kenneth Love
Kenneth Love
Treehouse Guest Teacher

Oh the joys of multiple systems.

I'm surprised that ctrl-d doesn't send an EOL on Windows cmd.exe. I wonder if it does in other Windows terminals?

I'm using Powershell in Windows, same deal. Ctrl+Z (and Enter) does the trick.

Bryn Walker
Bryn Walker
3,404 Points

ctrl+d works on my windows system, I'm assuming you guys patched it?

Bryn Walker, if you're using Workspaces, Ctrl+D will work. They use Linux on the servers hosting the Workspaces.

Yeeka Yau
Yeeka Yau
7,410 Points

Running locally on Windows 7, I had to write the entry, press enter, then CTRL+z and then press enter again.

All of the above does not work in my windows 10 system can someone help