@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20



Comments:

<0> werneck: a callable object p***es the test callable(obj)
<1> anyone here have experience with pygtk
<2> redir, ok but is it possible with pythin ?
<3> ChrisLong: yes, but what I mean is, let's say you set a function f as metacl***, doing some stuff but using type to create the cl*** C... type is the real C.__cl***__, f is C.__metacl***__, but if you subcl*** C, you won't have f as the subcl*** metacl***, even if it's the C.__metacl***__ attribute
<4> raden, rsync.py is in python
<5> blanky: don't ask to ask just ask
<2> redir, kew kew :)
<2> redir, thanks bro : )
<4> raden, it emulates much of the functionality of rsync
<1> Well, I have a vertical box, the top box is taken up by a menu, and the second one's empty, how can I select the second one (empty one) so that I could add a button to it
<4> raden, excellent script if you want to learn how to write a mirroring program
<3> ChrisLong: the cl*** statement use the supercl*** __cl***__ attribute as the metacl***, not __metacl***__
<6> blanky, give it a name
<0> werneck: incorrect:
<3> kbrooks: ?
<1> hey polpak weren't you in one of the ubuntu channels yesterday



<1> polpak, I can't give it a name
<1> polpak, the vertical box is called mainVB
<1> polpak, but how do I select each individual separation?
<3> kbrooks: "if there is at least one base cl***, its metacl*** is used (this looks for a __cl***__ attribute first and if that's not found, uses its type)"
<0> werneck: link?
<6> blanky, yes I frequent #ubuntu, ##c and #python
<3> kbrooks: http://www.python.org/download/releases/2.2/descrintro/
<6> blanky, oh I see. I misunderstood. I thought you were using glade
<1> polpak, yeah I saw you yesterday haha, talked to you even I think, when we were telling that one guy that python was a good language and what not
<1> polpak, yeah I'm using glade
<1> polpak, but I'd like to access that one box through the code
<3> kbrooks: if you used an arbitrary object as metacl***, not the real cl*** type, subcl***es won't use it as metacl***... have to bet set explicitly
<1> so, I made a vbox with 2, so the top one's a menu and the bottoms one's empty, now, how can I access the bottom one? and I can't give it a name, the bottom box that is, the whole vertical box (both) are called mainVB though
<6> blanky, hrm. you should be able to name them
<1> when I select the box, the properties window grays out, I think you're misunderstanding though, the whole vbox I CAN name (it's called mainVB), but the individual boxes, no go
<1> polpak, does that make sense?
<7> Hello. I'm wondering how in python, the appropriate way to call another method of the same cl*** (from a method of the cl*** is)
<7> would it be self.method()
<7> ?
<1> lws, you can also just do method() I believe
<7> blanky: Will it properly get the self variable?
<6> blanky, oh. that's because you can't name boxes apparently.
<1> lws, implicit
<8> lws: self.method() is correct
<1> polpak, of course, haha. So how can I access a certain box?
<6> blanky, I don't think you can, but lemme check
<7> thanks ChrisLong
<1> vbox[index]? I tried that, but I couldn't find out
<1> polpak, yeah I tried it
<8> blanky: for child in vbox should work, otherwise for child in vbox.children()
<1> ChrisLong, ohhh, thanks sir! Hey, how can I access a specific one though, for example, if I just have two boxes (vertical), and I want to access the bottom one
<8> blanky: but how do you identify the right child? are sure, the second one you get is the one you want?
<1> ChrisLong, yeah I'm sure, and I can test it out if not :)
<9> I've tried to google for a while now, but I can't seem to find the correct keywords.. I'm ***uming it's possible to have one program in several .py files, correct?
<1> ChrisLong, ?
<1> vbox.children()[2] ? lol
<1> or, vbox.children(2) seems right
<3> sensei: sure... what's the problem ?
<1> i'll try it
<6> blanky, vbox.children()[1]
<1> polpak, ah thanks!
<6> blanky, as children() will return a list, and lists are 0 indexted
<9> werneck: I can't find anywhere to read how to do it :)
<6> blanky, indexed
<8> blanky: i just found out children() is deprecated, one should use get_children()
<3> sensei: http://docs.python.org/tut/node8.html
<9> Ah, modules.. thanks :)
<1> ChrisLong, yeah cause I got 'list index out of range'
<1> ChrisLong, get_children(1) ?
<1> thanks ChrisLong !
<1> and polpak !
<8> blanky: get_children()[1]
<1> ChrisLong, yeah, keep getting index out of range or whatever :S
<10> hello
<10> how can I print a byte of data from a file read with .read(1) in base 2 binary form?
<8> blanky: then there is not second child. what is len(vbox)?
<1> ChrisLong, will do
<11> Does anybody know how to execute a python script interactively, so that it will execute it line by line like the python interactive interpreter?
<3> xDCDx: use ord(b) to get it to base 10, but you'll have to convert to base 2 by yourself
<8> ackackackadack: module pdb
<1> ChrisLong, it returns 1, but I promise there's two boxes!



<1> ChrisLong, unless...do the boxes delete themselves once they're used? becuase one of them is used (a menu)
<10> werneck thanks
<8> blanky: what did you put in the lower box in glade?
<1> ChrisLong, nothing, it's empty, it's the one I'm trying to access to put something in it haha
<11> ChrisLong, thanks I'll try that out
<1> ChrisLong, I want to put gtkmozembed.MozEmbed() in it
<1> ChrisLong, and since I don't know how to do that through glade, I want to do it through python
<8> blanky: simply use vbox.pack_end. glade only reserved space for the lower part, because you told it you want two children.
<8> blanky: but if you don't put anything in it, then the vbox only contains one child
<1> ChrisLong, OH! okay, wait, what about vbox.pack_end?
<1> ChrisLong, thanks man! spent an hour on this and nothing, hey, so how would I add(gtkmozembed.MozEmbed()) into it
<8> blanky: like i said, vbox.pack_end(gtkmozembed.MozEmbed()). but i don't know if the default arguments are correct, you should look them up
<1> ChrisLong, will do, thanks sir
<12> how can you change the CWD of the shell in which you execute a program, from the program?
<13> remote: os.chdir()
<12> doesn't work
<8> remote: you can't
<12> it changes the program's cwd
<12> i'm sure you can
<12> why is it so hard?
<8> remote: can you name a program that does it?
<12> yes but now that i think about it, it's being used from an alias who probably just do `` cd `program` ''
<12> that's how i'm going to do it
<12> 0ok thanks
<14> it should work, because i can do a export PWD=/ in bash and my cwd changes...
<12> urm..
<12> it breaks things like OLDPWD though, must be fixed manually
<1> hey, what's the command in google to return results of a certain filetype?
<8> stickystyle: but you do this in the shell, not in a program started from the shell
<12> blanky: filetype ?
<1> remote, OH!
<1> thanks!
<9> I can't get this whole module thing to work.. I have a file called 'test.py' in the same dir as the main file. I'm doing 'import test' in the main file, and call test.testModule("String") and the test.py file contains def testModule(str): ...
<9> What am I missing?
<3> sensei: what error you get ?
<9> Oh, sorry.. AttributeError: 'module' object has no attribute 'testModule'
<3> sensei: are you sure that's the name ? no typo, mixed case ?
<9> Getting the error on test.testModule, the import seems to work just fine
<14> sensei: perhaps you have another modual in your PYTHONPATH named 'test'?
<9> Ah, no sorry to have bothered you, I'd saed test.py in the old python dir
<9> How paper bag-ish of me
<9> ~/python243 vs ~/python235 :P Although it isn't midnight yet, so I can't really blame the late hour :/
<1> ChrisLong, you there bud? http://pastebin.com/709522 , lines 35 and 36 cause segmentation faults, well, not those lines, I figure it's those lines
<8> blanky: let look at it
<1> ChrisLong, okay :)
<11> Is there a way in python to get the error messages generated by the interpreter in an 'except' block, similar to java's getMessage method?
<3> ackackackadack: except MyException, msg: ... msg
<11> nice, thank you
<0> not issubcl***(long, int) # True
<0> why isn't long derived from int?
<0> there?
<0> not issubcl***(long, int) # True
<8> blanky: hmm, i guess it's the MozEmbed() call, but i don't know. the pack_end() can't have succeeded, otherwise you had got deprecation warnings because of gtk.FALSE/TRUE (use False/True instead). Try something like "print 'before mozembed'; m = gtkmozembed.MozEmbed(); print 'after'; self.area.pack_end(m,False,True,0)" instead of line 36
<0> why isn't long derived from int?
<15> kbrooks: because insane
<0> Jerub: huh? "long *int*eger"
<8> blanky: i can't test it here, because i don't have mozembed
<1> oh yeah, lol im dumb, thanks ChrisLong, will do
<15> kbrooks: hehe
<0> Jerub: why is it insane?
<1> yeah, it's the pack_end call, ChrisLong
<15> kbrooks: because the implementations are completely different.
<1> going to test it
<0> Jerub: different? but it's a NUMBER, too. a integer
<0> Jerub: it has ALL the properties of a integer!
<0> Jerub: integers are immutable
<15> kbrooks: which way around should the inheritance tree go.
<0> Jerub: huh?
<15> kbrooks: refer to bool, float, long and int in your answer.
<8> kbrooks: ever tried xrange(sys.maxint+1)? long has not all properties of integer
<15> (the correct answer of course is to remove 'long' and make 'int' unbounded)
<0> Jerub: WHAT?
<0> Jerub: why?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #python
or
Go to some related logs:

#gentoo
#sendmail
connect to shared folder ubuntu live
knoppix +Xlib.h
#python
#perl
#math
gentoo amerok
#perl
usplash 1280x768



Home  |  disclaimer  |  contact  |  submit quotes