@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet


Comments:

<0> hello
<0> i have this string from an array
<0> property.aspx?num_rooms=1&num_guests=1&propertyid=543
<0> i would like my variable callled pid to contain the last three characters of the string
<0> how do i do that
<1> aString[-3:]
<0> tnx !
<0> soo much
<0> but some times the digits in the nd rnt 3 characters long
<0> then what do i do
<0> cant u cut "property.aspx?num_rooms=1&num_guests=1&propertyid=" out ?
<1> a quick and dirty way would be aString.split('=')[-1]
<0> ah ok



<1> but since you're just trying to parse out an xurlencoded string, you might as well use the facilities in cgi or urllib
<1> there's libraries to already do all of this for you
<0> ah didnt kno that
<0> tnx
<0> worked just fine
<0> thanxs a bunch :)
<0> ye
<2> Hello, I was wondering is there a cross platform way of embedding a swf into python
<2> i know theres the wxActivex but i cant test if its crossplatform
<3> Anyone awake?
<3> hello Prot__
<2> yeh i am
<2> was hoping i could find someone with experience of embedding swf
<3> I was wondering if you could help me out a little. I'm sure you'll sove my problem in no time
<2> nah im pretty new to python =/
<3> I'm trying to run a python script, and it complains about "You must install pycrypto and pyopenssl.". But I just did install them. But using Fink (on Mac OS X), so maybe I need to set some path-thingy or something, since these packages was installed in a non-default place.
<3> I have no clue on python...
<3> spasmFace: embedding swf in html+
<3> ?
<3> Here is the output from the Python script I'm trying to run: http://rafb.net/paste/results/znd1gi92.html
<2> no in python
<3> spasmFace: ok. I have no clue.. sorry.
<2> no worries :)
<3> spasmFace: Do you know how to solve that problem I put on the pastebin?
<2> nfi =/
<3> I installed the packages it wants. But it still bitches...
<1> the complaint is that you haven't installed Twisted
<3> twisted is installed as part of mac os x
<1> well then whatever's installed is broken
<4> Twisted is part of OSX? Oh my.
<3> isn't it just that ssl wont work?
<3> yes
<3> on mac os x server. Jabber is part of the server system. twisted too.
<3> i'm trying to get a msn-gateway for the jabber server to work
<1> well it's complaining that the contents of a module are missing, so either Twisted does something exceptionally stupid when SSL is not available (hardly implausible) or the OS X guys who put it in as part of the system screwed it up (also not exactly beyond the realm of possibility)
<3> here's a part from msn.py:
<3> # Twisted imports
<3> from twisted.internet import reactor, task
<3> from twisted.internet.defer import Deferred
<3> from twisted.internet.protocol import ClientFactory
<3> try:
<3> from twisted.internet.ssl import ClientContextFactory
<3> except ImportError:
<1> don't paste in IRC, use a pastebin
<3> sorry... got to excited..
<3> sorry sorry
<1> haha
<3> oi
<1> stop typing for a bit to give the bots a rest
<3> if you look at those from statemanets. it doesn't fail until it encouters twisted.internet.ssl
<1> yes
<1> meaning Twisted is installed improperly



<3> I don't know python. but it seems twisted is ok. it just lacks this crypto thing.
<3> ok
<1> whether that's Twisted fault or OS X's is unclear
<4> In particular, it seems Twisted doesn't want to use pyopenssl.
<3> well, I did installed pyopenssl. but in /sw
<1> well that's a pretty lousy error if that's what it is
<3> using something called Fink (which installs all kinds of linux/bsd stuff in it's own place, to not screw up mac os x's base system.)
<3> I was wondering.. maybe I can just put this crypto package in some other location?
<4> I'm no OSX expert, but maybe it's because neither Python nor Twisted are installed from Fink.
<3> maybe
<1> try fiddling with PYTHONPATH environment variable, see if you can make it find them
<1> beyond that all I can tell is that you're dealing with broken software, unclear who broke it
<3> but if I do that. don't I have to tell that python script to use the new python engine (or whatever it's called)
<1> the new what
<1> I'm talking about setting an environment variable
<3> ah.. thanks... I tried PATH. Didn't know there was a PYTHONPATH :)
<3> Pyhton is part of macosx's base system. But I can install it using Fink too. But have no idea how to switch between them after that.
<1> well I just managed to rebuild my email/imap system after a colo power failure fried a machine so it's time for me to screw off
<3> hehe
<1> well if Twisted is installed by OS X, that's really peculiar
<4> "screw off"?
<1> relax, not doing anything useful
<3> yes!
<3> I did: export PYTHONPATH=/sw/lib/python2.3/site-packages/
<3> now it stopped bitchin
<1> hmm
<3> great! thanks! :)
<1> that really should be where it looks
<1> do you have multiple versions of Python installed?
<1> i.e., you installed your stuff to version X but you're trying to run Y by accident
<3> well... osx's own python, and maybe fink's python. I have no idea. :)
<1> point is, you can fix it by just running the right version of Python, you're likely to have more problems if you you resolve it this way
<3> Fink uses /sw. Everything is installs get put into /sw. So it's easy to just get rid of it all. Instead of screwing up mac os x.
<4> And you don't risk stepping on OSX' toes while installing stuff from Fink. :)
<3> The only thing I need python for is this msn jabber gateway. I don't care how it works just as long as I get it to work. If all fails I will do "rm -rf /sw" and move on with my life :P
<3> hehehe
<3> but now it seems I'll maybe get it to work. Thanks a lot. Fink actually installed xfree and all kinds of stuff just to install this pycrypto and pyopenssl thing. I will for sure do "rm -rf /sw" once I get this working, and then try to install it in a more "clean" way afterwoods. :)
<3> I can't wait to get this working
<3> I tried a msn gateway on some other jabber server. it works like a charm. avatars and file transer too.
<5> re
<6> can anyone help me with mod python? i need to implement sessions using mod python. I tried googling for it but couldnt find any resources
<6> examples i mean
<6> anyone?
<7> aditya: hum
<7> from mod_python import Session
<7> session = Session.DbmSession(req, timeout=14200, lock=0)
<7> done.
<7> (oh, an remember session.save at the end)
<6> quit
<7> hum. !op :) where's quinx-whatever-bot ?
<8> hi all
<8> xihr, are you here?
<7> :)
<4> Rasterburn lives!
<9> yep.
<5> re
<5> got the job
<10> congrats
<10> what will you be doing?
<5> i'll be working on graphics platforms and toolkits
<11> is there a python cl*** to control a webbrowser (preferably firefox) by manipulating web interfaces though it?


Name:

Comments:

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






Return to #python
or
Go to some related logs:

#microsoft
#politics
access diver -Bot task OFF'
telmood
#windows
#politics
#red
#politics
#beginner
yourkeylogger



Home  |  disclaimer  |  contact  |  submit quotes