| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Comments:
<0> MFen: interesting. this is a difficult topic for me because I've always had an aversion to drugs. <1> jtrask: when she's not on them, she's bouncing off the walls and task switching every 30 seconds. when she is, she has normal conversations and so forth <0> I'm perfectly functional as a human being. <0> but, for instance, I've written about 30 lines of code in the last 10 minutes... <0> while talking here <2> Jerub: "perfectly functional"! and modest, too! ;) <1> jtrask: re earlier comment, you have a huge advantage. it takes decades to be an expert programmer. you're ahead about one decade <1> Jerub: that's pretty effective, i'd say <1> Jerub: you probably don't need them <1> when i get distracted it takes me far too long to get back on task. and it is getting worse for me too <0> MFen: the point is, I've been coming back here on average 3 times a minute <1> Jerub: but you're always able to continue the task <1> that doesn't mean you're easily distracted, it means you're multitasking <3> look! a monkey! <0> MFen: only because I've got a failing unit test. My lack of attention to detail is frustrating me. <0> (that said, ADHD programmers should use test-first, it's the only way)
<1> damn skippy. <4> luckily thats ridiculously easy in pytho <0> (oh, and mousewheel on desktop background to swap virtual desktops is awesometastic for fast task switching) <2> Jerub: mm never tried that. i was always more of a keyboard person, so, alt+tab <4> hm thats cool on another note, nfs support in winserv2k3 r2 <5> It's been so long since I used virtual desktops <5> I just clutter my desktop with a couple full-height xterms and use screen a lot. <3> (i prefer using numpad for virtual desktops.... i have them set 3x3 and just hit one key to switch to the ***ociated task) <1> yay scree <1> n <6> how can I get the path of where the script running is in? I mean the dir it is in, not the dir *I* am in <1> and tabbed terminals. <3> sys.path[0] <1> that isn't a guarantee <1> os.path.dirname(__file__) will do that too, but doesn't work in py2exe <1> (os.path.dirname(sys.executable) might be what you want there) <4> os.path.dirname(os.path.abspath(sys.argv[0])) is what I use <4> thats never failed me, py2exe or not <0> jtrask: alt-tab is the most inefficent task switching method I've ever used <1> prencher: until you turn that script into a module you can import.. <7> Jerub: why is that? <0> sysfault: because it's O(n*log(n)) <4> thats a point MFen <7> Jerub: so it's slow? <4> but i'd argue bad design if you design yourself into such a situation <8> mind that symlinks will mess up sys.argv[0] <0> sysfault: uh, it doesn't scale with the number of windows you've got open. <1> keep few windows open. i am an obsessive window closer <6> is there a way to spawn a process so it doesnt block my app waiting it for it to exit? without using threading that is <5> sys.path[0] will point to the actual directory, even if sys.argv[0] is a symlink. <0> MFen: I have 12 terminals, 2 browsers, mail, 4 vim, xmms and 2 gaim. <7> I have tons open, most of them are shaded. <0> MFen: and this is still 10am <7> Jerub: 12 terminal windows? wow. I suggest you look at screen if you haven't already. <1> Jerub: i think i might just reboot if my desktop ever looked like that. <2> Jerub: there's a word for the data structure my alt+tab represents <2> i keep 5-15 windows open, yes <2> but only 1-3 are likely to be used <9> Priority queue? <2> believe so, yeah <3> i have about 10 term windows open <0> sysfault: screen doesn't focus-follows-mouse :) <2> priority queue. yeah. <0> like, one is running tests, another couple are running programs with logs I care about <2> for the few windows im actually using, ive got very fast access <7> i currently have 2 uxrvt terms open with one running screen, gtk-gnutella, gaim, 1 firefox window full of tabs, pida, and gpdf <1> Jerub: i'm working on three simultaneous computers and *all together* i don't have that many windows open, even if you count tabs :) <7> heh talk about organization. <2> i can always use the mouse for the things i know i dont have instant access to... <1> if you count screens i might squeak over <2> i have gaim with two tabs, firefox with 5, compiler and text editor. 9 total <2> but i could probably close all 5 tabs in firefox and not particularly regret it <9> 17 tabs in gaim. <2> heh <2> ive usually got 5 or 6 <2> that's usually why i get no work done <2> today, it's #python and my girlfriend and thats so all i need. <9> 17 is actually my low margin. <10> i sare you all to solve this: 3x <3> drigz: thanks for the pointer to eclipse. i probably won't use it myself, but there's a java programmer i might be able to tempt to python with it ;)
<11> why doesnt def main(): <11> crit_name = raw_input("What do you want to name your critter?: ") <11> crit = Critter(crit_name) <11> work <5> pipeuser: dunno. why doesn't it? <5> pipeuser: does it give an error? <11> no but it doesnt make crit <2> hahah <5> are you sure? Or did you just forget to add 'return crit' to the end of the function? <9> Go directly to a tutorial. Do not p*** go, do not collect $200. <5> now, now, be nice. <11> yea i know about the return but that didnt fix it so i took it back out <5> or I will ridicule you the next mistake _you_ make :) <9> It doesn't matter how you try to fix it if you don't know what's wrong. <5> pipeuser: well, what do you want the function to do with 'crit'? Are you calling the 'main' function and expecting it to return 'crit'? <9> Go ahead. It will prolly be ridicule-worthy. <11> Yhg1s, yea <5> pipeuser: then you need the 'return crit'. <5> pipeuser: the next suggestion is to add something like 'print "Returning crit:", crit' to the function, right before the 'return crit' (but after the crit = Critter(...)' line. <5> pipeuser: then see if that print is being called. if it is, something is wrong at the place where you are calling 'main'. If it doesn't, you aren't really calling 'main'. <11> o n/m i got it <11> i didnt "run" the script in spe when i add the return crit so the terminal wasnt upto date i guess <11> i feel much better now that i know what im doing and it was just a stupid mistake and not me not knowing how to program a simple program <11> why so quitee now/ <11> ?* <5> no one is talking. <12> I'm trying to get a very simple SMTP server test working. Using just the first block of code in this article - http://www-128.ibm.com/developerworks/webservices/library/ws-pyth12.html <12> All I do in process_message is print "Message recieved..." <12> but it's not working.. I'm wondering if it's failing because there's no DNS <5> that depends on how it's failing. <12> I'm sending the test message from gmail <12> It just does nothing <12> I'm not recieving anything <5> have you tried connecting to the host and port through telnet? <5> can the machine actually accept mail? <5> and are you telling whatever is sending mail there to send mail on the right portnumber? <12> It's on my desktop, I'm on windows and trying to just send it to my ip... <12> am I missing something huge? <5> probably. Mail isn't usually delivered directly to the end machine. <12> It's using the default 8025 <5> that's not the default for SMTP :) <5> port 25 is the default port. <12> I thought 25 was for the client <5> it's for everything. <5> (well, everything that is SMTP) <5> getting a server to deliver to your host directly is going to be tricky. You can, however, configure a mail client to deliver directly to it. <12> hmm. Why would their example use 8025? :S <5> just set the 'outgoing mailserver' to yourhost port 8025. <5> because you can't use port 25 without having special privileges. <12> ah. <12> So it's not easy to get all servers to deliver to your desktop then? <10> um. <10> sipher, you ssdont understand <10> sipher, no its not easy, port 25 is final' <5> sipher: it's extremely uncommon, even. <12> I know it's uncommon <10> like, all servers connect to port 25 only <12> but it _should_ work <10> and thats it <5> sipher: if you run the service on port 25, and your ISP doesn't block incoming port 25 traffic (not uncommon), and the machine is accessible from the internet, then it might work. <5> if your host doesn't have MX records, or MX records that point to itself. If it does have MX records that point elsewhere, you have to send it to the IP address. <12> Yhg1s: Thanks. That's what I wanted to hear. :) <11> im tring to make an ircbot should i just use socket or is there a module i can find that might siplify it? <12> If they block 25 I know a line tech that works there that may be able to unblock it for me <13> How do I suppress warnings? <6> how can I make a multi line lambda function as in lambda: dosomething; return False ? <5> sanmarcos: you cannot. Use a function. <13> sanmarcos: Just make a normal function <5> or rather, use 'def'. <5> bouncing: using the warnings module, or the -W option to Python. <6> ok, Ill use def inline :) I guess the lamb cant save me now <5> pipeuser: if you want to write an IRC bot, I suggest looking at one of the many existing ones. You can us socket, but it's tedious and hard to get right. You can use irclib, but it's tricky to use. Twisted is the easiest way to write an IRC bot (and several have been written) but it also has the steepest learning curve. <13> Yhg1s: sweet <5> Twisted is useful in *more* than just IRC, though.
Return to
#python or Go to some related
logs:
python returns ascii VALUE debian multiple cpus #perl iptables -m recent syn flood #css dont think about it, just do it cannot set up thread-local storage set_thread_area boot chdir failed - the server is not configured correctly swat #fedora #gentoo
|
|