My loop for class? lost
<blockquote>
  <p>Simulate a cash register as it totals a user's purchases. The program should execute for an unspecified number of items for a single user. The program should prompt the user for the quantity and unit cost of each item. The user should indicate the end of purchases by entering a negative quantity. The program should output on one line the quantity, unit cost, item total (the quantity times the unit cost), and the current subtotal to the file <code>purchases.txt</code>. These values should be separated by a space. The program should output the final total to both the file and the screen.</p>
</blockquote>

<p>I have the file I/O down pretty well. What I'm having trouble in class with is creating my loops and making them stop when something is entered.</p>

<pre><code>import os.path
outFile = open("purchases","w")
quantity = raw_input("What is the quantity of the item")
cost = raw_input("How much is each item")
outFile.write()
while quantity &lt;= ???? : 
</code></pre>

<p>I understand the math but the loop just loses me.</p>
