| |
| |
| |
|
Page: 1 2
Comments:
<0> xihr: maxon == you ? <1> maxon is xihrbot. <0> iirc your name is max something. <0> i see. <2> hyello <2> i don't understand something about stat_result. anyone here willing to chat about it? <2> guess not. bye. <3> Hi <3> How do I unzip a file? <3> Using Python <4> didn't prolific answer your question earlier? <3> sort of <3> i still dont get it tho =( <3> what does "cl***" mean when it sez "cl*** zipfile(filename[,mode[compression]]) <5> what says that?
<3> the documentation <3> unzip.py -p 10 -z c:\testfile.zip -o c:\testoutput <3> oops <3> cl*** ZipFile( file[, mode[, compression]]) <3> that ^ <5> what documentation? <5> where? <3> 7.18.1 ZipFile Objects <3> of the python library refrence <3> in the python 2.4 documentation <5> that's weird <3> y <5> I guess they're telling you it's a cl*** <5> and how to call it <5> to create an object of that cl*** <5> it's weird because if you typed that in python it'd mean something else :p <3> yea i thought so <5> the other things are (I ***ume) methods on that cl*** <3> so what IS proper syntax <5> to call it? <3> yea <5> zipfile.ZipFile(file) <5> or zipfile.ZipFile(file, "r") <5> whatever <5> it's a function that creates an object <3> that you can read <3> hm <3> would something like this be right? (minus the fact that few functions i use actually exist) <3> zipfile.zipfule(file, "r") <3> read(zipfile) <3> open(textdocument) <3> write(textdocument, zipfile) <3> close(zipfile) <3> close(document) <3> if the zipped data was text? <5> I'm pretty sure the other things in that file are methods <5> so for example <5> f = zipfile.ZipFile(file, "r") <5> f.close() <3> yea i know i didnt do everything syntactically correct but i was just trying to give u the geist ^^ <3> *gist <3> i downloaded a program offline, and it doesnt work when i call it the way they use it in the sample X_x <3> http://rafb.net/paste/results/n6lmLW26.html <3> error on the line that sez os.mkdir(dir) <5> whoa big <3> OSError [Errno22] Invalid argument: 'C:\testout' <3> o.O <5> that's probably because \t is a tab <3> so how would i tweak it ^^;; <5> use \\ <5> that'll really be a \ in the string <3> o <3> hmm <5> or use r"C:\testout" to disable that sort of thing <3> wait i though i tried that ... <5> it's not something you have to worry about if you read the string from somewhere else <5> I dunno, it looks to me like you have a tab there :/ <3> i just tried it no dice <3> same errno and all <3> can i ask a stupid question? <5> ?
<3> can python call an .exe <5> yes <3> good <5> there are a number of functions for this to choose from :p <3> could i just call winzip in commandline <5> that number is greater than you might hope <5> I should make some sort of chart to decide which one is needed <3> im just trying to make a simple extract and execute program idk why i always run into problems no matter how simplistic the program is <5> come to think of it <5> can you make a directory called c:\testout? <3> wat <5> can you do it? <5> is it even possible? <3> me? huh? <5> yes <3> like do i have priveleges? <5> yes <3> yea of course im an admin <3> ohh thats a directory omg <3> ... <5> what? <3> still doenst work <5> what's the error? <3> un.extract(r"C:\testfile.zip", "C:\") <3> <3> SyntaxError: EOL while scanning single-quoted string <3> ignore the bad character <5> ... <3> hm uh <3> wtf? <5> \" is a literal " <5> it doesn't close your string <3> oh brother <5> it puts a " in your string <3> un.extract(r"C:\testfile.zip", "C:\") <3> <3> SyntaxError: EOL while scanning single-quoted string <3> oops <3> un.extract(r'C:\filename.zip', 'C:\ ') <5> this might be why other systems use a forward / :p <3> IOError: [Errno 2] No such file or directory: 'C:\\ \\BOLI30cvrmem&execsumm.DOC' <5> use \\ <3> that garbage ^ is my filename <5> to put in a \ <3> oh ok <5> or just do "C:" maybe <3> w00t i think it worrked !!!!! <5> good, now I don't have to tell you about calling programs <3> huh <3> i didnt get any error, but i also didnt get any file <3> o.O much <3> oh haha <3> it extracted to my python directory <3> thats kinda odd <3> whyd it do dthat <5> I don't know, I didn't bother to understand your program :p <3> oh nvm got it <3> yay <6> Hi all. I have a question regarding python and 'network neighborhood' in python. <6> I would like to know how I can scan and then access the network for windows clients and their shares. <7> i want to redirect the output of a python script to a text file, but "script.py > file.txt" is not working <7> do i need to redirect the output or something? <3> is TKinter easy? <8> MercuryTW, yes <1> Djervsinn: The output is indeed redirected already, but there are two output streams, stdout and stderr. <1> Djervsinn: "./pyscript.py > output.txt 2>&1" should do the trick. <4> what does that do hund ? <4> the 2>&1 <9> redirects stderr back to stdout <4> ah, ok thanks <10> whats the difference between stderr and stdout <10> 1>filename Redirect stdout to file "filename" <10> 2>&1
Return to
#python or Go to some related
logs:
#fedora #beginner #politics #politics #delphi #allnitecafe #nhl #computers #stocks #nhl
|
|