15,181 Topics

Member Avatar for
Member Avatar for apolo_x

Hi! I want to get information from a sports web site (ex:[url]https://www.bwin.com/pt/futebol)[/url], and I already tried htmllib and some other stuff.... the problem is that I can get the page's source code but not the same information that I can see in my browser. Particularly, I'm interested in the teams …

Member Avatar for Stefano Mtangoo
0
219
Member Avatar for tillaart36

Hello, I'm writing my code into the 'vizard python editor' and sometimes it feels a bit bugged or something, now I get an error message that my class has no attribute. I feel it has to do something with editing in vizard because in other editors I don't think i …

Member Avatar for jlm699
0
36K
Member Avatar for adam291086

I have a third party sending me some infomaion. They say to use php $_post to recieve the information as follows [CODE]<?php //include the database handling class include("mysqlclass.php"); //Assign POSTED variables $destination = $_POST['gwNumber']; $originator = $_POST['originator']; $message = $_POST['message']; $smsTime = $_POST['smsTime']; $timeZone = $_POST['timeZone']; $network = $_POST['network']; $id …

0
87
Member Avatar for Carlo Gambino

Hello, I have been using the python challenge to teach myself python as my first programming/scripting language outside of HTML. As I go along, I find that while I'm understanding the concepts rather well, I am not being as efficient as I could be. While the code I whip up …

Member Avatar for Stefano Mtangoo
0
134
Member Avatar for demeryjo

In my programming class, we need to write a program where the user is prompted for a value. Once that value is provided, the program is supposed to multiply its digits. For example: if the user typed 1234, it would multiply 1*2*3*4 and give the answer. I'm not sure how …

Member Avatar for Stefano Mtangoo
0
105
Member Avatar for besktrap

does anyone know how to shutdown a computer on windows XP (using python of course ;) given the IP address and the computer name (probably don't need it, though)? I don't want to use os commands like os.system("shutdown -i"). Thanks in advanced!

Member Avatar for mn_kthompson
0
107
Member Avatar for revenge2

Does anyone know of any good urllib tutorials other than [url]http://www.voidspace.org.uk/python/articles/urllib2.shtml#introduction[/url] & [url]http://effbot.org/librarybook/urllib.htm[/url]. Something which a little beginner friendly:| with good explanations. -Thanks

Member Avatar for mn_kthompson
0
200
Member Avatar for wheatontrue

Dear all, I am trying to create x attributes in a class, to the effect of: class classic: def __init__(self,text): r=range(text.count('TI -')) for l in r: self.l=None Unfortunately I can't iterate through for some reason. I only get self.l, not, for instance self.1 to self.107 How do I do this? …

Member Avatar for wheatontrue
0
80
Member Avatar for scru

Is there a gui library that has already been ported to python 3? I'm interested in using some of the new python 3 features in the back end for my project.

Member Avatar for Ene Uran
-1
266
Member Avatar for NarendraRoy

Write a function which starts N processes in a ring, and sends a message M times around all the processes in the ring. After the messages have been sent the processes should terminate gracefully. How do we solve in in python please help me by giving the script or logic.

Member Avatar for Murtan
0
141
Member Avatar for Stefano Mtangoo

I know of ww.portablepython.com/ Can anyone know how to do a combination of IDE and this python in stick. Also if anyone have ever tried to add other python modules to it like Vpython, wxpython, etc Thanks alot

Member Avatar for Stefano Mtangoo
0
388
Member Avatar for mmxbass

Attempting to scroll a simple background using pygame. This is proving to be near-impossible. It seems that once a surface is blitted anywhere, it WILL NOT blit into a new location. My two problem functions: [CODE] def loadMap(self): vid = _video._Video() self._bg = self._map.get_background().get_pyImage() self._fg = self._map.get_foreground().get_pyImage() vid.paint(self._bg,0,0) vid.paint(self._fg,0,0) def …

Member Avatar for mmxbass
0
110
Member Avatar for tondeuse34

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 = …

Member Avatar for scru
0
150
Member Avatar for Ghostenshell

Can someone explain how to add a file to a dictionary. The file is simple. Maybe a word or a number on each line. Here is the code I have. Didn't know if i should use this post or the List and Dictionaries post so kind of posted twice... sorry …

Member Avatar for woooee
0
133
Member Avatar for wotthe2000

Hi I'm getting the error TypeError: argument of type 'int' is not iterable when i run my program and don't know where I'm going wrong. My code is: [ICODE] class loan: global loanlist loanlist = [] def loanbook(self, name, ISBN, author, title): self.name = name self.ISBN = ISBN self.author = …

Member Avatar for Ene Uran
0
4K
Member Avatar for adam291086

I am trying to set a cookie but when i check my browser cookies nothing is set. What am doing wrong [CODE] #!/usr/bin/python # e begoli, python connector for mysql # import MySQL module import MySQLdb import cgi import Cookie import time cookie = Cookie.SimpleCookie() cookie["ID"] = "" print "Content-type: …

Member Avatar for adam291086
0
220
Member Avatar for SoulMazer

Hello, if you have seen any of my other posts you will know I am working on a script to make a "vocabulary test". I currently having it functioning nearly perfectly, except I get an error if I enter the wrong word. Code: [code=python]def vocabtest(): for r in words.values(): count …

Member Avatar for SoulMazer
0
97
Member Avatar for wotthe2000

Hi I have certain number of books which each have an author, title and ISBN number. How is the best way I can store this so that when I want a list of the books I will be able to list the books with the title, author and ISBN number? …

Member Avatar for Ghostenshell
0
151
Member Avatar for adam291086

In php you can use $_GET['adam'] to get the information from adam in the url Can you do the same in python? if so how?

0
74
Member Avatar for thehivetyrant

[B]Hi i've been assigned with doing a torn square, and i've kinda got it working with the code below.[/B] [code] import turtle turtle.reset() length=100 degree=60 i=0 while i < 4: turtle.forward(length/length*40) turtle.right(degree) turtle.forward(length/2) turtle.left(degree+degree) turtle.forward(length/2) turtle.right(degree) turtle.forward(length/length*40) i+=1 turtle.right(90) else: raw_input("there's hopefully a square, all torn like!") [/code] as you …

Member Avatar for thehivetyrant
0
490
Member Avatar for mrpoate

Hi, I'm currently working on a project in Python 2.6.1 using the Tkinter interface, and being new to both Python and Tkinter I've quickly found a problem that keen internet trawling hasn't seemed to help. I'm sure its not a particularly difficult problem or anything, but instead of spending probably …

Member Avatar for mrpoate
0
132
Member Avatar for OffbeatPatriot

At my lab the professor bought a camera that came with a c library to control it from a computer. Right now he wants me to create a gui in matlab to control it but I'm such a python zealot I'd rather do it in that, and then call it …

Member Avatar for OffbeatPatriot
0
254
Member Avatar for scru

Is there a way to add a directory to the locations that python look at when you call __import__ ? I need to import some scripts from a user folder at runtime, and since __import__ doesn't accept absolute file names, I'd like to try this. Copying the script to the …

Member Avatar for scru
0
137
Member Avatar for revenge2

Hey guys, well here are some more of my questions (sorry!! i know, im a pain..) Ive finished "most" of everything in this [URL="http://www.swaroopch.com/notes/Python_en:Table_of_Contents"]tutorial[/URL]. I missed some out because they were too much for me to understand at the time. will go back to them and come back with more …

Member Avatar for Ene Uran
0
122
Member Avatar for EAnder

I know the codes not the best well written but the only problem I'm having(besides the interpreting of the macro commands, the one here is just a base for me to work on) is how the UpdateLabels.start() method returns: [code]Traceback (most recent call last): File "C:\Users\Erik\Desktop\Stuff from last Night\MouseMacro.py", line …

Member Avatar for Ene Uran
0
115
Member Avatar for revenge2

hello again, Ive got the basics under my belt and ready to start making things happen:D. I want to experiment with different things so could you show me to some good tutorials on some of the following things. 1. sending and receive messages through the internet-what library/Mod should i use? …

Member Avatar for Ene Uran
0
103
Member Avatar for harrykokil

hello guys im stuck for quite a while with this problem and i badly need ur help. in fact i wanna make the red rectangle slow down when it comes close to the blue one. it would be nice if they both move at the same speed. ive tried several …

Member Avatar for harrykokil
0
75
Member Avatar for mrpoate

Hi, This is my first time on daniweb, so if I've posted in the wrong section or there's already a similarly-themed thread or I've done something wrong I apologise. Anyway, I'm hoping someone can prod me in the right direction with a problem I'm having right now. I'm currently working …

Member Avatar for mrpoate
0
2K
Member Avatar for jworld2

Okay, my first question is about wxpython's registerhotkey. As far as I can find, there are not letter key keycodes. This example relies on the win32con module: def regHotKey(self): """ This function registers the hotkey Alt+F1 with id=100 """ self.hotKeyId = 100 self.RegisterHotKey( self.hotKeyId, win32con.MOD_ALT, win32con.VK_F1) -- I want to …

Member Avatar for lllllIllIlllI
0
161
Member Avatar for adam291086

I am trying to write some simple information to a file and i am getting the error message "No such file or directory when i know full well it exists. If you take the url [url]http://www.adamplowman.com/uni_project/log.txt[/url] you get the file heres the code [CODE]#!/usr/bin/python print "Creating a text file with …

Member Avatar for Gribouillis
0
118

The End.