No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
19 Posted Topics
Hey guys, i just re-installed python and began writing a script, when i go to run it a syntax error appears. The syntax error allways points to the quotes i use, meaning something like [CODE]print "Hello"[/CODE] a syntax error will appear and point at the end quote ' " ' … | |
Hey guys, [CODE]import sgmllib class MyParser(sgmllib.SGMLParser): def parse(self, s): "Parse the given string 's'." self.feed(s) self.close() def __init__(self, verbose=0): sgmllib.SGMLParser.__init__(self, verbose) self.hyperlinks = [] def start_a(self, attributes): for name, value in attributes: if name == "href": self.hyperlinks.append(value) self.newhyperlinks.append(name) def get_hyperlinks(self): return self.hyperlinks import urllib, sgmllib f = urllib.urlopen("http://www.python.org") s = … | |
Hey guys, i'm having some trouble using wget. What i'm trying do is log into a site, once its logged is to go to a certain link. And once it is there download all the files on the page, but check back later to see if any new ones are … | |
Hey guys, recently i started with socket programming in python and still doing it. And i decided to do a project, its a text based GUI with different options that are related to Networks, but ive had trouble with it looping back to the menu which the input is represented … | |
Re: Well basically you have a class called fruitcake, and (object) is the varible you defined. So object may be like this: [CODE]object = rectangle(100,45)[/CODE] that you defined at the beginning of the program. So you use that varible "object" in the class. Here's an example of a class using Shape: … | |
Hey guys again, but i got another question. With this code here: [CODE]if choice == 'help' or '/help': print "Test"[/CODE] what if you entered anything else besides '/help' or 'help' and you have defined other things in the code you want to go to from input? any ideas/suggestions, Thanks | |
Re: Well, i don't see any source code to look at or edit when i downloaded it and opened it up with Winrar. But thats reverse engineering, and i suggest you learn some python to assess the glitches in the program and understand the code and how to fix it. Tondeuse. | |
Hi guys, i'm new to sockets and find it pretty fun. But i got a question, in my code here: [CODE]import sys, socket import socket, sys dest = ('<broadcast>', 51423) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) s.sendto("Hi", dest) print "Looking for replies; press Ctrl-C to … | |
Hey guys, i got another question. say if you want to only write a few lines of code that can be called on at any time the while the script is running, i'm assuming its the pickle function or something similar to batch like the goto function? Thanks | |
Hey guys, lately i've been having some trouble with file I/O but usually i don't heres an example of reading a file: [CODE]print "\nReading..." myfile = open('myfile.txt', 'r').read() print "\n",myfile[/CODE] but is there and easier way to do that because when i try to run the program just stops, it … | |
Hey guys, I've came across problem and wondering say if you have a 2 lists called user_list and pass_list and you have a prompt for username and password. Instead of 1 user name and password how could it be for all can be used at the same prompt? heres an … | |
Is there a function out their in python that you will declare a target i.e. a text box on another open window, and it would print text to that screen? Thanks | |
Hey guys, I've started using Tkinter now and I've came across a problem...Here in the code below i just want a drop box style menu to appear and when i click that option, theres more options. When i click for example their would be a box called Addition, you would … | |
Hey guys, is it possible to simulate a mouse click using x and y co-ordinates. And also could you have user input of a certain co-ordinate and it would click that specified co-ordinate? thanks. | |
Re: Here you go jascase i fixed the problem, i'm not good at explaining things but in the line of the code that didn't work where you asked for input for the 2 numbers. [CODE]number=int(raw_input("what do u wanna add"))[/CODE] [CODE]number2=int(raw_input("number 2 please"))[/CODE] you just needed to add this to the end: … | |
Hey guys, i have done C++ before but gave up on it :P. But i've came back to it and i'm wondering what is a good way to simulate a left and right click? i guess you would start with this: [CODE]#include <iostream> #include <windows.h> using namespace std; int main … | |
Hey guys again, well i got another question. When ever i have an if statement asking for input and i try to use an elif statement and run the code, it say's 'elif' is an syntax error. Is it an indention problem or something else? Thanks [CODE]print "1) Play" if … | |
Hey guys....I've been doing Python for probably more than 4 months and i have gotten to the point saying to myself "What should i make?" and "How would i do that?" i just don't know where to go know and what to do. I am capable in many things in … | |
Hey guys i'm new here, but i got the basics of python down and i'm having some problems with my code. All i want to do is be able to type in something and have it saved as a txt file, i have tryed numerous things and when i ran … |
The End.