- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Hello, Please i need help with python 2.7 i use "from string import Template" and there error with Unicode if i print the string without Template working good and if i print it under Template appear error ""AH01215: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 8: ordinal not … |
|
Hello, I want help in scrapy i want scrap this page full source code as Inspect Element mode https://www.contechlighting.com/en/products/recessed-lighting/led when i use this code import scrapy class TEST(scrapy.Spider): name = "quotes" start_urls = [ 'https://www.contechlighting.com/en/products/recessed-lighting/led#t=Products&sort=%40wcs_site_tree_rank ascending&layout=card', ] def parse(self, response): filename = 'contechlighting.html' with open(filename, 'wb') as f: f.write(response.body) get … |
|
Hello, I created html file with Checkbox and i use python when i check one box and submit i have problem with list when i check 2 box or more and submit i see the result list like ['120', '104', '12'] i can use "for" to loop the list and … |
|
Hello, I want help in python for checkbox form i use this html code <input name="do" type="checkbox" value="file1" /> <input name="do" type="checkbox" value="file2" /> <input name="do" type="checkbox" value="file3" /> <input name="do" type="checkbox" value="file4" /> ----------- and after submet for i in query.getvalue("do"): print "_%s_<br>" %(i) when i check more than … |
|
Hello, i want ask somthing about mysql in multi pages i hope someone help me and sorry about my English this code works good but there problem if i used it with this tybe sql = "SELECT * FROM emaillogs ORDER BY id DESC" cursor.execute(sql) results = cursor.fetchall() if page … |
|
Hello, I have problem with arithmetic in python when use it like this code [CODE]#!/usr/bin/python AA = open("a.txt").readline() print AA BB = 100 print BB + AA[/CODE] Appear to me this error : Traceback (most recent call last): File "aa.py", line 6, in ? print BB + AA TypeError: unsupported … |
|
Hello, I want know how to find some of words in a file. For example : find one word [CODE]if "word" in open(file).read(): print file[/CODE] I wand do that but with 5 words [ word1 , word2 , word3 , word4 , word5 ] If find word1 or word2 or … |
|
Hello, I want ask something about Python CGI How can i use python on web application to run commands on the server For example : like in php when you will use "exec" function #!/usr/bin/python import os print "Content-Type: text/html\n" os.mkdir("/root/folder") print "done" this simple script working good if you … |
|
Hello, I have file name is file.txt inside it this lines line1=hello world line2=hello web line3=hello egy I want print full lines start with line2= like in linux command cat file.txt | grep "line2=" this code will print full line --> line2=hello web And if any one have books in … |
|
Hello, I want do somthing in python equal this code in bash For example the file.txt in it "dani_web_the_best" and want print "web" cat file.txt | cut -d"_" -f2 What equal cut -d"_" -f2 in python ? |