| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8
Comments:
<0> No, Im new to python and im just installing it locally to learn <1> Did the script tell you where it was installing the files? <2> AICkieran, if python setup.py install didn't bork, then it's probably a path issue <0> i cd to cherrypy directory, python setup.py install and when i try use it it errors on the lines "import cherrypy" and "cherrypy.server.start(). It worked a few times, then just stopped working alltogether. <0> So i tried reinstalling, and nothing <0> Noah, yes it gave me the paths. <1> in the python console can you import cherrypy? <0> Yeup, no errors there <1> Okay, so it's installed <1> You are using it wrong if you are getting errors <0> Im following the examples exactly. <1> Where are the errors generated from? <1> A command line script? <1> The console? <1> A web browser? <1> Your going to have to be a little more descriptive
<0> Command line, When i try to use the text file. <1> "the text file" is a little vague <0> I write the script in a text file. save as .py and cd then python mytextfile.py <1> Okay, so your handwritten script is generating errors <1> What is the error? <3> Is there a way to determine the number of references there are to an object? <1> Yes <1> :) <1> import gc <0> Traceback (most recent call last): <0> File "helloworld.py", line 1, in ? <0> import cherrypy <0> File "/Users/kieran/Desktop/cherrypy.py", line 24, in ? <0> cherrypy.server.start() <0> AttributeError: 'module' object has no attribute 'server' <1> try changing your "import cherrypy" to "from cherrypy import cherrypy" <1> But that's just a guess <1> Otherwise.... try "help(cherrypy)" <4> AICkieran: your cherrypy installation is somewhat broken. <3> noahslater, thanks. <1> np <0> Lol. blackdroid_wd i see that, but ive tried reinstalling <0> help(cherrypy) :: NameError: name 'cherrypy' is not defined <5> Yango_: all right :) I guess I'll just look into Lucene. Anyone know how PyLucene compares to the original java version? <0> ah nvm <0> fixed that <0> i get to the help <0> ok one last re-install :( <6> How do i test if theres more then one element in an array? <6> http://digigen.nl/~Industrial/code/python/ircbot/Ircconnection.py <6> line 55 <7> if len(my_array) > 1, or if my_array[1:]: do_something() <6> ah right <6> typo :> <6> Just a makeup question on the bot. Should I put the part where it checks for PING events in the Ircconnection.receive() or in the Ircconnection.msg_in() ? <6> (Or somewhere else, tips not about frameworks and libraries are welcome) <8> Does Python have some kinda module for chunked encoding decoding? <9> What encoding do you need? <8> chunked <10> elver: you might check out the struct module <8> as in chunked encoding that is used in http <9> Ah <9> That was a missing piece <8> so there is no such module? <9> elver: not as such <9> but various web app frameworks may support it <6> Hmm, maybe I should make the keepalive in the bot cl*** I'm going to make now. <9> elver: unless you mean client-side <9> elver: the Python urllib and urllib2 libraries support reading chunked-encoded streams, IIRC <11> elver: perhaps investigate the httplib, urllib, and urllib2 modules. betweem them, i would thing chunked decoding is supported somewhere <11> mj :) <11> httplib.HTTPResponse._read_chunked seems to have an implementation <12> some brazillian? <9> dw: httplib does chunked reading <9> dw: but that ain't hard <9> read the header 'transfer encoding' <9> and read chunk sizes, then read as much as the chunk size tells ya. <9> Easy does it <13> hey... I'm trying to solve a problem with python now for 3hours and i cant solve it :D here is what i get! http://deadbeefbabe.org/paste/104 <9> Outputting chunked encoding isn't exactly hard either <9> so I doubt anyone would bother creating a special-purpose module for it
<13> Can anyone help me ? <14> primox could you post the code? <7> darkgreen: he did, http://deadbeefbabe.org/paste/104 <15> primox: are you trying to import os.path ? <10> lscd: that doesn't look like code to me <16> brb <7> qwe: ah..... erm..... yeah. way too tired. it's just a traceback <13> LinuxJones ... i can "import os" <13> darkgreen i goes for torrentflux <17> primox, it looks like a python install problem: Could not find platform independent libraries <13> written in python, but it's very intresting that if i run script as normal user it runs... but if i do the same as user www like it should run i get that error <13> http://deadbeefbabe.org/paste/104 <13> look down of EDIT mark :D <17> so you need to isolate the differences between the two environments <13> yes but how ?:D <17> PATH would be a good place to start: echo $PATH <17> and then sudo -u www echo $PATH <13> :D hjuh :D how many envs ? :D <17> also the file permissions for wherever your python libraries are installed (probably /usr/lib/python2.X) <17> also run the failing example with the -v switch to python and it'll tell you why it couldn't do the import <6> http://pastebin.com/622026 <6> See Ircbot.addServer() <13> benji i set chown -R prix:www /usr/local/lib/psython2.4 <13> and :D it works... :D it should :d <17> ok, so you have a permissions problem <13> :D <13> yes it does :D <13> thanks :* <17> glad to help <6> benji: got time for my question? Or at least to tell ym if i am goin in the right direction? <6> s/ym/me/ <17> what's the question, id`? <6> its in the pastebin <6> at Ircbot.addServer() http://pastebin.com/622026 <18> how does on get the name of the function one is in? def foo(): print this_functions.__name__ <19> hi all <18> hi ShortWave <19> Is there in existence anywhere a TIFF image loader OTHER THAN Python imaging library? <14> pytiff: http://www.haynold.com/software_projects/2004/pytiff/pytiff.html - I havn't used it though... <19> Spiffy, so then it would up to me to figure out how to display such an image <17> def foo(): <17> import inspect <17> print inspect.stack()[0][3] <17> grr, a bit too much whitespace, but redir, there's a hacky way to do it <18> benji, Thanks <17> id`, I don't really understand the quesion, and have to go in a minute, sorry <20> redir: hmm, why do you need to do this? <17> redir, if you /really/ need something like that, I suspect there's a better way <20> redir: You already know the function's name. <20> You named it <18> steg, I don't really I am just pondering the orthagonal persistence of python <20> redir: it's sort of like asking "how do I know the variable x's name"? <20> you do. The name is x. :P <10> if you're in a dynamically-generated function that information *could* be helpful <10> but whatever <10> :P <20> qwe: no it couldn't :P <20> qwe: If you've created a dynamically created function, you must know the function name at the time you create it (in order to create it) <20> hence you can also insert it in-line <18> If I became func x from fun foo() by ***ignment how can I know my original function name? <21> Are we allowed to ask questions in here? <22> hell no <17> you just did, Ariadoss <22> this is just an idling chanel <22> isn't it benji <21> haha, idling isn't fun :P <22> you are not allowed to question. only state <21> "#python is a place for Python developers to help people write better programs. Usually, this is done by listening to people describe the problem they're working on and asking questions to clarify the situation before recommending solutions." <20> redir: You can't. Full stop. <22> stearns dude. we're idling <22> steg* <18> aha
Return to
#python or Go to some related
logs:
#oe #perl #centos ubuntu apt-get connection refused 111 Graffiti FontsT 3.0 qemu freeze focus versioning file system* xp OR windows xorg.conf Ati Radeon Gentoo RV530 X1600 #mysql string replace by index
|
|