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



Comments:

<0> is there a way to get the key of a known value from a dictionary ?
<1> roryy: Ahhhhh
<2> ooh, a box!
<2> :)
<2> MrMeanie: looks pretty cool
<1> roryy: Good :-)
<1> roryy: Go file->open then load examples/head.gpx.
<1> Open the scene window, and double click the node 'head'
<2> a head mesh appears
<1> roryy: Cool. Now see the big list in under the scene tab? Scroll to the top.
<1> roryy: Now, select the item near the top called box.
<2> ok, a box appears
<2> bounding box?
<1> roryy: Now, highlight that 'box' entry, and press and hold the down arrow key.
<2> MrMeanie: cool :)
<3> another noob q, but, how do I chang ethe port with the ftplib?



<1> roryy: Thats the 'plan' or construction history as its called in most modelling software :-)
<2> MrMeanie: looks like a helluva lot of work
<2> (the app, i mean, not the head :P)
<1> roryy: Been working on it for about 6.5 years.
<2> ah
<2> well, it looks good
<2> :)
<1> roryy: Of course, there is most probably very little 6.5 yr old code in there. Its been redesigned a number of times.
<2> maatttt: iterate over mydict.items() to find the item
<1> roryy: It was originally all c++ code, but I decided to recode the UI in Python :-)
<2> MrMeanie: fwiw, i think recommend that .deb file for ubuntu/debian users
<0> roryy: thanks
<2> MrMeanie: otherwise, most other stuff is in the ubuntu repos
<2> i guess the same goes for fedora
<1> roryy: That pyGtkGLext file you mean?
<2> MrMeanie: yeah
<1> roryy: Okay will do.
<2> not sure why that 'LD_LIBRARY_PATH' is needed -- i didn't do a 'make install' (or 'scons install') -- is there one ?
<1> roryy: Thanks a lot for your help. I owe you one. I will released an updated file with a shell script which does the LD_LIBRARY_PATH trick.
<2> yeah, i guess that's easiest
<1> roryy: scons has the facility for install, but I haven't put it in yet.
<2> anyway, cool, it was fun :)
<1> roryy: What name shall I credit you under in the docs?
<2> MrMeanie: erm, Rory Yorke. No need to credit me, but thanks ;)
<3> http://pastebin.ca/49490
<3> how can I add the host port to that? I'm quite new to python andI wasnt able to figure it out from the ftplib docs
<3> any help would be appreciated
<4> is it possible to make a python script directly executable on a Windows system?
<4> Tutorial 2.2.2 talks about UNIX
<5> dibblego: I believe there are a few options for you to try out.... search for pyexe (I believe that is one of the most famous)...
<4> thanks
<6> hello
<3> anyone?
<6> is thread started by thread.start_new_thread() killed automatically?
<7> yes
<2> No1CaNTeLL: maybe something like ftp=ftplib.FTP(); ftp.connect('192.etc',21)
<1> roryy: Okay. Thanks for the help. I am about to release v0.99.5-1 with that fix! Thanks.
<7> No1CaNTeLL: read the docs, its all in there very well laid out
<7> or just google
<3> =-( it seems well laid out, but I'm on my first few days of python so I'm still having a but of trouble catching on quickly. Feels kinda wierd being a noob again =-)
<3> thanks, I'll try that roryy
<7> No1CaNTeLL: read the python tutorial, then dive into python, before working with an API
<7> it will make your life easier
<8> anyone know if the tool used here is available from somewhere? http://www.tuxed.de/vimpst/video.html
<9> Whats exciting in #Python these days :-) ?
<10> nothing at all.
<11> is there anyone here who's using SciPy regularly? I can't figure out how to initialize their sparse matrices using standard triplet (i,j,v) describtion
<12> is pythn compiled into native code?
<13> Stork: not with CPython, sometimes with PyPy
<12> okay
<12> can gcc be used to compile python?
<13> If you want to distribute an application on windows without making users install python, you can use pyexe
<13> Stork: nope, but you can use PyPy to compile python to C and then use gcc to compile that
<12> i just use linux ;\
<12> i was just thinking of having a look at python - my dad says it's nice
<13> well 99% of Linuxes come with python, so that's not a problem then :)
<12> i was hoping to make an xchat plugin, for starters
<13> If you want to get started, best way is to check out a python tutorial like "Learning to Program" or "Dive Into Python"
<13> ?tutorials
<10> or bugging us to write your programs for you for 6 months.
<13> just type that :)



<10> consuming thousands of man-hours on irc.
<13> Jerub: that too
<12> Jerub, yeah, that's what i'd usually do
<13> hey #python, I want to hack computers! How do I hack computers? Can I use python to hack computers!
<13> (kidding)
<12> does python use a vm
<2> Stork: why do you want to compile your python code to C?
<10> Stork: yes.
<12> oh, okay
<12> my first idea is to make a system-properties script - everybody loves those ^_^
<13> pfft, think of something original. Like an MP3 script.
<12> but i need a system properties script ;)
<12> ?tutorials
<12> oh my god
<12> python is named after monty python!!
<12> that's so cool :D
<14> spam eggs instead of foo bar :)
<12> ah
<12> that explains the SPAM = 1 in the tutorial
<12> how can i execute a statement (like uname -r) and then read input from it?
<15> os.popen perhaps.
<16> Stork: os.popen.
<12> i mean like, for a system settings script, if i wanted to find out the output from uname -a, would popen be right?
<12> how about 'commands' ?
<15> f = os.popen ('uname -r') then f.read or f.readline or some such.
<12> okay
<16> tp76: no
<16> Stork: for line in f.
<15> Right. Both will work but your method is probably more efficient.
<16> dont use f.readline directly unless you have to somehow ignore a blank line or something
<12> okay
<17> I have Python eggs built, but how do I import them?
<1> emacsen: you have to fry them first. scrambling works okay too.
<1> emacsen: boiling will be supported in python v2.5
<17> MrMeanie: if you're going to be obnoxious, your jokes need to be funny
<16> MrMeanie: Very funny. NOT.
<1> emacsen: Sorry, didn't intend to cause offense. Just looking at the docs now :-)
<18> I've got a list of lists of strings. How can I copy it so that altering the copy doesn't alter the original?
<1> emacsen, kbrooks: Anyways, cmon. They Python community is full of bad Monty Python references. Half the system docs are based on bad jokes ;-)
<16> MrMeanie: be quiet.
<17> aquarius: list2 = list1[:]
<18> emacsen: that doesn't work :(
<12> now i have a challenge and a half ;\
<17> umm... how is that possible? did you try it? that's from the python tutorial
<18> a = [['a','b'],['c','d']]; b=a[:]; b[0][0]='z'; print a[0][0] # prints z
<19> emacsen: the inner lists will still be references to the same objects.
<19> aquarius: perhaps you want something like copy.deepcopy
<17> aquarius: that's different than that you said...
<12> how can i parse a large string (such as /proc/cpuinfo), as to obtain a single value (like the clock frequency or cache size) ?
<17> aquarius: that's a list of lists!
<18> emacsen: " I've got a list of lists of strings" is what I said :)
<18> sjj: ah, copy.deepcopy works. Nice.
<17> aquarius: oh. oops
<16> Stork: str.split ?
<12> kbrooks, what do i split by? \r?
<16> Stork: just use it
<12> okay
<17> kbrooks: you never used Python eggs?
<12> kbrooks, so like, mystr.split() ?
<16> Stork: help(str.split).
<12> ??
<19> Stork: it's just a bunch of key value pairs per line right? you could quite easily turn it into a dict ... dict([line.split(':') for line in open('/proc/cpuinfo') if line.strip()])
<12> the problem is, they're like, 'key : value' with a bunch of whitespace. is that handled automatically?
<12> or is that what the strip does?
<16> Stork: no. but it should be handled auto.
<12> cool
<19> you'd have to apply str.strip to all the items after doing the split.... otherwise the keys would be 'cpu Mhz\t\t' for example.
<17> sjj: actualy strip is now a method of a string
<17> oh sorry I thought... nevermind thought you were suggesting using string module
<16> emacsen: heh
<12> sjj, how would i go about doing that?
<19> Stork: well, line.split(':') is going to give you back a list with two elements, the text before the ':' and the text after.
<12> right
<12> so i need to iterate through the dict stripping line[0] and line[1] ?


Name:

Comments:

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






Return to #python
or
Go to some related logs:

e2e5e0bfb2edffd2ce02dd77bda4558e
#ubuntu
#web
ubuntu GPG error: cipherfunk
Error: ati-fglrx conflicts with nvidia-glx
pi 100000000000000000000000
OS Not Found EFI
bash unary operator expected string comparison
slow firefox scrolling compiz
kopete gentoo error reemerge



Home  |  disclaimer  |  contact  |  submit quotes