Reputation: 444
i am a toddler on Twisted .I am trying to run a Twisted web server using the command
twistd web --resource-script=~/Desktop/step/ecdemo.rpy
assume that my file(ecdemo.rpy) is located on desktop in step folder
the traceback when i visit the page(127.0.0.1:8080/ecdemo.rpy) shows
<type 'exceptions.IOError'>: [Errno 2] No such file or directory: '~/Desktop/step/ecdemo.rpy
however if i run the same file with command
python ecdemo.rpy
it runs smoothly.
The program simply renders a get request from an http page
I know it is something basic that i do not know but if you could help me get started i would come up with better problems...
thanks for help.
Upvotes: 2
Views: 228
Reputation: 48345
Your shell didn't expand ~
into your home directory. Try this instead:
twistd web --resource-script ~/Desktop/step/ecdemo.rpy
Notice I removed the =
between the option name and its value. This will probably let your shell turn ~
into /home/whoever
.
Upvotes: 1