| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Comments:
<0> jsm, say more on what you want generally <1> Dafock: as a matter of interest, why do you need it? i thought remote debugging was most for low-level development (device drivers etc) <2> nkour, off the top of my head: slice first 255 chars, rsplit once, store the left part, glue the right part to the remaining big string, rinse, repeat. <2> Currently I'm labouring on something more elegant. <3> HappyFool, I'm doing embedded, and the box I'm writing for.. well it doesnt have any gui-ness.. <3> and the code for it is relying on graphics code only well executable on this box <0> TFK, I don't understand rinse. the problem though is that I should cut to 255 but I shouldn't cut a word into two <4> http://www.rafb.net/paste/results/bHjQ3h47.html <---this code takes extremely long to execute when it tries to list the files to a package with many many files (4000 or so), what can I do to make it faster? <1> Dafock: googling for 'remote debugging python' reveals some promising looking hits <3> HappyFool, thx, but the missing link was always the one-click remote execution(+debugging), when google was _my_ friend :) <2> nkour, "rinse, repeat" - put the preceeding into a loop. You .rsplit(' ', 1) on the [:255] bit, the left one you keep and the right one you glue to the remaining string (the original [255:]) <4> anyone? <0> TFK, I guess I also need to start from 255 and going back to look for a ' ' <5> genia4_: what is equery? <2> nkour, erm, that's what the .rsplit does <4> myouko: a gentoo tool for generating info about installed packages
<0> TFK, a yes sorry. thanks <2> This will not necessarily produce the most efficient packing, though. Hmm. <6> benji Do mechanize support Location: header? <5> genia4_: running it with the arg "l" generates a list of packages and with "f" a list of files ofr a specific package? How many packages are there? <7> I believe it does wundo <4> myouko: 400 packages, maybe 500 <4> but this specific one makes it freeze, has around 4000 files <4> myouko: and yes, l generates a list, f files for a specific package <6> how do I replace all the $ in string link by a : ? <4> it works fine for like 20 packages, then for this specific one it just freezes <8> thestring.replace("$", ":") ? <5> genia4_: it locks for a specific package? <4> myouko: seems so <5> does it also do that when running equery from the shell? <4> no <4> works fine from the shell <5> a large package? <4> 4000 files <4> 4000 lines of output <5> in one package? <5> ok <4> yes <4> it's php's docs, tons of html files :) <9> where can I find all the methods you can run on a type dict? <5> oh, i don't know much about linux but maybe the pipe is stalled? <4> hmm <10> hey guys, im writing code in gedit and i used to get the text color coded but i dont get it now. how can i get the colors?? <8> the pipe is stalled o_O <4> what does it mean? how can I fix it? <11> did anyone here ever use Rational Rose? <1> indigoblu: tried help(dict) ? <11> people here are planning to use Java <9> HappyFool, just found it in API reference on python.org thanks :_0 <5> genia4_: i don't know.. i am only brainstorming (which seems to amuse eleusis :p) <1> PersianPower: Edit -> Preferences -> Syntax highlighting <4> bah <4> not sure what the problem is <8> :) <1> apparently the new gedit is python scriptable. i won't switch from emacs in a hurry though <8> genia4_: what's up? <4> http://www.rafb.net/paste/results/bHjQ3h47.html <4> freezes on a package with 4000 files <4> gvim here too :) <5> i don't have any knowledge of pipe, so i just thought that the 4000files formatted in html might fill up a buffer or something <10> HappyFool: the option is selected and when i select and unselect it does not change anything <8> hmm <1> PersianPower: maybe the extension of the file is wrong; otherwise i don't know, sorry <8> subprocess :-\ <4> eleusis: what should I use? <8> i don't know.. i'm just not familiar with subprocess ;) <10> HappyFool, ok i got it, i selected python in view->highlight mode->scripts <10> thanks <8> genia4_: what's wrong with the code? <5> eleusis: it freezes on a package with 4000 files <5> genia4_: does it "unfreeze" after a while? <4> no <5> or you must kill it? <4> just freezes indefinetly <4> I must kill it
<5> okay <4> filesPipe.wait() <8> hm <4> gets stuck at that line <8> maybe subprocess pipes have some quirks <8> check the documentation? <5> would something like this work: <2> genia4_, what happens when you isolate the offending subprocess call? <4> checked, nothing that's similar to mine <5> for line in subprocess.popen(..): <4> TFK: haven't tried, let's see <2> O_O; <8> -_- <4> ok, I think I understand the problem <4> big pipe = problem <4> another big package froze <5> ahh, maybe i am not totally wrong then :P <4> smaller ones work fine <4> more or less <4> maybe I shouldn't be using a pipe but a file object... <12> hi, anyone knows if there's something similar to jakarta slide in python? <2> why would a big pipe be a problem? <5> write to a file and then parse the file? <4> TFK: not sure, but it is <4> I'm trying a file object now, gimme a min <5> too small buffers? <2> Aren't pipes supposed to be able large amounts of data? <8> maybe the subprocess module does something weird to pipes <2> err, supposed to be able to handle large amounts of data... <2> Well, the source is avaliable, but I doubt it. <8> :) <4> how do I create a file which has no physical presence? <4> in-memory or something <8> hm <8> there's CStringIO which stores a string and allows you to access it like a file.. <2> http://python.org/doc/2.4.2/lib/module-tempfile.html <--- perhaps this? <8> StringIO even <8> yeah, but tempfile files are stored on disk, i think.. <8> then again this says the temp files are destroyed when closed.. which might be just as good <4> hey, works now <4> it was wait that was ****ing up :( <4> pipes are fine, thanks again guys <8> cool <4> lemme show you new code <4> http://www.rafb.net/paste/results/YTFif298.html <4> works reasonably slow now :) <8> \o/ <2> I'd propose stylistic changes if this were the last iteration of the code :-) <4> I'm open for suggestions <4> used to c++, so my programming style isn't very pythonic :) <2> Hmmm, lesse... *hack hack* <5> genia4_: yeah, that was something like that i meant with my "for line in subprocess.popen(...) :) <8> i've yet to see a definition of what's really 'pythonic' <4> eleusis: well, what I have definetly is not :) <2> It's Pythonic to reduce many lines of code into few lines of code using stuff like LCs, genexps. <4> yes, I'm not familiar with those yet <8> although there is 'python -c "import this"' <2> It's Pythonic to use iterators wherever possible (range in for loops, etc.) <8> well, he is using iterators.. <8> for package in packagesStdout <2> I'm just sayin' ;-) <8> :P <4> http://rgruet.free.fr/PQR24/PQR2.4.html#files <---I Like this page <2> genia4_, http://rafb.net/paste/results/VqD6kB78.html <--- should work <8> heh <2> err <2> wrong indent :-/ <2> line 17 needs to be indented in <8> bleh <4> that's cool.. <8> that's pythonic? :P <2> Four spaces is more pythonic than tabs, btw <8> that's more lispy! <4> need to find time to configure this vim
Return to
#python or Go to some related
logs:
itsemurhavinkit
#qemu #suse makko asdfa honeywell dps6 value blackpenguin shutdown execl python syntax #centos #sdl k3b-mad source
|
|