15,175 Topics

Member Avatar for
Member Avatar for Beary21

I'm trying to login to Valve's Steam website, but without any luck my 2 different scripts aren't working. Help please!? Any script I find on the web appears to be outdated. [CODE] import urllib, urllib2, cookielib, webbrowser data = urllib.urlencode({ 'action': 'doLogin', 'goto': '', 'steamAccountName': "****", 'steamPassword': "****", }) # …

0
200
Member Avatar for atwomey

Hello, I am new to Python with only a beginners class completed. I am trying to change code that I have already used to compare line segments. I now want to compare two different polyline shapefiles to eachother and export the intersections as a point shapefile. I'm having trouble understanding …

0
86
Member Avatar for daniel5126

Hello! I'm incredibly new to Python and I hope I'm not asking a dumb question. I also hope I can explain this clearly. 1. I have two lists that each give user activity in one column, and userID in the other. The two lists correspond to consecutive time periods of …

Member Avatar for TrustyTony
0
98
Member Avatar for next_tech

Hi Guys, I am making a board game, where there is a 3x3 grid and the user enters a row and column and it should put an x in that spot on the grid and ask for the user for another location, until they enter 0 to quit. Here is …

Member Avatar for woooee
0
110
Member Avatar for stefh

Hi everyone :) Title says it all... I'm trying to bind events to a wx.GenericDirCtrl. I've visited more than 20 web sites but i haven't found how to do it. I've tried different manners but it doesn't work as i expect it to. In some case my control is seen …

Member Avatar for stefh
0
621
Member Avatar for telmo96

Hey mates, it's me again. I'm trying to develop a small application, but I'm not sure how to put two icons in the same toolbar, probably theres another way of creating toolbars instead of "self.toolbar", I'm not sure. Check my code: [CODE]import sys from PyQt4 import QtGui class Routine(QtGui.QMainWindow): def …

0
89
Member Avatar for wkarl

i want to Display my QTableView insid QTextEdit ? can i do this thing ?? if i can how i can do it ?

0
86
Member Avatar for asong

Your task is to write a program that checks html files, (web pages) to determine whether the embedded XHTML tags are balanced. Balanced tags are necessary for the file to be a valid XHTML file as explained above. The first phase takes care of reading the file and finding all …

Member Avatar for asong
0
225
Member Avatar for mr.ch

basically here is a code, what the question asked to do is to create a graph in quickdraw using the data given to us. now the problem is when i run the program it gives me a few errors. i am new at this and any help would be appreciated. …

Member Avatar for mr.ch
0
105
Member Avatar for hovestar

I am a new programmer and I wanted to start by writing a Tic-tak-Toe program I have more to add but here it is so far. [CODE] import random board = """ 1 | 2 | 3 ---+---+--- 4 | 5 | 6 ---+---+--- 7 | 8 | 9 """; …

Member Avatar for TrustyTony
0
8K
Member Avatar for huntaz556

Hi everyone ! i havent posted in a while i guess i just took a break O.o But i am having a problem i designed a UI in qt designer and then did [CODE]pyuic4 -x backup.ui -o backup.py[/CODE] That worked perfectly i can execute it and i have a nice …

1
91
Member Avatar for AdampskiB

Hello again! I'm having trouble trying to double the value of my coordinates in my point. The object is to create a pair of eyes and their position is identified by clicking a point in the graphic window which would allocated the centre of the left eye, and the second …

Member Avatar for AdampskiB
0
236
Member Avatar for wkarl

hello everyone , i need to make a borders for my printing report and i need a function that move my logo into middle of my report at first line , how i can do these things in Qt4 ?? i write thia code using PyQt4 [CODE]QtCore.QObject.connect(self.pushButton_5,QtCore.SIGNAL(_fromUtf8("clicked()")),self.Delete) def Delete(self): self.printer …

Member Avatar for wkarl
0
192
Member Avatar for Number1000

Hi guys, thanks for any help offered. I am attempting to ask a user for a height and width value - which need to be integers between 5 and 10 for each (height and width) I also need the user to select 3 different colours, out of a predetermined list …

Member Avatar for WolfShield
0
140
Member Avatar for lawltman

So here's my code. What I want is for the player to move down, and while it's moving down, to cycle through images in the sequence (0, 1, 0, -1, 0...) but it doesn't do that. [CODE]import pygame, time pygame.init() Screen = pygame.display.set_mode((400, 400), 0, 32) pygame.display.set_caption('Walk around') GREEN = …

Member Avatar for DrakeMagi
0
242
Member Avatar for TrustyTony

I post here the code for histogram using the turtle graphics module, which I posted long time ago in discussion thread. For more special graphs there exist other fancier options, but this tkinter based routine can function in most standard installations of Python. Example data.txt, like mentioned in module docstring: …

0
2K
Member Avatar for vlady

Hello Guys! Can anybody help me with this code? So what I need? here is it: I want to fill out global variable "student_marks" with a grade for each student and keep it once is loaded. So it means without calling the function "def add_mark()" I will be able to …

Member Avatar for vlady
0
127
Member Avatar for lrh9

Hand evaluator for Texas Hold'em. If a "hand" has five or more cards, hand.rank will find the best five card hand the hand can form. Two hands can be compared using the comparison operators. The final hand can be gotten from the "hand" with hand.rank.hand. The value used for comparisons …

Member Avatar for lrh9
0
1K
Member Avatar for AdampskiB

Hello there, Currently doing some work for my coursework. I've noticed the "\n" is obviously the new line function or whatever you guys call it, but would you understand what I mean when I say it creates too much of a new line? For example, I want the newline to …

Member Avatar for AdampskiB
0
115
Member Avatar for s00pahFr0g

Hello everyone, I did have a look around with search option to see if I could get an answer their, but I couldn't quite find my issue(at least I don't think I did). This is for a final project for school where I have to create a class for a …

Member Avatar for TrustyTony
0
304
Member Avatar for Flames91

Hey all, I'm trying to write a Polynomial Class but I'm having some trouble. I'm having the coefficients and exponents stored in a dictionary, like so... [CODE] class Polynomial: def __init__(self, *termpairs): self.termdict = dict(termpairs) print (self.termdict) if __name__ == '__main__': d1 = Polynomial((2,3), (4,5), (8,9)) print (d1) [/CODE] This …

Member Avatar for TrustyTony
0
507
Member Avatar for arindam31

Hi Guys, I am trying to make a text box that will accept a password from user.The password should be masked while typing. [CODE]def MyFunc2(self,event): box2=wx.TextEntryDialog(None,"Enter Password","PASSWORD","Waiting",style=wx.TE_PASSWORD) if box2.ShowModal()==wx.ID_OK: global pwd1 pwd1=box2.GetValue()[/CODE] The code is a piece of a program . The above code when run , shows the text …

Member Avatar for arindam31
0
232
Member Avatar for obito

Hi I just started learning programming and tried some looping with file management. I am not sure how to join the string after looping can someone give me some pointers how can i go about doing it? Thanks! This is my code [CODE] import string testFile = open("test.txt", "r").readlines() for …

Member Avatar for TrustyTony
0
108
Member Avatar for petergeng

Im trying to call python functions from C code, and i followed a sample from here [URL="http://docs.python.org/release/2.3.2/ext/pure-embedding.html"]http://docs.python.org/release/2.3.2/ext/pure-embedding.html[/URL] I also have the correct include file directries, library directries, and linked the python32.lib (im using python 32) however the error was that python/C APIs such as PyString_FromString, PyInt_FromLong, PyInt_AsLong are undefined (error …

Member Avatar for Gribouillis
0
159
Member Avatar for giancan

Hi everybody, I completed my scripts and I managed to compile them with py2exe. This script will edit some images and will save the output in a specific subfolder of the program (if the user will install it in the default location it will be something like c:\program files\MyProgram\output The …

Member Avatar for giancan
0
263
Member Avatar for ryan461

I'm trying to get the available disk space on a remote linux host using python. The best way I could think to do this would be to os.popen a df command, and use regex to get the available space from the output. I then need to apply a variable to …

Member Avatar for Gribouillis
0
183
Member Avatar for Blazko89

Hello everyone For my bioinformatic course i have to make script that allow user to open pdb file (its a file containing gathered information about proteins, all files have same structure) and look for number of subunits. To put it even more simple it has to check if there is …

Member Avatar for Blazko89
0
95
Member Avatar for giancan

Hi there, how can I read a file line by line till the 150th line? I mean, I know the [CODE]for line in f:[/CODE] but I want to read only (let's say) 150 lines of the f file. Thanks a lot

Member Avatar for giancan
0
190
Member Avatar for pygame

We are very excited to announce the launch of [URL="http://www.pygamezine.com/"]PyGameZine[/URL]! PyGameZine issue 0 is chock full of articles about pygame, and interviews with people using pygame. It was inspired by the magazines that people used to type code out of into their comodore 64s, or z80 spectrums plugged into their …

0
74
Member Avatar for metalix

Hey guys, I know this will have an easy answer, but I have been awake far too long to see it :P I am doing some coding with classes in python, and it just isn't working. Here is the code: [CODE] from bpy import * from os import * from …

Member Avatar for metalix
0
274

The End.