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



Comments:

<0> mariodemon_11, dont you want os.environ['winword_path']
<0> ?
<1> rodrickbrown: os.environ[.doc_path]?
<2> OK, people saw that, right?
<2> right?
<1> This came from my own test Python Plugin for X-chat.??
<2> no, the new...one..
<2> pyScorch Testing, dammit.
<0> mariodemon_11 i dont run windows but from what I can tell your trying to p*** an os environment varible to spawn()
<2> is what it says
<2> nobody read from pyScorch?
<1> rodrickbrown: not really, the problem is that the path of the .doc contains spaces, so winword won't find it. i tried adding " 's to the path without success
<1> scorchsaber: no
<2> py exec xchat.emit_print("Channel Message", "pyScorch", "****!", "@")
<2> oops
<1> good one



<2> there we go
<2> damn
<2> I want to know why no-one can see it dammit
<2> agh...
<2> Okay, how do I print a message that everyone can see as an Xchat plugin?
<0> obviously the way your invoking your function/routine isnt correct
<0> rbrown console Mar 31 10:46
<0> rbrown ttyp1 Apr 1 13:05
<0> rbrown ttyp2 Mar 31 21:23
<0> rbrown ttyp3 Mar 31 22:13
<0> rbrown ttyp4 Mar 31 22:18
<0> rbrown ttyp5 Apr 1 19:43
<2> Does THIS work?
<2> yay!
<0> scorchsaber, easist way would be /exec -o /path/to/script/foo.py
<0> :-P
<2> I used the command-thing
<2> xchat.command("say like this")
<2> I think it works anyway...
<2> errr.what?
<2> whats the -O for
<2> -o
<2> I'm supposed to say /load
<2> apparently
<2> to load a file
<2> like /load /home/scorchsaber/Test.py
<2> I was just doing one line things
<2> via /py exec
<2> ie.
<1> okay, so i will have to escape the file name i guess
<2> xchat.command("This was done with /py exec")
<2> shoot
<2> Disconnected for some reason
<2> I think Python is broken
<2> dammit!
<2> How do I make something write a line with the Xchat plugin stuff?
<2> has anybody used Python to make a plugin for X-chat?
<3> Does anyone know a cgi script similiar to cgiirc only in Python?
<3> Guess that's a no
<4> I've got an interesting prediacament.
<4> I've got an XML file that contains data that changes on a daily basis. I want to write a script that'll download that XML file, get the data, and analyze it.
<4> Barring that, I'd like to read the currernt data and be notified when the data reaches a certain value.
<4> Now, I'm not asking for anyone to give me code. I'm asking for suggestions on modules, methods, etc.
<4> I know I'll need urllib(2?) and xmlparser(?).
<5> Hrrrrmm
<6> is there a way to effectively implement interfaces in python's OO model? (i mean, enforcing some parent cl***' methods implementation)
<7> no, not directly in python
<6> shekmalhen, and indirectly? by pointing a gun to the dev's head?
<8> you could use an InterfaceEnforcer metacl*** or similar that throws an exception if the interface isn't implemented at cl*** definition time
<9> why characters with accents don't display correctly?
<9> with "print" they do
<9> but they don't if they are a variable for example
<7> ruben_gonc, you mean?
<10> can someone help me with order of evaluation? eg can i do something like [re.match(pattern, x).group(1) for x in out] and have x evaluated before the call to re.match?
<7> ruben_gonc, x = ''
<7> print x # is fine
<7> x # not fine
<7> ?
<8> JohnRambo: hrm? x is evaluated before the call to re.match
<9> shekmalhen, yes
<9> exactly



<8> ruben_gonc: so instead of seeing the accented character you see something like \xe8
<6> joedj, may work, thanks
<9> joedj, , yes
<8> ruben_gonc: python uses repr() to display a programmer's representation of the string, when you say 'x' at the interactive interpreter instead of 'print x'
<6> ruben_gonc, and why do you care about it if print's ok? (it's just the internal python representation of the 'accented' character)
<8> ruben_gonc: that's just what it does.
<10> joedj: thanks much
<9> just because it a bit annoying
<9> it's a bit annoying
<8> ruben_gonc: what's annoying is having non-printable characters and not being able to find them :)
<11> Drak
<6> ruben_gonc, anyhow that's the reason and there's no way to avoid it AFAICT... if you want to render the chars, use print or some equivalent
<9> Yango, joedj , thanks
<9> as i am just learning python i thinked it was some error :P lol
<9> i found my problem
<9> i couldn't remember
<9> for example
<9> how do i solve this situation
<9> http://pastebin.com/635245
<9> here i use print and that accent problem happens
<7> like joedj said earlier, it is because of the repr() call
<7> each elements of the list are repr()'ed
<9> and i have to ....?
<9> make them a string or something?
<7> that depend on what you want to do.
<9> just print that correctly
<6> for item in the list: print item
<6> you need another loop or use map
<7> i'd do: print '\n'.join(["%s, %d" % (e[0], e[1]) for e in database])
<6> well, that's probably a bit too advanced for a beginner :) but yes, that's cool
<9> yes...a bit to advanced;)
<12> I'm having a hard time gettin dislin to work (http://www.mps.mpg.de/dislin/). First I ran the install script (editing it to my python 2.4 dirs) then I exported the vars referred to in README. but when I did "from dislin import *" I got a version mismatch warning beacuse the module was compiled for python 2.2. So then I got the source for the module and recompiled it (editing it's make script to python 2.4) and it compiled fine. Then i copied the ne
<12> my problem is that now when I do "from dislin import *" I get "/usr/local/dislin/python/dislinmodule.so: undefined symbol: getran" ... I just compiled dislinmodule.so ... did I do something wrong?
<6> ruben_gonc, try this for starters: for item in database: print item[0], item[1]
<9> Yango, that way it displays correctly
<6> ruben_gonc, yes, I know
<6> :P
<9> and how to print all the elements at the list at once?
<6> you have nested lists... have you read the tutorial?
<9> what tutorial?
<6> the one at www.python.org
<9> no
<9> i am reading one book from apress
<0> for n in list: print n
<0> would print all the elements in your list
<6> but your elements are themselves lists, ruben_gonc
<9> Yango, yes
<9> and if i do something like :print ruben[0] it displays correctly
<6> so you need to go deeper and add another loop (if you want to show the chars and not internal representation)
<9> but
<9> if i do
<13> Is the function print(a) the same as the function print $a, "\n" in Perl ?
<9> print database it doesn t
<0> fridim yeah but you dont need ()
<0> print a,
<0> if you dont waant \n
<13> rob, yes i know, it was for the output
<14> :)
<12> gotit!
<6> ruben_gonc, yes, because printing lists is not the same as printing strings
<13> rodrickbrown, okay
<0> ruben_gonc, lists are similar to arrays in other languages
<0> i
<0> fyi
<9> so what i have to do if i want an output that displays all the elements of all the lists?
<6> ruben_gonc, what's wrong with what I gave you?
<6> that prints all elements of all lists
<9> oh
<9> sorry
<9> yes thank you
<15> hello
<7> hi, Alexi5
<15> have you ever use python in web development
<7> not in production. yet.


Name:

Comments:

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






Return to #python
or
Go to some related logs:

#suse
gaim and flashchat
debian net install sc1425
php5servlet phpmyadmin
phpmyadmin increase 2048 max
libX11 XI.h no such file or directory
#debian
#web
#fedora
no eth0 ~noob



Home  |  disclaimer  |  contact  |  submit quotes