one thing that sometimes works for me is this:
in reply to It's a problem of motivation, Bob
if you have working on the project 'top-down' switch to 'bottom-up', and vice versa.
I.e. if you have the main loop/sequence written, but some (or all) of the functionality isn't there, think of a bottom level function/class that you think you will need and write that, even if it isn't clear exactly how you'll hook it up. As a bonus, I usually write more generically useful and robust modules when doing it this way.
But if you have just been gathering lots of little things and aren't quite sure how they are going to go together, go ahead and write the main loop. Fill it full of function calls that do absolutely nothing.
Also, and this is really hit of miss, make a check list of things to do for the project to be done. Find the easiest thing on the list, and do it. Then check it off the list. Sometimes the mental reward of 'see I got _something_ done' is enough to kickstart me.