@# 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



Comments:

<0> l[l.index(object)] = newobject
<1> yeah that way is better
<2> yay list comps pwn
<3> kosh and Erwin, how do I get the (object) so I can find its index?
<3> kosh, I iterate to find the object with a specific attribute value.
<3> kosh, is that the right way?
<4> kosh: I do know that you can get nearly all of the processes, because I've done that in windows .NET
<4> kosh: I would therefore ***ume that using lower-level api's should work.
<1> Arafangion: you can get nearly all but not all
<1> Arafangion: nearly all and all are not the same thing
<1> pac1: I would write a function that would search a seq and return the index of the item you want and then use the code that Erwin supplied to replace the value
<4> Why does OrgulloKmoore want them all?
<5> I actually just want to create some sort of alternative for windows crappy task manager
<4> Then nearly all should be just fine.
<6> I'd like to import a variable from a module based on command line arguments. I'm using __import__ , but __import__("modulename",None,None,"variable") does not do what I expect (namely: import variable from module)
<5> Arafangion, but I don't know how to get nearly all



<4> OrgulloKmoore: Have you ever run taskmon.exe ?
<6> errr from module import variable even
<4> OrgulloKmoore: I would probably suggest using .NET for this.
<5> Arafangion, nowadays it's called taskmgr.exe
<4> OrgulloKmoore: Cool :)
<5> heh
<7> kim_register: x = getattr(__import__('mymod'), 'XR')
<6> Pythy, I found it just as you did!
<6> thanks :-)
<7> pac1: establish a .__eq__()-method whose comparison is based on the attribute of interest, so that you can use Erwin's neat solution:
<7> cl*** C: __eq__ = lambda self,other: other.v == self.v
<0> Sheesh, the AJAX books are popping up all over the place
<6> Pythy, thank you! http://bruning.xs4all.nl/~kim/timetape.tar.gz (do ./timetape.py --ls to see a list of possible time tape sets you can use... then ./timetape.py [name of tape] [milliseconds between updates]
<6> )
<7> kim_register: You work fast.
<7> orgullokmoore: http://www.sysinternals.com/Utilities/Proces***plorer.html ?
<5> oohh, perty, Pythy
<5> thanks
<7> orgullokmoore: More here: http://www.sysinternals.com/ProcessesAndThreadsUtilities.html
<5> this is very well made
<3> is there a way to get a list of the attributes of a cl***?
<8> anyone here know how to build python as a universal binary on mac os x?
<7> ?inspect pac1 & dir(p) (mostly);
<9> kamalgill: there's quite a few threads on it on the pythonmac mailing list.
<9> there should be a binary distro of it somewhere by now, though.
<8> ok, thx Chairos
<8> right, i need to build a universal binary for an os x installer for zope 3 and plone
<7> See the mac-Python wiki? There's a py2exe-like bundler for the Mac, if that's relevant.
<8> just wondering if Ronald Oussoren is willing to share his build notes
<8> Pythy: ok, i'll have a look. thx.
<9> kamalgill: I'm sure he is.
<9> at any rate, between the macpython wiki and the pythonmac-sig list, you should find all you need to know
<7> kamalgill: http://pythonmac.org/ http://undefined.org/python/
<8> thx Pythy, Chairos
<10> hi, i am making a very simple program, but when i try to add a menu to it, it seems that it runs the command right away. is this what is supposed to happen?? if it is, is there any way to make it so it does not run the specified command until it is acually clicked on?
<7> don't include the `()'
<10> i need to p*** a value to it
<7> designed: command=lambda v=v: f(f)
<7> designed: command=lambda v=v: f(v)
<7> where `v' is the variable with the value.
<10> so: ORGINAL: menu.add_command(label="Add", command=setmaster(master=root)) NEW: menu.add_command(label... command=lambda v=root: setmaster(master=v))?
<7> yes.
<10> thank you
<7> designed: (If the GUI p***es an object to the function on the selection-event, you'll need to have an additional initial parameter to seize it.)
<10> this is what your talking about right? def setmaster(retries=3,complaint="You must enter a master p***word.",master=None):
<7> Nope...but, if what we discussed above works, you're all set.
<10> yeah it works
<3> Pythy, great idea! __eq__
<11> -- an update about py2exe'ing code incorporating pycrypto: it's size impact is only a fwe kb. (package is 11MB for a simple app since wx is included)
<12> if anyone has turbogears / sqlobject experience, i could use some help with this:
<12> http://deadbeefbabe.org/paste/179
<11> sjbrown, cant help with this, but a suggestion: i use wxDesigner to generat the pythoncode which builds the ui. (frees from messing with seizers manualy)
<12> seizers?
<11> -e
<13> what is the syntax for an "inline" if statement?
<12> in python 2.5 ?
<7> Y if p else N # version 2.5
<13> 2.4
<13> haven't gotten around to 2.5 yet :/
<7> [N, Y][ans == 42] # NB: all expression always evaluated.



<13> eh?
<14> :( eewewww
<13> so like ['!=', '=='][x == y] ?
<7> yes
<13> k
<13> yeah, maybe I should upgrade to 2.5 :( I didn't see that change listed in the notes...
<15> what's a good html parser of dirty/average internet html?
<15> i used to use beautifulsoup
<16> why aren't you using it now?
<15> just thought i'd reevaluate what is best
<16> it's still the best out there, AFAIK
<17> Just wondering, wouldn't it be useful to have a mention of #NewToPython in the topic?
<18> very informative channel if I must say so myself.
<18> learned a lot in there in the past few days.
<17> yeh, I just found out about it earlier today
<18> yea I saw you join.
<17> I just started learning about programming about two days ago
<17> struggling with it
<18> so python is your first language?
<17> yep, as recommended by a few folks on a gamedev channel on another server
<17> there was much debate during and afterwards about what makes a suitable begginers language
<18> Leviathann: great choice, you should read a couple of introductory texts to the language, and general programming (not centric to any language).
<18> books such as 'The Pragmatic Programmer', 'The Art Of Unix Programming', and miscellaneous online essays/wikipedia.
<18> Leviathann: using *nix?
<17> no
<17> too much work
<18> to each their own.
<19> you don't have to read them all at once
<17> granted there are great distros for beginners but that would negate my reason for using linux, so I usually get in over my head by trying to use gentoo
<17> but that's neither here nor there
<18> Leviathann: you're missing out on something good imo, the community, applications, system environment, but I never used windows for over 1 week, so I can't comment on it too much.
<17> I'm trying to get to a point with python where I can make a tetris clone, as per what another guide suggests would be a good game to start with.
<18> I start using computers my freshman year of HS which was 4 years ago.
<18> I was 14, and I installed mandrake immediately.
<17> I've been using computer all my life basically
<14> me too
<18> from there i moved to slack, then to debian, then to gentoo.
<14> since I was like, 3.
<18> unfortunately I started pretty late, but I've learned pretty quick, hard work & dedication, always investing in my knowledge portfolio.
<17> The first computer I used was an old IBM clone from Franklin, which I still have, and it works. No hard drive, it's os (DOS) boots from a 5" floppy.
<18> I have over 60+ computer centric books.
<17> 5 1/4"
<18> all paid for, none from the library.
<20> fedora core or mandriva?
<20> which is better?
<18> I had a gateway 5300 solo laptop which I got from my 'Cisco' networking teacher.
<21> neither, amigaos rules them both.
<18> my first system.
<14> I have no idea what my first ocmputer was.
<14> I have a feeling it was an appleII
<18> http://www.artima.com/weblogs/viewpost.jsp?thread=155123
<17> The computers I learned how to read on at school were apples/macs I think
<17> I think it just comes down to being comfortable with what you know
<22> if anyone is familiar with [intel] mac development, I'd appreciate insight on why opengl won't build: http://brianhv.org/temp/pyopengl-build.log
<22> that's with the MacPython-2.4.3 dmg
<23> why is the source of pygtk so small? there doesn't seem to be much of anything of substance in it
<23> 750kb for pygtk, 11mb for gtk
<24> they're just bindings
<23> hmm
<23> so if i want to dig in the source of pygtk, to see how something works i should actually be looking at the source of gtk?
<25> depends on the thing you are trying to dissect
<23> i'm trying to find a way to force a tooltip to show, i've tracked down things in the gtk source to gtk_tooltips_draw_tips, but i'm not sure how to call that function from within pygtk
<26> when doing a print with % escapes, is there something that can do both an integer and the value None
<27> what arithmetic operation is "%"?
<14> modulus
<25> modulo
<15> it's the pimpmyinteger operator
<16> Eridu: what do you want None to represent at?
<16> as
<26> Doesnt matter, im just trying to print a value and initially it could be None, which causes an error if its %d
<16> how about converting to a string - or actually testing for None
<25> if(myint)
<23> is there any way to show all members of a cl***?
<7> '%s %s' %(1776, None) #==> '1776 None'


Name:

Comments:

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






Return to #python
or
Go to some related logs:

trident dri mesa ubuntu
#perl
#debian
ubuntu chroot permission denied exec
#kde
#perl
#mysql
how not to get packeted
#perl
#lisp



Home  |  disclaimer  |  contact  |  submit quotes