title: stack dump in twisted app.py 'application' error when using twistd but works with python?
body: <p>I am trying to use twisted but when i try to run some of the example code provided with the twisted package, it seems to always crash when i use "twistd" instead of "python"</p>
  
  <p>for example, using the example code given with twisted, 
  if i run to command : twisted -ny echoserv.py</p>
  
  <pre>Unhandled Error
  Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 652, in run
      runApp(config)
    File "/usr/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 23, in runApp
      _SomeApplicationRunner(config).run()
    File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 386, in run
      self.application = self.createOrGetApplication()
    File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 451, in createOrGetApplication
      application = getApplication(self.config, passphrase)
  ---  ---
    File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 462, in getApplication
      application = service.loadApplication(filename, style, passphrase)
    File "/usr/lib/python2.7/site-packages/twisted/application/service.py", line 405, in loadApplication
      application = sob.loadValueFromFile(filename, 'application', passphrase)
    File "/usr/lib/python2.7/site-packages/twisted/persisted/sob.py", line 211, in loadValueFromFile
      value = d[variable]
  exceptions.KeyError: 'application'
  
  Failed to load application: 'application'
  Could not find 'application' in the file. To use 'twistd -y', your .tac
  file must create a suitable object (e.g., by calling service.Application())
  and store it in a variable named 'application'. twistd loads your .tac file
  and scans the global variables for one of this name.
  
  Please read the 'Using Application' HOWTO for details.
  
  
  </pre>
  
  <p>I was using Twisted version 11.0.0 but then i tried 12.0.0 but i have the same problem.</p>
  
  <p>The version of python i am using is 2.7.2</p>
  
  <p>Any ideas on what to do would be helpful. I have been trying to deal with this problem for a few days now. thanks!</p>