I suspect the joint doesn't fall down, but just moves down (not like in free fall, as the motors are not released - you can see the difference when pressing the middle button, called
stepper en, on the blackbox).
I'm afraid you may have a broken firmware or arduino.
dobot.xyz(x, y, z) makes dobot move to absolute x, y, z coordinates in dobot's own coordinate system. If you dobot looks straight ahead when turned on then the python gist would make it move forward and back once at a specific height (-40 in this case). time.sleep() introduces a delay in between sending commands so that t decrease chances of dobot dropping subsequent commands for unknown reason https://docs.python.org/2/library/time.html#time.time
FYI, for cleaner experiment make sure you first turn the power switch on on the blackbox and only then plug the usb cable into your computer - that makes dobot read the accelerometers correctly and figure out its initial configuration.
The python gist won't work in python3 without changes. Specifically, you would need to wrap the arguments to
print in parentheses and install pyserial for python3 (if it is not installed). That is as far as I could take in with python3. I suspect there will be more changes required.
Better install python2.7 - it's not a big deal - they can live together if installed right.
Alternatively, you can run a VirtualBox Ubuntu 14.04 VM as a sandbox environment (or even a windows vm https://dev.windows.com/en-us/microsoft-edge/tools/vms/windows/ for that matter) and install whatever python version you want there. Though free windows vms expire after 3 months.
PS: the advantage of that python gist is that it reports you back dobot's status.
I may fork the original Processing sketch later, apply all fixes, enable dobot status logging and give it a try under windows. Stay tuned.