Unable to connect to "Database Connections/.sde" from python

Use full paths in scripts.

As far as python failing on opening the workspace, you may just be encountering a python format issue with the escape character. It is discussed on this nice blog

to illustrate:

>>> str = "C:\folder\file"
>>> str
'C:\x0colder\x0cile' <--Path being passed to arcpy (Bad)

>>> str = "C:\\folder\\file"
>>> str
'C:\\folder\\file'   <-- Good

>>> str = r"C:\folder\file"
>>> str
'C:\\folder\\file'   <-- Also Good

I received help from ArcGIS tech support, my problem was that Arc Server is 64 bit and Desktop is 32 bit, and both products are installed so the most recent gets the default. Oops - I should have installed Server first.

Here is the tech article: FAQ: Why do Python scripts fail on a machine with both ArcGIS for Server and Desktop installed?