It appears your install of python and/or openssl is messed up. This could explain both the X and the yum problems.
You didn't say if you are using 64 or 32 bit Fedora, so here's some things to try either way.
(Note: openssl comes in i386, i686, and x86_64 versions.)
First, see if your rpm command works or not, enter:
rpm -q python openssl
If you get response of "python-2.5.1-xx.fc8 and openssl-0.9.xx-xx", you may be able to force an re-install of python and openssl to fix the problem.
To force a reinstall of the rpms, manually download the rpms from a Fedora mirror. Using another computer, choose a mirror from the list at
http://mirrors.fedoraproject.org/publiclist/Fedora/8 and search for the same version rpms as listed from the above rpm command. If you are using 64 bit Linux, you will need 1 x86_64 python rpm and both the i686 and x86_64 openssl rpms. In case yum was updating python and openssl, also download the newest versions of both python and openssl from the updates-newkey tree (python-2.5.1-26.fc8.2, openssl-0.9.8b-17.fc8).
Either put all the rpms onto a CD or USB drive, or use ftp (you probably can't use ssh/scp since openssl may be corrupt) to transfer the rpms to the affected system.
Try reinstalling the rpms without forcing first:
rpm -ivh python-2.5.1-xx.fc8.(x86_64 or i686).rpm openssl-0.9.xx-xx.fc8.(* or i686).rpm
If this fails with an error that the rpms are already installed, try updating to the newest rpms that you downloaded with the command:
rpm -Uvh python-2.5.1-xx.fc8.(x86_64 or i386).rpm openssl-0.9.xx-xx.fc8.(* or i686).rpm
If that fails with dependency errors, then force the older rpms to install with command:
rpm -ivh --force python-2.5.1-xx.fc8.(x86_64 or i386).rpm openssl-0.9.xx-xx.fc8.(* or i686).rpm
If the rpm command does not work at all, then you will need to create a tar archive of the files from another Fedora 8 system running the same 32 or 64 bit version.
To create the archive on the other system, use the commands:
cd /
tar -cvzf /tmp/pythonfix.tgz `rpm -ql python openssl`
(Note the use of the Grave Accent chars)
Transfer the the resulting /tmp/pythonfix.tgz file to the affected system, and untar it, as root, using the commands:
cd /
tar -xvzf /tmp/pythonfix.tgz
The tar file way is not a great way to do it, as there is no version/dependency/error checking done, but it may be your only choice.
Good luck.