Punboy, to queue commands on a vehicle use a FIFO stack (First on first off) (same as the ASM stack push and pop). Have opcodes or something to represent each command (maybe for speed, the opcode is the address of a function that actually implements the command). When the user queues a command you push it onto the stack. When you are processing them, you keep popping them off the stack till there's none left.
and like Kramy said, if the vehicle is doing something that has to complete before any other commands are processed, you simply stop processing the commands. (In this case stop popping items off the stack, use a flag to determine if the commands can be processed).
It's very simple implementation.
Also, for construction of vehicles, there should be rally/gather points like in AOK, SC, RA(2), etc. (That is you set a point for a factory and all stuff manufactured from there will move to that point when it comes out, instead of sitting outside the factory).
Does python support classes or any other OOP? If it does, use it. It will make programming much easier.