@# Quotes DB     useful, funny, interesting





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


Comments:

<0> greetings
<0> krs1
<1> Hi. Im trying to replace a character in a string, like in c, buf[0]='r', i tried buf[0:1]=buf[2:1] but it gives me the error 'TypeError: object doesn't support slice ***ignment'
<2> yes, strings are immutable
<3> what's the thinking behind making strings immutable?
<2> same as in other languages, makes concurrency a lot more straightforward
<3> ah



<4> This is insane, I changed one option in SPE and the preferences menu no longer loads. I've uninstalled everything python related, ran through the registry, reinstalled everything and I'm still getting the same error. Does anyone know were spe might store more information?
<4> loosing my mind
<5> What is SPE?
<4> stani's python editor
<2> never heard of it
<2> try contacting the author
<4> do you have any recommendation on another editor, I've had it with this one
<4> waste of time :P
<6> nick nanoit
<6> wops
<7> hi guys. can i ask a question about python programming here?
<8> Special Powers Edition
<9> hmm my code seems to crash python
<9> at least, the crash is at the level of the python interpreter
<9> so i can run python inside gdb, but how do i knw what code it is executing when it crashes?
<9> veel nederlanders hier :P
<9> fortunately python runs cleanly through valgrind *ahem*
<10> I'm making a small chat client for a game in python and want it to be able to load modules, can I just use import for other python files?
<11> yes
<12> anyone using mechanize to handle automated web page interaction via python?
<13> define "automated web page interaction"
<13> are you talking about dynamic websites ?
<12> We're building some load testing scripts, so we need some form interaction and such from python to a pre-estrablished (and running) web app
<12> mechanize has their Browser object which puts pages into an object format that lets you get to forms and fill in data, then post back to the page.
<14> hi
<12> yo
<12> so if I have a .py file sitting in /site-pacakages/foo/ is there a way to make my import statement look in there for it? If I drag the .py file up one level, it works fine, but I thought subdirectories were also parsed.



<14> EyePulp: from foo import mymodule
<15> hello
<15> if i want to find a regular expression in a file, i might f = open(...), re.compile(...), and then re.match( f.read() ) yes?
<15> unfortunately even though f.read() produces a nice string of my file, my regular expression fails. when i use a string entered in the python code, it works.
<15> i will post a code example
<12> thx homeo
<15> could someone just explain why this does not work? http://rafb.net/paste/results/dYYjq854.html
<14> henryb First off, its a terrible idea to name variables 'str' because that is the name of the String type
<14> and secondly, that will only match the string 'oboe'. You need to make it greedy to match other characters that come before/after it, '.*oboe.*' would work
<12> is there a pythonic way to check for a value (foo) being between two other numeric values? or is if foo < x and foo > y: the simplest way?
<14> maybe foo in range(x,y) ?
<12> maybe... I'll test.
<14> but thats x <= foo < y
<12> is it?
<12> hrm
<14> foo not in range(x,y) might work though
<12> to see if foo is *in* the range? that seems counter-intuitive. =)
<12> if not foo not in range(x,y): =)
<14> you're saying if foo < x and foo > y
<14> that means you're saying, if foo is not in the range of x,y
<14> less than x, greater than y, but not in between
<15> homeo, thanks about 'str', also i think 'search' is what i was looking for
<12> tikal - like the ruins?
<12> is there a simple way to grab the IP address of the machine that a script is executing on?
<16> is this a beginner-channel? only for not-insult poeple here
<14> EyePulp http://python.org/doc/2.4.2/lib/module-socket.html
<12> thx homeo
<17> http://raphael.slinckx.net/blog/
<17> anyone seen this?
<18> yes
<17> good collection of the most common quirks I've run across in Python.


Name:

Comments:

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






Return to #python
or
Go to some related logs:

python xihr
#politics
royal-poodle
bottleguy virus
#hardware
#computers
dancingwigger
Pornpasses cracked
dds3 tape downwards compatible
#windowsxp



Home  |  disclaimer  |  contact  |  submit quotes