Your while statement is structured properly. Although it will print "entered" as many times as possible until 180 seconds has elapsed (that's a lot of times), and it will also try to call your script in the same way. You would likely be better served by only calling your script once every 1,5,10, or whatever number of seconds as it is unnecessary to call it constantly.
As pointed out by Tadhg McDonald-Jensen using %run you will be able to call your script. Also there are limits to the rate of calls to twitter that you must consider see here. Basically 15 per 15 minutes or 180 per 15 minutes, though I'm not sure which applies here.
Assuming 15 per 15 minutes worst case scenario, you could run 15 calls in your three minute window. So you could do something like:
from math import floor
temp = floor(time.time())
while time.time() < t_end:
if floor(time.time()) == temp + 12:
%run twitterstream.py >> output.txt
temp = floor(time.time())
This would call your script every 12 seconds.