| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Comments:
<0> Ceran: It's not necesarily python, but I think it's simple <1> Hello, anybody know why subprocess.Popen() lets me enter keyboard input into the running program? <2> elventear: Yeah, I was hoping for more of a sole Python lib though. <3> HellDragon: as soon as money is involved, the incentive for a would-be attacker rises quickly. Just look how many commercial software packages there are with unbroken key algorithms. I wouldn't know of one. <4> :( <1> For example, I run Popen on a command like p***wd, and it lets the USER type stuff into it, rather than letting me proc.stdin.write()? <3> HellDragon: Which brings us to the eternal question: what would you like to do? <0> Ceran: yapgvb is Yet Another Graphviz Python Binding <4> nothing i justed wanted to know, Blackb|rd <3> HellDragon: Ah, well, now you do :) <4> yes ty <5> lws: popen2? <3> HellDragon: np. And GPL'ing software is *so* much easier! :) <1> quotemstr: those are depreciated in favor of subprocess.Popen aren't they? <1> deprecated. <5> lws: RHEL4 still uses Python 2.3, so I still use popen2./
<6> What is wrong with this? "y = 0; for y < height:" Python doesn't like my syntax <1> quotemstr: oh <1> quotemstr: You understand my problem, yes? <3> oliverp: because it's not valid Python :-P <5> lws: Yes. It's because stdin is still connected. <1> hm <3> oliverp: I guess you want to loop over all integers between 0 and height? <5> lws: If you use popen2, you can control the standard input. <1> quotemstr: Why would it ever BECOME connected is the question. <5> lws: Because fork() creates a copy of the file descriptor table. <3> oliverp: Python doesn't know by how much to increment per loop, for one. <7> lws: you want stdin=subprocess.PIPE as argument to Popen() <5> And stdin usually isn't close-on-exec. <1> quotemstr: You can do that with Popen as well, supposedly. <7> lws: because the docu say so :) <1> ChrisLong: Yeah I have that. :) <5> Again, I haven't used subprocess. <5> It might be better. <3> oliverp: second, for takes generators (and similar) objects to get its values from. <1> quotemstr: well, thank you for your help :) <5> The principle remains the same. <1> ChrisLong: are you familiar with the subprocess module? <7> lws: ok, then <8> alright, now back to the split thing <3> oliverp: third, you either wnat to use while-loops (incremeting is done by your code) or you want to use a generator like xrange() <8> what if there is nothing to split? <9> frustrating documentation <7> lws: sorry, no, only using the docu <9> psycopg2 docs refer to it as psycopg. <1> ChrisLong: hmm <3> bkjones: frustrating docs is no good: it usually frustrates back ;) <9> yeah <1> ChrisLong: maybe take a look? http://deadbeefbabe.org/paste/663 <9> they started it! <10> lws what about subprocess? <2> elventear: I also saw pydot, although it's so out of date their website doesn't even point to the current graphviz site. <1> rlo: It seems to be connecting stdin when I don't want it to be. <7> lws: mount is not using stdin, it's using the terminal directly <0> Ceran: So, yapgvb not good enough? I've never used them, FYI <1> ChrisLong: 0_o <1> ChrisLong: Well how do I get it to knock that off? <1> ChrisLong: I don't want to p*** the p***word via the command line arguments. I seriously doubt it overwrites it's argv so you can't look at ps and grab the p***word. <2> elventear: I'm trying it out now. It looks like an active project. <7> lws: maybe pty.spawn does what you want <1> ChrisLong: Do you happen to know if mount overwrites argv when it loads? <11> hi guys <6> Blackb|rd, haha. Yeah okay. Thanks a lot for the explanation. :-) <7> lws: don't know <11> if i wanted to create a structure like this... <8> hrm... anyone? if i'm trying to do s1,s2 = s.split(".") but s DOES NOT have a ".", how do i keep it from faulting? <11> array[0].flag=1 <1> ChrisLong: thanks for the tip on pty.* looks like what I need. <11> array[1].checked=0 <11> is it possible <7> lws: you're welcome <2> elventear: heh, it appears to require jpeg.dll on windows, and I don't have that. <7> AfterDeath: use t=s.split(".") and check the length of t <8> and...? <8> ooo <8> i get it <8> t[0] and t[1] yes?
<12> any idea of why a module that is unimported may not free all its memory? <1> AfterDeath: You could also run s.search(".") or whatever first <1> AfterDeath: ChrisLong's method is more effecient though. <8> ChrisLong's idea sounds easier <13> AfterDeath, ChrisLong:why not just use a try: ? <14> AfterDeath, if '.' in s: s1, s2 = s.split('.') <8> ooook <8> thats the best solution yet <14> Why not write a cl***? o.o; <8> i'll go with that <1> AfterDeath: Not really, because you search the string twice for . <8> easiest implementation, tho <1> true. <11> anyone got any ideas how I'd implement a struc ture like that <1> cbx33: say what? Did you have an original message? <1> cbx33: oh way up there. <6> When adding a ',' in the end of a print statement, the "\n"-character is left out. But instead I get a whitespace character (' '). Is there a way to skip that character as well? <11> hehe <11> lws, thanks <1> cbx33: a cl***, i think hashes are accessible via the '.' operator in python also. <11> lws can you give me an example <11> a cl*** that doesn't have functions? <1> cbx33: Sure, why not? Somebody say a cl*** had to have a function? <11> no <11> do you have time to mock up a wuick example <11> I'm not sure how that would be implemented <11> I'm pretty knew to python <1> cbx33: hang on, i'm not a pythone expert. <11> no but it should be simple rihgt ;) <2> What kind of python lib requires java.dll? <1> cbx33: here we go <11> :D <1> cbx33: cl*** Foo: <1> bar = "temp" <1> foo = Foo() <1> foo.bar = "test" <1> print foo.bar <1> crap <1> cbx33: http://deadbeefbabe.org/paste/664 <11> ok i see <1> cbx33: http://www.lib.uchicago.edu/keith/courses/python/cl***/5/ <11> thknas <11> lws, that gets me the a.p style <11> but what about having several of them <11> a[x].p <1> cbx33: that would be a list of cl***es. <11> ok so <11> mounted=cl****5 <11> mounted=[cl***]*5 <1> cbx33: i = [Foo() for x in range(10)] <11> cool thanks <11> :( <11> :) <1> ? <11> sorry lws wrong channel <11> lws, would it be possible to extend that <11> how would the cl*** be modified for <1> cbx33: to what? <11> j.info.name <11> would i create a cl*** called info <11> with the .name <11> then j would be a cl*** suing .info <1> yes <11> I get it <1> You'd need another structure/cl*** <15> every dot counts <1> Every dot counts, in small amounts.. Doot doot doot... doo doo doo. <15> does anyone know of any (even limited) word processors written in python that are extendable? <14> Leo <15> that doesnt look like a word processor <15> maybe i should just download the Office 12 beta <16> hi <15> hi
Return to
#python or Go to some related
logs:
qam 256 decrypt comcast #perl #kde Counting hexadecimal #physics no-sources amd64 #physics /dev/hci* hcitool ubuntu dvd decrption ptp plugdev problem gentoo
|
|