225 Posted Topics
Re: You need a diferent aproach because the login page it's on php with a javascript login. | |
![]() | Re: Theres also a pyhton way of doing it, but ok, iif that serves your needs. :) |
Re: I think this should do it. [CODE]output.write('%s, %s\n' % (evidence_array[y], found[y])[/CODE] | |
Re: If I understood. [CODE]extensions = ['.txt', '.jpg', '.zip'] f_name, f_extension = os.path.splitext(filename) for extension in extensions: if f_extension == extension: do_something()[/CODE] | |
Re: Here it is. [CODE]idle.py -c whatever.py[/CODE] | |
Re: Your code will only run on linux. It looks more like a bash script then a python code. I just don't get if they are multiple files to copy and if it is to copy every day or id it only 15 of all the backups that there exist. | |
Re: One of the problems is here: [CODE]b1 = Button(app, text = "Correct!", width = 10, command = play_correct_sound) b1.pack(side = "left", padx = 10, pady = 10) b2 = Button(app, text = "Wrong!", width = 10, command = play_correct_sound) b2.pack(side = "right", padx = 10, pady = 10) [/CODE] where … | |
Re: It works perfect here. [CODE]VList=[0,0,1,0,1,1,0,0] if VList.count(1) < 5: print('Yes') else: print('No') My output: Yes[/CODE] | |
Re: I might be wrong, but I believe with may be talking about [URL="http://docs.python.org/library/collections.html"]this[/URL]. If it is, you are a litle bit confused, since point is not a data structure, the namedtuple is the data structure you are searching for. congrats | |
Re: Like this: [CODE]for row in range(3): for col in range(4): print '0',[/CODE] | |
Re: Something like: [CODE]f_in = open('input.txt', 'r') f_out = open('output.txt', 'w') for line in f_in: if line.find('DTP') == 0: f_out.write(line)[/CODE] or [CODE]f_in = open('input.txt', 'r') f_out = open('output.txt', 'w') for line in f_in: line.replace('DTP', 'NEW_WORD') f_out.write(line)[/CODE] Sorry for the lazyness, but I'm not at home. | |
Re: The size of the balls should be: [CODE](size of the window - ((number of balls + 1) * spacing)) / number of balls [/CODE] | |
Re: I think that at least some code treeish style thingy would give some idea about your achievement. For some generic information, i believe you have plenty of scripts under the search. :) | |
Re: [URL="http://code.google.com/p/py-unrar2/source/browse/trunk/test_UnRAR2.py"]test_UnRAR2.py[/URL] If you take a look at this, it will get easier. I can tested but i think something likethis maybe. :) [CODE]for rarinfo in archive.infoiter(): if rarinfo.filename == "*.txt": # your code[/CODE] | |
Re: I liked it, I've tried some other assembly modules some time ago, and I just found them not so well going. For the architecture I'm with Tony, about the ARM also, I've been programming for symbian in the last weeks, and I would love it also to have some mobile … | |
Re: If you replace the read from the url with the html code you gave, it works just fine. Could it be something related to the talking with the server? We can test it. [CODE] matchstr = urlopen('http://192.168.0.1/stlui/user/allowance_request.html%20target=%22allowance%22').read()[/CODE] [CODE] matchstr = ''' <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head> <meta … | |
Re: I don't get your question and, what you really want to do. If it is what I think you can just check if the name of the current customer is the name of the winner and display the message. But fot it to be logic, you ahould be saving all … | |
Re: [CODE] f_input = open('input.txt', 'r') f_output = open('output.txt', 'w') for currentline in f_input: newline = currentline.replace(' ', '') f_output.write(newline) f_input.close() f_output.close()[/CODE] | |
Re: [URL="http://pys60.garage.maemo.org/doc/s60/"]Symbian module description [/URL] You can check there and come with some code questions. ;) I also program on that platform. Cheers! ;) Again... lol | |
Re: You need the symbian python modules appuifw and e32 that are in the Python for Symbian SDK. You can only run them on a emulator on your pc, or on your mobile device. | |
Re: I would read the file to a list, find the list item wanted, delete it and write the list to the file. [CODE]f = open(addressbook, 'r') file_records = f.readlines() f.close() f = open(addressbook, 'w') for item in file_records: if item != '%s %s \n' % (name, phone): f.write(item)[/CODE] Something like … | |
Re: I think that '*' is wath is causing the warning. Could we get some code. lol :) | |
Re: How about leaving the reserved name 'var' and use other name for the variable? I'm I missing something here? | |
Re: [URL="http://pys60.garage.maemo.org/doc/s60/"]Symbian module description[/URL] You can check there and come with some code questions. :) I also program on that platform. Cheers! :) | |
Re: In the documentaion you have all that. Check it. |
The End.