15,194 Topics

Member Avatar for
Member Avatar for tcbenson

Apologies if this is not the place for this but I am looking for a python script that will 1) prompt for csv file 2) read in said csv file 3) count # of rows in said csd 4) for each row in csv, get each column as variable row …

0
43
Member Avatar for draven07

...hello... ..i'm developing a Collection Management System for Student Organizations on our campus using C#...This will be use to track their annual collection activities (cash collection)... ...1 month ago, I succeeded and finally finished this system (yet there are still some bugs that im still working on).. ..Now, I have …

0
57
Member Avatar for kalookakoo

I'm having trouble figuring out how to implement where boundaries are (platforms/landings/ceilings). I have an image running across a background image. When the image gets 3/4 of the way to the canvas, it stops moving and the background image scrolls. Same things going backward at 1/4. So with two different …

Member Avatar for kalookakoo
0
406
Member Avatar for 1337RAM1337

If I make an entry box on a window, then change the coordinates, the box stays put like I want. Now is there a way to set new text in that box after the coordinate change? I can't figure it out for my code

Member Avatar for 1337RAM1337
0
324
Member Avatar for THEPalletizer

Having issues with my English to PigLatin Converter. I can get the code to execute correctly on one word but once i do 2 or more words it adds the first letter [0] + 'ay' to the last word in the line.... any suggestions? [CODE]def main(): # Create a list …

Member Avatar for THEPalletizer
0
398
Member Avatar for theraggamuffin

Hey i'm trying to draw this patch in python 3.2. As you can see I can get it to draw the top row, but I cannot get it to truncate the rectangles at the left and right hand side, and I cannot get it to repeat itself... Please Help :)! …

Member Avatar for theraggamuffin
0
287
Member Avatar for jdm3

Hello everyone, I'm working on an assignment that requires a game that drops multiple objects that need to be caught. I'm using multiple classes and the current one is raising a type error. " File "C:/Users/Joe/Documents/School/I-210/Final/game.py", line 118, in main gift = Present() TypeError: __init__() takes at least 2 arguments …

Member Avatar for jdm3
0
833
Member Avatar for effBlam

How am I able to open the contents of a text file into a GUI with each character in the text being an individual button. Say the text file contains 25 characters that are either "A" or "B" in random order. The text file also have 5 rows with which …

Member Avatar for bawakrbs
0
196
Member Avatar for bellarc

I am attempting to remove instances of a character from a txt file with python using the following code: [CODE]import fileinput for line in fileinput.FileInput("test.txt",inplace=1): line = line.replace("^M","") print line[/CODE] and get the following error: File "par.py", line 6 line = line.replace(" ^ SyntaxError: EOL while scanning string literal I …

Member Avatar for woooee
0
332
Member Avatar for hovestar

I have a problem calling up my compturn() function. Here is my code: [CODE]import random def compturn(): print 'Computer turn:' comp = str(random.randint(1, 9)) if comp == a: compturn() elif comp == b: compturn() elif comp == c: compturn() elif comp == d: compturn() elif comp == e: compturn() elif …

Member Avatar for woooee
0
203
Member Avatar for Sarcasm

Hi, I am starting out with python coding and was looking for some feedback. Constructive Criticism please. Here is my code for game "Word Guess". [CODE] # Word Guess # # Word guess, is a game where the user has five chances to ask # the computer if a certain …

Member Avatar for Sarcasm
0
214
Member Avatar for csterling

I am trying to create a buffer on a shapefile using python's GDAL/OGR module. I'm not sure where to take the code from here...ideally I would like the buffered file to be a new file. All the documentation I found confused me and I thought maybe someone here could help! …

0
63
Member Avatar for slash16

want to do: [ICODE]dict = {'1': ['a'],'2': ['a', 'b', 'c']}[/ICODE] invert it to: [ICODE]inv_dict = {'a':['1','2'],'b':['2'],'c':['2']}[/ICODE] i know the one liner, if the dict was one to one, [ICODE]inverse = dict((d[k], k) for k in d)[/ICODE] can I modify this to work if it was not one to one? My …

Member Avatar for TrustyTony
1
2K
Member Avatar for ppotter3

Hello! I am currently looking for some help or ideas in a specific area of Python programming. The project I am having problems with pertains to python print drivers, and printing in a Linux OS. I had originally wanted to find a way (if possible) to write a python print …

Member Avatar for ppotter3
0
339
Member Avatar for rslepoy

Hi, I'm using SAS regular expressions to read a large text file with numbers and characters, and may be up to 500 lines of text in the file. I would like to extract certain key words, specifically, weight quantaties and measures, i.e. kilos or lbs. Each line of text is …

Member Avatar for rslepoy
0
333
Member Avatar for the_azn_invasio

this is my code but i couldnt get phase 2 to print out can anyone help me please? thank you! [CODE] import sys import string NUM_ARGS = 3 GLOBALSTACK = [] TAG_STACK = [] # getFile() Gets a valid file name # Input: None # Output: fileName, the name of …

Member Avatar for woooee
0
297
Member Avatar for sneekula

I need a function that returns True or False if an integer n is a prime. Any 'high speed' thoughts?

Member Avatar for wallars
0
1K
Member Avatar for Gribouillis

This snippet defines a function walk() which generically performs a depth-first traversal of a tree, using preorder, inorder or postorder rules. Here, genericity means here that there are no hypotheses on what the tree nodes are or the implementation of the tree. Walk() only needs an arbitrary object used as …

Member Avatar for Gribouillis
2
1K
Member Avatar for AdampskiB

I'm attempting to create a number square when it's using a parameter. Whatever the user enters in the parameter it will display something like this (using 4 as an example): 4567 3456 2345 1234 I've come up this so far: [CODE]def numberedSquare(n): for a in range(n, 0, -1): print(a, end="\n") …

Member Avatar for techie1991
0
167
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
207
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
88
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
99
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
113
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
627
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
90
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
88
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
236
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
107
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
93

The End.