| |
| |
| |
|
Page: 1 2
Comments:
<0> nope <1> afternoon folks <1> Does anyone know of a way to convert a string like 'Jan 16 12:00 2006' into unix time? <1> i suppose i could do a lot of string parsing and convert it to localtime, and then use that <1> i was hopign there might already be a faster way though <0> time module <1> ah! strptime(), great thank you <2> quick question: I have a script in use for inserting data in to a web page, that scripts call another script wich intern returns data if run in a shell, if the page is brought up the msg I recieve is "sh: weather.py: not found", any help? <2> I use commands.getoutput() for the second script <3> yea, the script can't find weather.py, or the python interpreter.. check the bang line <3> ie, what do you have as the first line of weather.py (#!/usr/local/bin/python) <2> #!/usr/local/bin/python is in both <3> are they in the same directory? <2> yea, got it, it did work if I gave the full path <3> ok, good <2> thnx
<3> np <2> btw where can I find some info on parsing lines, I recall some display.py for webpages but can't recall the location <3> what do you mean by parsing lines? I've never heard of display.py <2> well I want to look thru an html and insert data at certain insertion points, the only scheme I have right now is dump the file into a list, look for per say a <!-- Insert Data-->, change the data in the list then output, if there is anything else on that line my script won't find it tho, need a better serach and replace essentially in my script <3> What you are looking for is a template engine then, yes? <2> yea <3> there are plenty of those available <3> I have used Cheetah and PSP myself <0> EmPy is another one <2> k, I'll have to rip it apart, I'm trying to learn the language more instaed of just plugging in stuff, but other code is always good to look at <4> hello <4> do any of you have experience running python from a buzi card distro like feather or DSL? <4> im having some trouble installing .py <4> does the symbol "|" in bzcat Python-2.4.2.tar.bz2 | tar -xf - mean or? <5> don't you remember.. we built this city on rock and roll <4> yah <4> ok i extracted all and ran ./configure <4> can someone tell me where i can find "make" and "make install"? <4> any help here? <4> pls <6> if you aren't sure of what you are doing, maybe see if there is a prebuilt install kit for your "o/s and version" <6> else presuming you are on some sort of *nix; make may be installed try entering: make <4> yah <4> i tried that <4> its linux <4> i found out the problem <4> kinda <4> there still isnt a file called "make" or "make install" <7> there isn't supposed to be <7> there's supposed to be a file called Makefile <7> you should have make on your computer <4> oh? <4> root@box: make ????? then what ? <0> you really need to get a tutorial on Unix or something, you're constantly asking basic Unix questions that have nothing to do with Python <4> i got it <4> im not constantly <4> your constantly trying to be a leet....ive never heard you answer a single ? just criticism <4> thanks <0> haha <0> riiight <0> I NEVER help people <0> you're right that I rarely help YOU because you almost never ask PYTHON questions, and this is #python <4> no..you told me to buy a book on python <4> thats why my handle istantly annoys you <4> about a month ago <0> you've come in here dozens of times <4> yah <4> not recently though <0> you've asked a total of about two Python questions, the rest were all non-Python questions <0> like the question you're asking right now <4> thats not true man <0> uh huh <4> you said my ?s where to elementary and im not going to learn .py in a day so go read <4> now im installing .py on my own system so i can learn more <4> thanks for your help <0> your question ISN'T ABOUT PYTHON <4> installing it isnt a ? about python? <0> like almost all of them never are <4> ok <0> your question is how to run make <0> do you not understand that would apply to ANY program? so it has nothing to do with Python
<4> dude...its on the python.org website...and its real general <0> are you really not capable of understanding that? <0> yes, your question is real general <4> no the instructions on installing it <0> the instructions are to run make <0> just like any other Unix package <0> look <4> yah <0> you can keep asking your elementary questions, or you can actually get a tutorial on Unix/Linux and LEARN SOMETHING <0> otherwise your elementary questions will never end <4> and you will have wasted all that time explaining that to me <4> as if i didnt understand what you were saying <0> yes <0> helping you would be a waste of time <4> i do understand <0> first thing you've said I agree with <4> why you wanna spend so much time trying to cut me down then just hit ignore? <0> because you're annoying as hell <0> go to #linuxhelp <0> better yet, why don't you to freenode's #python, I'm sure they'd love you there <4> im in linux-noob <4> and dsl <4> but thanks for the suggestion <8> how do I set a variable to be an integer? <0> variables don't have types in Python <0> objects do <0> are you asking how to convert a string to an int? <8> no <8> but error keeps saying unsupported operand type for -: 'str' and 'str' <0> that means you're subtracting a string from a string, which doesn't make sense <8> I'm trying to subtract two variables <0> so presumably you want to convert them to integers and then subtract them <8> ok, but I'd rather they start out as integers <0> wherever you get them from, they're not integers <8> oh <0> as I said, variables don't have types in Python <0> if you want to store them as integers, then you need to convert them: int('123') <8> so if my variable is called 'wate' I use int('wate') ? <0> no, 'wate' is a string <0> wate is a variable <0> y = int(x) <8> so if my variable is called wate I use int('wate') ? <0> I just said, no <0> int('wate') tries to convert the string 'wate' to an integer, which doesn't work <0> newWate = int(wate) <8> and then newWate is a number? <8> not a string <0> yes <8> ok, i think i understand <8> thanx <0> you might want to read the tutorial <8> where <0> python.org <8> how do I change a string that was imputted by the user into a number? <8> can sum1 help me? <9> with? <8> I'm trying to subtract variables that I got using raw_input and the int function doesn't seem to work <8> is this right? <8> rise = raw_input() <8> int(rise) <9> well, should be ok <8> then I say <8> ri2 = rise + 1 <8> and I get typeError <9> well, rise is still a string <9> int(x) returns an int, it doesn't modify x <9> if you want to convert rise to an int: rise = int(rise) <8> thanks <8> once I do that, can I print rise along with other words? <8> oh. oops, never mind <8> is there a function to change a string to a float? <10> float() <8> thanks <10> You're welcome.
Return to
#python or Go to some related
logs:
#gentoo #politics cricky allnitecafe #ubuntu #flash umpa lumpa I got another puzzle for you
#gentoo #firebird #unixhelp Klose's fart
|
|