| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Comments:
<0> thanks man <1> Vertice: you have to be a root to change uid of process <2> ah <1> and pwd gives only aredonly access <0> that's cool. <0> it's a daemon <1> readonly <0> i want to change it to another user if it's run as root <3> Like I said, read the man page. <0> ok. <2> pwd is nice indeed .. didnt know that one :-) <0> i just want to stop the script from mucking up file permissions <2> good idea <1> Vertice: see command sudo for example <4> why when I run this code do I get the error "UnboundLocalError: local variable 'audio_sink' referenced before ***ignment", but no error if I comment line 6 out? http://rafb.net/paste/results/8Twy1D15.html <4> I guess what I'm asking is why when line 6 is commented out does it not error on line 5?
<0> thanks guys =) <5> synic: You can't use a variable as both a local and a global in the same function. <5> (Unless you're being a smarty-pants.) <4> I see... so the = makes it a local? How do I reference the module scope? <5> synic: join #NewToPython, & explain exactly what you're trying to accomplish. <6> wow, Pythy has some leverage <7> how can I print out an objects properties? <1> vars(that_object) <7> ta <5> JohnRobert: dir(p) will give you a list of most attributes. vars(p) only works if there's a .__dict__() in use. <1> that gives member "variables" <7> there wasn't, thanks Pythy <1> dir() gives function names too <7> :) <5> JohnRobert: You can use the attribute-names from dir() to see the ***ociated values, via getattr(p, "attr_name") (skipping callables, if you wish) <7> my gedit plugin slowly becoming a reality <7> cool, thansk <7> any idea if there are any gdk keyval constants available? <7> I've written something that gets a gtk.gdk.keyval value upon keypress, and I need to know whether that number is the shift key etc.. <7> ah, there's .state which is a modifier bitmask <5> "gtk.gdk.SHIFT_MASK The Shift key." ? <7> yah <5> JohnRobert: There's also a .keyval attribute. <8> Hi, is there a good blog system written in Python? <7> Pythy, yeah I was looking at that <9> pyblogger I think. <5> JohnRobert: What's your app's need for this? <2> nir_ai: dailykos runs scoop (http://scoop.kuro5hin.org/) .. considering the traffic they have it must be solid <7> I'm trying to make a python plugin for gedit <7> so that it acts a bit more like emacs...the gnome's default key theme is a bit limited <3> Oh yay, let's overload gedit even more. <2> :-) <7> lol <3> It's not enough that it take 12 seconds to load. We can easily make it take 20 or more. <7> sorry I said l0l :/ <2> 12s ?! <2> me emacs is faster :D <3> *Anything* is faster. <10> hi, is there a way to make a 'for' loop w/o setting a var? e.g. "for range(4): foo()" will call foo 4 times <11> how would I get the pid from the os.popen(cmd) <12> hi, anyone here using python 2.4 and the Eric3 editor? <6> I am <7> tab = gtk.gdk.keyval_from_name('Tab') <7> heh <2> JarJarBinks: i doubt you can <11> pfote: ok <12> Yango_: newbie here... but when I run eric3, it uses python 2.3, any clue about how to make it use 2.4 instead? of course, without removing 2.3, since seems to be essential to the health of my KDE ;) <2> JarJarBinks: you probably have to re-implement popen .. open a fd, fork, exec your command .. etc <6> markit, exec "/usr/bin/python2.4" "/usr/lib/python2.4/site-packages/eric3/eric3.py" $* <2> JarJarBinks: but maybe i'm to C damaged and there is a easy way in python :-) <12> Yango_: no need to modify PYTHONPATH as well? <6> markit, try it without modifying it first <5> ?subprocess jarjarbinks: The PID is available from other launching routines. See that URL. <12> Yango_: I've debian sid... seems that under /usr/lib/python2.4/site-packages/ there is not eric3 directory <6> markit, ask then in #debian how to run something on 2.4 (or a present debianite) I'm not one (and look where it's eric3 installed) <13> uhm how do you get socket.recv to answer the reception with an ACK packet ? <12> Yango_: ok, thanks a lot for the tip <14> why is os.environ["REMOTE_ADDR"] not working when i run the web page? yet for item in os.environ.keys() REMOTE_ADDR is listed fine <5> Magicdead: In general, those low-level details are handled for you automatically by the socket-routines. To accept inbound-connections, you need .bind() & .listen() <13> Pythy: yes, but i'm connection to a server <13> then i receive data
<13> and then it shoudl send back an ACK <13> and then the server shoudl send data again <13> that's how it works with the original client <13> but in python it doesn't seem to send the final SYN ACK <14> in other words in the same program os.environ.keys() lists REMOTE_ADDR, but os.environ["REMOTE_ADDR"] gives a key error as if it doesn't exist. <13> so the server doesn't send the 2nd piece of information <5> Magicdead: I think you're confusing the low-level TCP/IP protocols (which are all handled for you automatically), with some type of acknowledgment-message that's part of this server's protocol at the application-level. <13> nah <13> i send something to server to what the server should answer by sending 2 pieces of data, so i do a .recv(bufsize) and get the first piece of data, but when i do .recv(bufsize) again, nothing comes <15> hey guys anyone is working on pygtk? <3> Not me. I'm working on keeping my *** in this chair. <5> ignacio|School: How's it going so far? <3> Quite easy. Gravity seems to be on my side. <9> what's wrong with the chair? <3> Nothing. I'm just working on not getting up out of it. <5> "Gravity seems to be on my side." > ignacio|School: Good thing you don't live in Australia! <13> Pythy: uhm server is down... otherwise i could have shown you the packet with ethereal <5> Magicdead: URL that explains the sever's protocol? <13> Pythy: normal TCP/IP <5> Magicdead: URL that explains the server's *application level, data-exchange* protocol? <13> Pythy: uhm i think it's a flash 2 server but i'm not entirely sure <13> i just sniffed the whole client->server traffic <13> and building a custom client on it <13> Pythy: i found what's causing the problem, just looked at the packets... somehow python sends back a FIN ACK packet instead of an ACK packet... got any idea how i could fix this ? <5> Magicdead: What makes you suspect that this is in need of fixing? What did the server send you just before your computer sent that? <13> well i mean, i can look at how the original client acts and at how my custom clients acts by capturing the packets, and the originaL client doesn't send a FIN ACK <16> How can I make a regex for a AND search? Example: a search for "test foo" should find all strings containing the words test AND foo. I tried just the replace the space by .* in the regex with searchString.replace(" ",".*"), so that "test foo" should become "test.*foo". a regex is then compiled from searchString. But it doesn't work, I don't find anything... <5> test\s+foo <5> ?rex nyk2005 <16> ?rex <5> The bot sent you info via a PM <16> Pythy: thanks, my perl inspired approach probably didn't work... <5> nyk2005: There's no difference in this case between the Perl rex and the Python rex. <16> Pythy: strange, then I don't see why that's not working... <16> Pythy: don't you agree it should? :) <5> No.. <16> ok... <5> It's wrong in more than one language. <5> (Python's rex-engine implements about 85% of what Perl can do.) <16> I know it's not gonna find the reversed order of search terms <16> oh no! I hope it implemented all those thing from perl I was able to understand and leaving off the unimaginable complicated stuff.. <17> I have a line "self._file.seek(-(200 * count * tries), 2)". This throws an error when the file is gzipp'd, and opened with gzip.open: TypeError: seek() takes exactly 2 arguments (3 given). It works fine on non-compressed files. I don't see anything in the docs about gzip.open returning a file object with a different .seek() signature. Am I doing something wrong? <18> Zalamander: looking at the code, it doesn't take a "whence" <18> Zalamander: I guess it's fair enough. You can only seek forwarding, by reading & discarding <13> Pythy: you were right, somehow the server sends the FIN ACK packet first... but it's still weird.. any idea why the server sends fin and doesn't send more data? i mean server sends first piece of data so that mean's it didn't refuse my connection, maybe got to do something with the flags ? <5> Magicdead: Because the server recognized that you're an impostor, and hung-up on you, <13> how should he recognize <13> i mean... that's not the first connect, there's like a whole lot of transfer <19> Hello <5> Magicdead: Your impersonation was spotted. <13> but that's the first point where the server sends 2 pieces of data at once <19> when I launch a python script <20> hi everyone ! <19> the process name is python <19> how to change this name ? <20> what do you think it's the best way to distribute a python-mysql script without mysql user/p***word accesible for anyone who read the script ? <17> Erwin ick. These are huge files. Seeking to the end is *much* faster. Oh well, hopefully the need to seek to the end of an archive from last week will arise seldom. <18> Zalamander: Well, you cannot seek arbitrarily in a gzip file <17> apparently. Thanks for taking the time to investigate that <13> Pythy: if you want to hit me on the head, do it now.... i mixed up a 1 with an I (stupid font) <1> zyv- if there is no separate sql server, then maybe sqlite <20> hevilut, in my case must be mysql as backend <5> Magicdead: Be glad that you caught it relatively quickly. <1> zyv- if there is then design user/group id usage <21> what host would you recommend to host a python web app? <20> hevilut: at operative system level ??? dont understand <1> zyv- apache/other web server running script ? <20> no !! it's a python-mysql app <20> not a web app <1> ok <13> Pythy: yeah i am, i just caught it cause i logged the packets i sent and looked at the hex, to ensure that i send the exactly same hex, and there was a different... yeah yeah those are the errors you can search for hours <1> zyv- then the script is run by current user uid/gid access <20> hevilut: at client side <1> zyv- make separated p***wd file that has only uid access, and make the script read that file and p*** then p***wd to server
Return to
#python or Go to some related
logs:
#gentoo kde clock applet local timezone fsck.ext3: Unknown code fMQH #asm no-sources amd64 debian dist-downgrade debian gvim e233 cannot open display disctcc in gentoo #suse pacinosworld login
|
|