Text RPG in python
<p><strong>main.py</strong></p>

<pre><code>import engine
engine.objects['key'] = "It's a key"
engine.main()
</code></pre>

<p><strong>engine.py</strong></p>

<pre><code># inventory = []

objects = {

}

def main():
    while True:
        choice = raw_input("&gt;&gt;: ")
        command, obj = choice.split()
        if command == 'examine':
            if obj in objects:
                print objects[obj]
            else:
                print 'joking right?'
        else:
            print 'joking right?'
</code></pre>

<p>When I type "examine" with no second word, the parameter, it gives me an error.</p>

<pre><code>&gt;&gt;: asdf
Traceback (most recent call last):
  File "main.py", line 3, in &lt;module&gt;
    engine.main()
  File "C:\Users\Patrick\Documents\Programming\Game engine test\engine.py", line
 11, in main
    command, obj = choice.split()
ValueError: need more than 1 value to unpack
Press any key to continue . . .
</code></pre>

<p>I understand why, but how do I fix it?</p>
