15,175 Topics

Member Avatar for
Member Avatar for neely615

I am in the process of learning python, but I have a problem some one gave me last week that I wouldn't mind solving before I get to where I actually learn about it. I think python is the best choice. I need to generate a txt file by inserting …

Member Avatar for neely615
0
172
Member Avatar for LinaClark

I have finished the code, but I can not for the life of me figure out why I am not getting any output. Any help would most appreciated. #!/usr/bin/python import apsw import random class NonRepeatingRandom(object): def __init__(self, maxvalue): self.maxvalue = maxvalue self.used = set() def next(self): if len(self.used) >= self.maxvalue: …

Member Avatar for Gribouillis
0
230
Member Avatar for TrustyTony

This example program of using the multiprocessing is crashing my i7 4 core windows7 64 bit computer (32 bit enthought Python 2.7), but is running fine in virtual machine Ubuntu with 4 cores assigned. Can anyone run it in their commputer in Windows7. My system memory (8 GB) is totally …

Member Avatar for vegaseat
0
255
Member Avatar for dilbert_here00

Hello All, I am trying to access files which are on a shared network file system, but not sure which python API I should be using. Description: For example the IP address of the file system is 10.10.10.1 1. From windows if i want to access this server i simply …

Member Avatar for Gribouillis
0
467
Member Avatar for ZZucker

Santa just brought me a fancy notebook computer and I want to know if anyone has some experiemce with accessing that little camera with Python code?

Member Avatar for ZZucker
0
215
Member Avatar for jimmyshote

anytime i add a directory in a .pth file of my c:\python30\Lib\site-packages folder on windows and i try to import from the listed directory in my .pth files, i get an import error that the module does not exist and after importing sys on the windows command line interface and …

Member Avatar for ZZucker
0
538
Member Avatar for Jacklittle01

Hi guys, I am working on a text based adventure game in Python and I am constantly getting this error: **There's an error in your program: return outside function(g.py, line 179** Here is the code http://www.mediafire.com/?4ga0weu4ifc6s1u

Member Avatar for james.lu.75491856
0
182
Member Avatar for wwielen

Hi, I'm trying to make a slider, but for some reason all the numbers of the slider get in left corner of the frame, all at the same position(instead of the 1;left,the position of the slider;middle and 100; right). Also see added File Here is my code: import wx class …

Member Avatar for wwielen
0
139
Member Avatar for Arizona33

Hello, I am a new to python. I need to solve 5 exercises. Any help would be very much appreciated!! thank you! 1.Write a program dotplot.py That takes as input a fasta file with two sequences A scoring matrix and sliding window, such as: dotplot.py fasta.in score.mat 11 and prints …

Member Avatar for vegaseat
-1
135
Member Avatar for giancan

Dear Friends, I have a sequence of two values as the following: 00001.doc d:\pathtofile\image50.jpg 00002.doc d:\pathtofile\image38.jpg 00003.doc d:\pathtofile\image40.jpg ... I would like to add the values to a list, sort the list by second value and rename the first value accordingly. For example, the following steps: Step 1 '00002.doc', 'd:\pathtofile\image38.jpg' …

Member Avatar for vegaseat
0
184
Member Avatar for felix001

What is the best way to use a dictionary within a class. Do I have to assign the dict within the class ? Thanks

Member Avatar for vegaseat
0
120
Member Avatar for mgunia

Hello Everyone! I am a beginner user of Python without IT background (I am interested in IT developing my knowledge step by step). So far I did simple scripts in Python and I encountered a problem. I was looking on Google, however I didn't find the satisfactory answers which would …

Member Avatar for vegaseat
0
9K
Member Avatar for Niner710

I have a question on how to slice a dataframe. Below is a row in my dataframe. I just want to get the list under column C. I saw that I could use df.get_value(), but I'm not sure what to put for index. Is this the right way to return …

0
54
Member Avatar for LinaClark

I need help figuring out how to fix my code. Every time I run the code its traceback is to this part of it. My code is Unbound Local Error for 'result'. Please see code below: def Level1(self): sql = "SELECT easyhint, gps, qrcode FROM gamedb WHERE quad = 1 …

Member Avatar for scaba
0
170
Member Avatar for james.lu.75491856

Traceback (most recent call last): File "C:/python files/USACO/crazy/crazy.py", line 87, in <module> grid.plot(x,y,"F") File "C:/python files/USACO/crazy\grid.py", line 63, in plot self.g[(x,y)] = replace TypeError: unhashable type: 'list' You see, I'm hashing a string with the key bing a tuple. This is using my own 2d grid data structure.

Member Avatar for james.lu.75491856
0
584
Member Avatar for vickim360

Hello, I have been working on a code to simulate wind turbines. However, I can't seem to rotate the wind turbine. Here is the code. import pygame ############################################# # Written by P****** ******* and V***** *** # # Copyright 2012 # ############################################# pygame.init() # Gets Information humidity = float(raw_input("Enter Humidity …

Member Avatar for Jacklittle01
0
318
Member Avatar for krystosan

I am learning re module for practice I have taken an export of my phone addressbook which is a comma seperated text file, containing "First Name","Mobile Phone","Home Phone","Company","E-mail Address","Company Main Phone","Business Fax","Birthday" as of now I am more interested in First name , mobile phone number and email address. in …

Member Avatar for snippsat
0
405
Member Avatar for pbnoj

Hi guys, So I have a list of objects, each which belong to a particular subclass. I am trying to calculate a running standard deviation as follows: Label = [] Resistance = [] m = 0 i = 0 j = 0 for row in Reader: if len(row) == 0 …

Member Avatar for woooee
0
209
Member Avatar for SumTingWong59

Hey I am having trouble with a tic tac toe game and I could really use some help. My if statement(line 51) is underlined, says its invalid syntax, and I cant fix it no matter what I do. Here's my code: http://pastebin.com/UtVTz4gg

Member Avatar for woooee
0
87
Member Avatar for Cravver

While I know some Python language I just can seem to make thi work: So I have this script that when you post a command: -ytb [search terms], it would look up the video in an atom feed from yuotube, could you tell me what I have wroong here? Because …

Member Avatar for Cravver
0
276
Member Avatar for Gribouillis

This small python script invokes the [Treeline](http://treeline.bellz.org/index.html) tree visualizer to display xml files in a pleasant way. ![viewxml](/attachments/large/1/viewxml.png "viewxml")

0
2K
Member Avatar for PhilEaton

I am new to python web frameworks. I am using web.py because I like how raw it is. I am wondering though, how one can produce pages and scripts efficiently when being restricted to sending output through the return keyword? It seems like for any python module you can only …

Member Avatar for Gribouillis
0
240
Member Avatar for nytman

Dear list, i am new to python as well as new to programming with no previous programming experience, i have to design GUI in python and implement multithreading in it, and also perform multithreading at servers in query handling. I checked so many web pages and tried to learn basics …

Member Avatar for vegaseat
0
250
Member Avatar for happymadman

Hey, Guys and Gals. For some reason the variable text_list seems to be modified after the variable final has been modified. text_list is a list of text :) Full code is below. Any other hints and tips would be great Thanks a bunch. decode_list = [] key = 0 final …

Member Avatar for woooee
0
132
Member Avatar for chris99

I'm trying to make a calculator with Tkinter but I'm having trouble using a for loop to make the number buttons. I'm using a for loop as they are nearly identical. Here's the loop: class Calculation: def __init__(self,master): i=1 rowi=1 columni=0 self.num = "" self.button = [] frame=Frame(master) frame.grid() self.returnScreen …

Member Avatar for woooee
0
128
Member Avatar for Frensi

I'm making a little program with tkinter and trying to get this timer to work. I'm getting a "'float' is not callable" error. Does anyone know what I'm doing wrong? The error happens when it tries to call 'self.clock_start()' def create_widgets(self): #create the main frame self.root = Tk() self.root.title("Learning Timer") …

Member Avatar for TrustyTony
0
2K
Member Avatar for rbyrd

When using this code to insert 5, then 18, into a binary search tree, the data value 18 is placed as the left child of the root instead of the right child. The statement if data < node.val: (in the insertR method) doesn't seem to be working correctly. Can someone …

Member Avatar for rbyrd
0
135
Member Avatar for padton

Hi all, I seem to be having problems with summing all the values in a .csv file with the following format: 3.2323232312 7.5345345675 3.3423565624 etc... I have opened this with a spreadsheet at it seems the floats are all in column[0] and each number is on a different row. with …

Member Avatar for vegaseat
0
440
Member Avatar for vickim360

Hello everyone, I am trying rotate in pygame, but I can't. What would be the best way to rotate something around its own center?? Thanks

Member Avatar for vegaseat
0
856
Member Avatar for paine_today

I am importing a library into a script that is being used in a php document, but for the script to run, I need to import a library that is rather large. Is it possible to permanently import the library so I do not need to load it up each …

Member Avatar for paine_today
0
143

The End.