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

15 Posted Topics

Member Avatar for bumsfeld

[url]http://docs.python.org/library/stdtypes.html#typesmapping[/url] Shows you the most common ways. zzzzz... lol thread necro.

Member Avatar for Umar Suleman
3
410
Member Avatar for Enders_Game

Pretty self explanatory code. Why doesn't it work! #include <stdio.h> int main() { __asm__("number dw 0"); // declare number? printf("%d",number); __asm__("mov %eax,number" "inc %eax" "mov number,%eax"); printf("%d",number); return 0; } cc ex1.c -o ex1 ex1.c: In function ‘main’: ex1.c:22:17: error: ‘number’ undeclared (first use in this function) ex1.c:22:17: note: each …

Member Avatar for Enders_Game
0
289
Member Avatar for Python_nooby

I don't think I understand what you want to do. If you just want to talk to a usb device theres pyusb. [url]http://sourceforge.net/apps/mediawiki/pyusb/index.php?title=Main_Page[/url]

Member Avatar for richieking
0
494
Member Avatar for jordan0420

That should've worked. I don't know why it wouldn't. Try adding changing background colour see if it shows up then. [CODE]btncancel = Tkinter.Button(addboard, text = "Cancel", command = addboard.destroy, bg = "red")[/CODE] Another way of doing it is next time you post some code, highlight all of said code and …

Member Avatar for jordan0420
0
6K
Member Avatar for tcl76

Unless there is going to be the same amount of lines every time in the data files I would use regular expressions Heres a way that just works (note that its probably not the best way to write it :P, im not very used to re's yet). What it does …

Member Avatar for tcl76
0
5K
Member Avatar for rssk

Are all the values seperated by spaces? If so then look into the .split() function. It splits a string by the inputed paramter. E.G. to split a string by spaces you would put x = stringname.split(" ") This will make an array with x[0] = 99 x[1] = root ... …

Member Avatar for snippsat
0
193
Member Avatar for Thropian

While we're obfuscating [CODE]import re string = "hello world" first = re.match("(.)", string).group(1) print(first) [/CODE]

Member Avatar for Thropian
0
282
Member Avatar for Enders_Game

If I have example code: [CODE]url = "someurl" values = {"username" : USERNAME, "password" : PASSWORD} data = urllib.parse.urlencode(values) req = urllib.request.Request(url, data) urllib.request.urlopen(req)[/CODE] it passes username and password to the url that you request. So I want to post a thread in a forum. When I look at the …

Member Avatar for snippsat
0
224
Member Avatar for Enders_Game

I have a class with a button, it runs the command automatically when the gui is constructed (which i dont want it to do) but then doesnt work again after. What am I doing wrong? Builtin commands such as endcommand work as they should. relevant excerpts (ignore the indent problem …

0
105
Member Avatar for Enders_Game

hypothetical say i have [code] for i in range(20): for j in range(20): for k in range(20): [/code] How could I != all fo them without writing 20 statements i !=j !=k doesnt work obviously (I have to compare 5 words so writing a seperate for each combination would take …

Member Avatar for Gribouillis
0
89
Member Avatar for sss33

read file [url]http://docs.python.org/py3k/tutorial/inputoutput.html#reading-and-writing-files[/url] hint: readline() would work better than read() parse strings [url]http://docs.python.org/py3k/library/stdtypes.html#string-methods[/url] hint: check out split() basic math to get score. If you need help with the math too, then just ask :/ output. (same as input file except you use .writeline())

Member Avatar for vegaseat
0
136
Member Avatar for KrazyKitsune

one way is to return it e.g. [CODE] def func(): variable = 3 return variable x = func() print(x) [/CODE] In this example, you call the function func() it does stuff and returns variable. variable is assigned to x.

Member Avatar for Enders_Game
0
148
Member Avatar for Enders_Game

So I'm trying to make a parser for a game replay. I just need help getting started, I have docs for it explaining. Atm I'm just trying to get the header parsed. [code] replay = open(r'C:\Users\CookieMonster\Desktop\mix.w3g', 'rb') #offset | size | description print(replay.read(0x1c)) #0x0000 | 28 chars | zero terminated …

Member Avatar for griswolf
0
357
Member Avatar for Enders_Game

***Editted: added second problem I have this code, how do I make it stop once it's found the first instance of the [B]if[/B] happening. break, myparser.close(), and return don't work. [CODE]from html.parser import HTMLParser class MyHTMLParser(HTMLParser): def handle_starttag(self, tag, attrs): if tag == 'a' and (attrs[0][1].find('downloads&showfile') != -1): print(attrs[0][1]) print(attrs[1][1]) …

Member Avatar for Enders_Game
0
170
Member Avatar for Enders_Game

I'm trying to make a script that downloads from a specific website etc... it's done and everything. The problem is I need to compile it to a .exe for people to use and I noticed there isn't a py3exe to do this... So I downloaded python 2, and tried to …

Member Avatar for jcao219
0
154

The End.