Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
50% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
0 Endorsements
~27.3K People Reached
Favorite Forums
Favorite Tags
Member Avatar for sys73r

I'm working with a LIST that am getting from a soup which after the clean up gives me: lists of variable length ['7.0', '7.5', '6.8', '6.9'] or ['7.0', '7.5'] so my problem is when I try formating the output: code snippet: if grades: print '\r\n["' + str(student[0]), if len(grades) == …

Member Avatar for David W
0
391
Member Avatar for sys73r

[CODE]import urllib2 from BeautifulSoup import BeautifulSoup data = urllib2.urlopen('http://www.NotAvalidURL.com').read() soup = BeautifulSoup(data) table = soup("tr", {'class' : 'index_table_in' }) print table[0][/CODE] the result is: <tr id="index_table_12345" class="index_table_in"> <td><a href="/info/12345">string 1</a></td> <td><a href="/info/12345">string 2</a></td> <td><a href="/info/12345">string 3</a></td> <td><a href="/info/12345">string 4</a></td> <!--td></td--> </tr> *the goal is to get only the strings and …

Member Avatar for sys73r
0
24K
Member Avatar for sys73r

input.csv 1,2,text, date, qwertyuiopasdfghjklñzxcvbnm, yhnujmik,2121212121 [code] import csv reader = csv.reader(open('input.csv', 'rb'), delimiter=',',quoting=csv.QUOTE_NONNUMERIC)) csv_out = csv.writer(open('output.csv', 'w')) for row in reader: content = row[0] + row[4] + row[5] + row[11] + row[12] + row[13] + row[16] + row[17] + row[22] csv_out.writerow( content ) [/code] # I want it to save …

Member Avatar for sys73r
0
183
Member Avatar for sys73r

[CODE]from tkinter import * def handler(event): print("Clicked at", event.x, event.y) class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.grid() for r in range(6): self.master.rowconfigure(r, weight=100) #Creating custom buttons self.master.columnconfigure(0, weight=100) Button(master, text="Red",command=self.colorit).grid(row=6,column=0,sticky=E+W) self.master.columnconfigure(1, weight=100) Button(master, text="Blue").grid(row=6,column=1,sticky=E+W) self.master.columnconfigure(2, weight=100) Button(master, text="Green").grid(row=6,column=2,sticky=E+W) self.master.columnconfigure(3, weight=100) Button(master, text="Black").grid(row=6,column=3,sticky=E+W) self.master.columnconfigure(4, weight=100) Button(master, text="Open", command=self.hanlderf).grid(row=6,column=4,sticky=E+W) Frame1 = …

Member Avatar for sys73r
0
2K
Member Avatar for sys73r

so I'm new to the language so I've trying to do a vertical bar graph as shown below without luck, so far the only thing i've managed to do is to make it horizontally like this: [CODE] *********** ******* **** ********* **** [/CODE] which i do it by for v …

Member Avatar for sys73r
0
749