rossdylan / sham

Soften the hard edges on the libvirt python api
BSD 2-Clause "Simplified" License
6 stars 1 forks source link

pip install fails #2

Open steinnes opened 10 years ago

steinnes commented 10 years ago
pip install sham
Downloading/unpacking sham
  Downloading sham-0.1.0.tar.gz
  Running setup.py egg_info for package sham

Installing collected packages: sham
  Running setup.py install for sham
      File "/usr/local/lib/python2.7/dist-packages/sham/network/interfaces.py", line 19
        """
            TODO(rdelinger) rename this as to_xml or something similar
            """"

                ^
    SyntaxError: EOL while scanning string literal

Successfully installed sham
Cleaning up...

I checked the source here and the extra " character is also present on line 19 of interfaces.py here.

Maybe the README could be updated with a couple of examples too, I'm just poking around by reading the source (and libvirt), so I guess this is how you'd start:

v = sham.VMManager(None)
print v.get_vms()

[VirtualMachine< ubuntu1404-test1 >,
 VirtualMachine< fedora-something-test >,
 VirtualMachine< arch-dns >,
 VirtualMachine< httpcache >,
 VirtualMachine< test_vm >]

VM names changed to protect the innocent.

I could make a couple of suggestions for quick-start based on my use cases, if there's interest :-)

rossdylan commented 10 years ago

The pip install issue has been fixed. Regarding the readme feel free to add examples you feel would be useful. I'll accept pull requests for them.