| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Comments:
<0> no change in it <1> locale.atof() <2> neat <0> so anyone got anymore ideas <2> Patch: perhaps you need the python bindings as well as the cairo library itself <2> Patch: or vice versa <3> Do you have a suggestion for a good one-liner that checks if a string (website downloaded with pycurl into a string) really is html "valid"? Right now i just check for "<html" somewhere in the string! <4> hi all, how do i clean the screen on python? i want to make something like a progress bar <5> sapo: maybe a bit more complex than "clear screen", but check out http://excess.org/urwid/ <5> it even comes with a progress bar <6> Patch, what's the exact error message? <0> cannot find module cairo <7> molsen, define "html valid" <0> Traceback (most recent call last): <0> thats happens all the time when i try to run it <4> stain, thanx i ll check it out
<5> sure =) <6> Patch, yep, it's looking for pycairo and not just gtk deps <0> ive installed all the files into python and gtk <0> and still o get the same error <0> i also install cairo <8> wow it's root <2> Patch: you need to libraries - the cairo native library, and the cairo python bindings <2> Patch: in my OS, they are two separate packages, libcairo and python-cairo <2> s/to/two <3> Bread, not w3c-valid but just somewhat valid! <7> molsen: If you don't know what validity is, I suspect that determining it will be difficult ;) <3> Brend, yes :) <7> molsen, maybe you can come up with something involving http://www.crummy.com/software/BeautifulSoup/ <0> ok just uninstalled everything coz i needed to rearrange stuff <0> what version of pygtk should i get <9> Hi guys <9> anyone have any comments regarding SQLObject vs SQLAlchemy wrt stability, ease of use, and abstraction design? <0> damn damn <0> i installed the latest gtk+ and downloaded the hello world app and icant find all the dlls <10> Patch: have you checked your path? <0> i cant find the gtk installer website now lol <6> http://www.mapr.ucl.ac.be/~gustin/win32_ports/pygtk.html http://gladewin32.sourceforge.net/ <0> do i need to install gladewin aswell <6> the runtime package <0> yup <0> i installed the gtk and ciaro packages <11> what is similar with u'text' ? <11> unicode() ? <2> qk: yes <0> DLL load failed: The specified module could not be found. <0> dll load filed the specific module could not be found <0> th\ats when i import gtk <6> well, I just removed everything and installed the three packages: gtk+ runtime from gladewin, pygtk (with pycairo support), and pycairo <6> importing both gtk and cairo works <6> you should also be getting a windows popup dialog that mentions the missing dll by name if you get that exception from python, what does it say? <0> http://gladewin32.sourceforge.net/modules/wfdownloads/visit.php?lid=96 <0> shall i install that <12> yo, intelligent people <12> is there an easy and elegant and more importantly beautiful way to have code that only executes if there was no exception, without having it inside the try: block ? <12> I'm doing a dictionary lookup to determine what function to execute, and I don't want to catch keyerrors from within the function itself <12> best I can do is put a "return" inside the except <12> but that's inelegant <6> Patch, it shouldn't hurt, but no, it's not needed either, you need either the runtime environment or development environment from there, but not both <7> Patrick`, the "else" clause of try? <12> Brend: ah <12> Brend: this would be where I rtfm and find it where I just looked <7> :) <12> ooh, ooh <0> what im doing is: <0> import pygtk <0> pygtk.require("2.0") <0> then import gtk <12> brend, awesome <0> and it specifies module not found <4> anyone knows a good tutorial about python with glade? all tutorials i found so far just teachs you how to draw and window and close it -_- thats useless <12> everything else is details <0> dll load not found: specific module <0> have you tried tutorialized.com <13> I'm writing a cl*** that should simulate a list (not by inheriting from list). When doing a "list(myobject)", a list should be returned - but how would I do this? <14> dusty_, unless it's homework, why would you do that?
<2> dusty_: implement the iterator protocol (i.e. return an iterator from __iter__), or __getitem__ and __len__ <13> What I want is the following: A fixed-sized list, where items can be accessed by named attributes but also by index, such as myobject[2] or myobject.'myattr'. <14> def __list__(self): return [ 1, 2, 3 ] <14> I've not tried it, but I expect that is on the right track. <7> return iter([1,2,3]) <7> For some reason <7> Otherwise you get "TypeError: __iter__ returned non-iterator of type 'list'", which seems pretty bizarre <2> dusty_: you could define __getitem__, __setitem__ and __len__ <13> halley: Really? I can't find __list__ in any Python documentation? <14> Maybe to allow for all sequence types? <13> joedj: Thank's that's probably also a good solution. <2> dusty_: you could also extend tuple to add your own attributes <6> dusty_, because there isn't one <13> joedj: Thought about that, but tuples are immutable, I cannot do something like myobj[3] = 'abc' <11> What can i do to have iteration on one element tuple like iteration on one element list ? <7> qk: There's a difference? <11> yes. <7> I bet you're writing (x) instead of (x,) or something <9> anyone have any comments regarding SQLObject vs SQLAlchemy wrt stability, ease of use, and abstraction design? <11> Brend: yes :) thanks. <7> :) <15> is ISO-8859-1 and UTF-8 the same tihn? <6> no <11> how can i simply change printed text color in console ? <6> you can't, not in a way that's cross-platform anyway <6> unix terminals should be happy with ansi escape codes, windows needs extension module <6> http://newcenturycomputers.net/projects/wconio.html <11> Juhaz: i need unix only. <16> hi. what is that syntax for ? _( "some string %s") <17> solsTiCe, gettext afaik <16> the _( and ) ? <16> i18n ? <16> ok <18> http://karlsberg.pastebin.com/568415 <18> with this code i set my table with a liststore mode ? <18> i have this code but dont run with liststore funtions... <19> Can I somehow change Python's idea of the working directory when executing code with eval()? <19> Without chdir, that is. <20> DataBeaver: No. If you are hoping of some restricted execution, you can't do it with just eval anyway. <19> I just want imports to be relative to the script I'm executing <18> ... <21> something like sys.path.append('someDir') should work for that <21> or put it at the beginning of sys.path if you want to override all the defaults <19> Hm, can I ***ume that the cwd will always be in the beginning of sys.path? <21> that's not the cwd, it's the dir the script is in. <19> Well can I ***ume that to be in the beginning? <19> So I could do sys.path[0]="/new/dir/here" ? <21> but *usually* sys.path[0] is the dir the script is in. (there are exceptions, for isntance if you freeze your app with py2app, py2exe, cx_freeze) <19> help(sys) says: path -- module search path; path[0] is the script directory, else '' <22> dont forget rotation <5> if it is fixed <23> hmm ok anyway <23> gtg <23> bye and thx <16> to test the type of something , the best way is to use type or there is another way ? <2> solsTiCe: the best way is not to do it. but there's also isinstance(). type() only works on new-style types <16> ok. yes i know it is generally better not doing that <24> solsTiCe: the current philosophy is to just use it and ***ume it's the right type and let type errors propogate if it isn't. sometimes called duck typing. <16> ah . i know that. just didn't know the name . so that 's what duck typing ... :-) <24> comes from "if it looks like a duck and quacks like a duck..." <24> it's a silly sort of name for polymorphism <24> but pyprotocols-style interfaces do ok at that job i suppose <24> seems java has found religion in dynamic languages, including javascript in 1.6, and there's talk of including beanshell in 1.7 <25> huh <25> found religion in dynamic languages? <26> grrr <25> :| <26> Pythonwin + firefox = weird behaviour <26> Pythonwin + pgAdminIII also = weird behaviour <26> :(
Return to
#python or Go to some related
logs:
1801680230 #lisp #ubuntu #linux #perl !!! Error: Unrecognized option eselect nvidia reconfiguring keyboard debian etch base-config assslack #javascript rtsp cloakport mplayer
|
|