#python - Thu 22 Feb 2007 between 23:11 and 23:24



jonesycan someone point me to a download for the canonical RDF module for python?
tkoodahrmm, no import mylib fails
Tennesseejonesy: FeedParser
vdrabarubin: http://docs.sun.com/source/806-3568/ncg_goldberg.html
actionjonesy looks
jonesylooks
tkoodaimport mylib fails with "ImportError: cannot import name my_mysql_connect"
my __init__.py must be wrong or something??
Leedstkooda: what is mylib?
tkoodathe arbitrary name of my lib I'm trying to write+install
Leedsyour own private mysql wrapper?
Tennesseetkooda: Okay, you've just made your life simpler. Try renaming my_mysql_connect in case there's some genuine problem. Call it greenEggsAndHam and see what happens
tkoodaLeeds, more or less yes
jonesydammit. I'm so fscking tired of dealiing with python.
tkoodaLeeds, looks up un/pw/host/db info and connects
Leedsjonesy: chill
tkoodaTennessee, did. tkooda_mysql_connect gives same
vdrabarubin, or rather; http://docs.python.org/tut/node16.html
Leedstkooda: your code is broken - it's nothing to do with finding the module
Tennesseetkooda: Okay. Do you have __init__.py in existence?
tkoodaTennessee, yup
Tennesseetkooda: Write an empty method in the module and see if that fails. Is my_mysql_connect the only thing in there that's failing?
jonesywhere can I download the feedreader module?
tkoodaTennessee, my_mysql_connect is the only thing that's in there.
gzlfeedparser.org
tkoodaTennessee, will test empty method
jonesythanks.
tkoodaTennessee, crap. gotta go afk. thanks for your help so far thou.
arubinvdrab: I actually do understand the floating point issue, I had just never seen problems with subtraction before
jonesyso if I install feedparser, then a tool with an "import RDF" line will work?
arubinvdrab: at least not in other languages
Tennesseejonesy: import feedparser will work. Feedparser will read and write RDF files. If you have a tool already which has 'import RDF' in it, it may not be using feedparser.
Feedparser is the most common feed reader for RDF and a variety of other formats.
jonesybut I'm not reading a feed.
if a tool just says "import RDF", how is anyone supposed to know *which* RDF that is - is there a way to know?
gzlyou could run python -v and then run the import.
it'll tell you where it comes from.
jonesyer - that's if I already have the module?
gzlyes
jonesyright.
gzlultimately if a file just says 'import foo' there's no way of disambiguating between two modules that are named that

Page: 1 8 15 22 29 36 43 50 57 64 

IrcArchive