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



Comments:

<0> lol k
<0> sorry for the laugh out loud its habit
<1> ok, i need help with these: i downloaded "http://es.wikipedia.org/wiki/Jes%C3%BAs_de_Nazareth"; and then decoded it with utf8 without probs, but if i parse the contents with an htmlparser that extracts all the text data with handle_data() and then try to decode the extracted data with utf8 i get an unicode decode error, how could that be?
<1> kevinish: well, did you get how to do it?
<0> mariodemon_11, sort of im gettin a syntax error im trying to fix
<0> its really wierd because i wasnt getting the error at all until i added that and now im geting an error that has nothin to do with it
<1> well you just have to: file=open(filepath); s=file.read(); file.close() and: import Tkinter; textwidget=Tkinter.Text(); textwidget.insert(1.0,s); textwidget.pack(); Tkinter.mainloop()
<0> it dont work i just get a bunch of syntax errors :(
<1> well, post the error msg
<0> okai i gotta run debugger 1 sec
<0> Traceback (most recent call last):
<0> File "C:\Program Files\ActiveState Komodo 3.5\lib\support\dbgp\pythonlib\dbgp\client.py", line 1806, in runMain
<0> self.dbg.runfile(debug_args[0], debug_args)
<0> File "C:\Program Files\ActiveState Komodo 3.5\lib\support\dbgp\pythonlib\dbgp\client.py", line 1529, in runfile
<0> h_execfile(file, args, module=main, tracer=self)
<0> File "C:\Program Files\ActiveState Komodo 3.5\lib\support\dbgp\pythonlib\dbgp\client.py", line 590, in __init__



<0> execfile(file, globals, locals)
<0> File "C:\myprograms\my chat thingee\chat.py", line 35
<0> file.close() and: import Tkinter
<0> ^
<0> SyntaxError: invalid syntax
<1> oh , i didn't mean you had to copy paste
<2> please don't spam the channel.
<0> i wasnt trying 2 jerub
<1> use the pastebin
<2> kevinish: in future, go to a pastebin like rafb.net/paste or deadbeefbabe.org/paste and paste the error there. then give us the url.
<0> k
<1> and the code wasn't supposed to be copy-pasted too
<0> okai
<0> sorry
<0> fixed it :)
<1> now does it work??
<0> yep sort of
<0> give me a minute
<3> bbl
<0> k im gonna post my error in a second...
<0> http://rafb.net/paste/results/3UrZCV42.html
<4> mariodemon_11: the parser should be giving you unicode strings if necessary already
<5> kevinish: whats the problem?
<0> im trying to open a text file into a window
<0> but i get that error
<5> kevinish: paste the significant code
<0> okai
<1> you should give the function open a string
<1> like open("inbox.txt")
<0> http://rafb.net/paste/results/N8JBLl89.html
<1> kevinish: did you read the python tutorial?
<5> kevinish: yes, quote
<0> yes i did
<5> kelvie_: strings, anything not defined in python as an object should be quoted
<5> inbox.txt is a file, not a python object
<5> object/whatever you call it
<5> reference
<0> i know i just noticed it wasnt wouted and changed that
<1> now it works, doesn't it?
<0> kay well im gonna try and figure this out myself
<5> kevinish: if you want to learn python well, read the tutorial, then Dive Into Python (excellent)
<0> cuz im gettin another errorr :(
<1> hold on
<1> kevinish: just paste all the code
<0> lol okai
<1> anyway, the parser is not giving me unicode strings
<0> http://rafb.net/paste/results/ikrhbP61.html
<0> sorry for being a bother mario
<1> don't worry
<1> you should't use ";"
<6> Hello, I'm trying to write a module to sort through the command line arguments given to a program and return appropriate values. I'm hung up, though, on writing a clean regex. I want to do something similar to ^-(x|y)+$, but match again only if it is not a character that has been previously matched. That is, I want the expression to match -x or -y or -xy, but not -xx or -yy. Thanks for any help.
<1> use another line for that
<0> okai
<1> and don't do "from Tkin...."
<1> just "import Tkinter
<0> okai
<1> that way you can use the module attributes like you are doing in "Tkinter.mainloop" etc
<7> phreq: unless you are welded to using regexps for this for some reason, it'll be much easier to do it a character at a time. Regexps are not very good at counting.
<8> g
<0> if i change from Tkinter import * to import Tkinter it doesnt work at all
<1> kevinish: you are mixing the two type of imports, now if you do it like i say you should use "button=Tkinter.Button()" etc



<6> Thanks for the advice.
<0> okai thanks
<1> np
<7> You could mine the standard getopt module for how it iterates through things and so on. (Or optparse, on recent Pythons.)
<0> i got it working :)
<0> well you got it working
<1> ;)
<6> optparse looks really handy.
<2> optparse is everyone's super happy friend.
<6> It's a nice wheel. ;)
<5> is lambda gone in 2.5?
<9> no
<10> sanmarcos: nope
<5> :)
<5> the lamb hops through the hills again!!
<11> What method can I use to get my script's full path?
<5> Cowmosher_: hold on
<7> Will sys.argv[0] do it cross-system, or does that work only in some environments?
<5> os.path.dirname(os.path.abspath(sys.argv[0]))
<5> everything in python is cross system unless specified otherwise by the docs
<5> but most stuff will run untouched or with minor changes
<5> Cowmosher_: os.path.join(os.getcwd(),os.path.basename(__file__))
<7> Yeah, but what winds up in sys.argv may vary depending on the OS environment and so on.
<5> I can ***ure you that the line I just gave you works with windows and posix
<7> Cool.
<6> Unless you want to fork().
<11> Yes, the __file__ has vanished after I turned my.py into my.exe with py2exe, thank you
<6> Windows has to be the most dev unfriendly piece of bloatware... but anyway.
<6> G'night everyone. :P
<12> Yeah
<0> hey i need help with something i'll post my code 1 sec
<0> http://rafb.net/paste/results/Mifv3m81.html okai i have it so that when you click the check msg's button it changes the window into a text box but how do i make it so it add's the text box to the same window
<0> instead of turning the window into a text box
<5> why are you using tk?
<0> y not?
<5> its ugly
<13> why*
<5> it does not look well on any os, except with TkAqua
<0> wx wont install right
<5> use gtk
<5> unless you care about macs
<0> no i dont lol
<5> pygtk is available on windows, you can make it look well, and has *tons* of docs
<12> I like wxpython
<5> besides, you can use Glade to design the GUi
<0> wxpython wont install for me
<12> wxglade is very good
<0> no wx installs
<0> so im stuff without
<5> I dont see the point of wx if you are not doing cross platform
<0> stuck**
<12> are you in Linux?
<5> once gtk is native on os x..
<2> I always used xrced for wx editing
<0> im on windows
<12> Yes sanmarcos, thats the advantage of wxpython
<5> mundohosting: its just a layer to the api
<5> I like the GTK api just fine
<5> i dont see the need for a whole other library
<0> it wont work :'(
<12> could you use GTK in Windows as easily as wxpython?
<12> wxpython is wxwidgets
<5> gtk/pygtk is available in windows
<5> and it works without changing anything
<0> can anyone help with my origanal question?
<12> Maybe I'll try it. Till now I've only worked with wxpython
<12> thanks for the info sanmarcos
<5> or you could just use windows forms
<5> or whatever they call that
<0> http://rafb.net/paste/results/Mifv3m81.html
<12> never heard of that
<12> I develop on Linux
<14> hi, kind of a noob q but could someone tell me how I can do something as simple as connect to an ftp server and send a file?
<14> thanks in advance


Name:

Comments:

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






Return to #python
or
Go to some related logs:

VMWare tools+Debian Sarge
hp1020 linux dapper
debian transition package meaning
SELECT * WHERE IN
xf86MapVidMem: Could not mmap framebuffer (Cannot allocate memory)
php session never expire
viewsonic g90s
intel_drv suse
Bitornado GUI
#centos



Home  |  disclaimer  |  contact  |  submit quotes