15,181 Topics
| |
I am looking for some ways to have my Python code access a video stream on ustream and have the program create a user account by entering a username, password, and email address, and then have it then send a message to be entered into the chat. Does anyone know … | |
Hi, I am a beginner in Python. I have created 1 script in notepad++ and trying to execute the script from command line but it's giving an error. I have set the PATH of Python in the environment variables also. Can anyone send me the complete steps for executing the … | |
Hi.. I've been trying to get this to work for hours now but I'm not understanding what to do. Basically I'm creating a quiz on python with 5 questions. I have a function that is only for the quiz. Another function is to display the highest quiz score. I want … | |
I am having a problem with the data I have collected. When I write the data to a file it is shown like this. (231.2314,32434.344,134.2342,345.345,1234.45) (2323.567,32.6754,12323.8776,12323.575,233.5673) now when I read data and put it in a list it looks like this. data = ['(231.2314,32434.344,134.2342,345.345,1234.45) \n','(2323.567,32.6754,12323.8776,12323.575,233.5673)\n'] is there any way i … | |
I am new in Python. I wrote a program that reads-in large text files using xreadlines, stores some values in lists (and arrays) and does some calculations. It runs fine for individual files, but when I try to consecutively process files from a folder, I get a memory error. my … | |
[CODE]import pygame from pygame.locals import * from sys import exit from random import randint pygame.init() screen = pygame.display.set_mode((640, 480), 0, 32) while True: for event in pygame.event.get(): if event.type == QUIT: exit() rand_col = (randint(0, 255), randint(0, 255), randint(0, 255)) for _ in xrange(100): rand_pos = (randint(0, 630), randint(0, 479)) … | |
How do I get a recursive function to return a value other than None? For example: [CODE]def function(depth): if depth > 0: function(depth - 1) else: return 10 function(5)[/CODE] returns None, and not 10. | |
Hi. So, I'm coding this GUI into a sort of quiz. I'm not sure how to explain what I plan to do so I will write it out in a pseudo code. I know this isn't the most efficient way at all to do this, but I'm just focused on … | |
Hey guys, I really appreciate your help so far! :) This one is a tough beast... I don't even know how to approach it. Let me give you a summary version and a detailed version. Summary version: There are all sorts of these XML files scattered within a bunch of … | |
I found one interesting site while I was fooling around ... I mean Googling around: [url]http://python-history.blogspot.com/[/url] Maybe you would like to check it out. One of the guys blogging is quite famous in these circles: Guido van Rossum. | |
Hi i'm stuck on this script that i'm busy writing and have no idea where to start. I need a script that connects to a secure ftp, downloads files and store it on my local pc. has anyone done something similar and which modules should i be looking at. | |
Hi, I have a file that has about 65000 lines and three columns. I need to read in the first 2 columns until line 112960. I then need to write the 12960 lines of 2 columns to a file. This needs to be repeated for about 600 files... I then … | |
hi I can change dictionary values but I can't figure out to change the keys.. here is the scenario I want.. A dictionary is coming like this {'fstn':'Tim','lstn':'Parker','mdl':'W','dob':'19801201'} now I need to change to {'FIRST_NAME':'Tim','LAST_NAME':'Parker','MIDDLE_NAME':'W', 'BIRTH_DATE':'19801201'} please help me to change the keys.. | |
Hi I'm very new to Python Language, I'm getting this error "AttributeError: 'str' object has no attribute 'internalSplit'" and don't understand why. please check the following code.. [CODE] sourceAction = str(sourceAction); identityInfoDict = dict(identityInfo); for key in identityInfoDict.keys(): if(key.find("GENESYS_DATA") >= 0): intDict = self.internalSplit(key,identityInfoDict)[/CODE] and the internalSplit is a function … | |
| Evening all. I have decided to try my hand at programming in python. I have tried some of the tutorials on the web but none of them really hold my interest for long. I am looking for a tutorial that covers all the basics and goes quite indepth. All the … |
I'm new to Python and I'm having a problem I can't explain. While running: [CODE] >>> open('word.txt') [/CODE] it returns: No such file or directory: 'words.txt', even if I have both files saved in the same place. I've tried entering the entire file location, but still no luck. Any help … | |
When I try to run a C program that calls a Python function, I am getting this error: [QUOTE]ImportError: /usr/local/depot/python-2.5.1/lib/python2.5/lib-dynload/math.so: undefined symbol: PyExc_OverflowError[/QUOTE] Please help me resolve this. | |
Hello, I just finished my "Who wants to be a millionaire Game", (very basic coding), but I got some issues when I click somewhere out of the Boxes range(try it), and I'd like to add some sort of points to each question, and as they go further make the question … | |
When I run my code the program adds the following before the start of my program: >>> Warning (from warnings module): File "C:/Users/Steven/Documents/CA/CA python/CAMain.py", line 142 def maxgen(fname, worksheet=1,encoding='cp1251'): SyntaxWarning: import * only allowed at module level >>> [I]The first prompt of my program would be here[/I] The code it … | |
Is is possible to check if the execution of a java program from python gives any error during runtime and compile time ? Any help or sample code will be of real help.. Thanks in advance | |
Hii I am have suffering few problems in doing following assignment , please help me... Qtprogram using python to calculate addition, subtraction. please help me ...i am new python | |
While doing a project i decided to do a mechanism in a panal of its own class, so i could manage the sizers and layout better, then i wanted to take the end result of that panel and display it in my window. Although when i run this code as … | |
How do I convert the integer -2 to its hex 0xfe??? I tried hex() but it gives me -0x2 | |
I have various list being generated by a mapper function in this format >>> mapper("b.txt" , i["b.txt"]) [('thats', 1), ('one', 1), ('small', 1), ('step', 1), ('for', 1), ('a', 1), ('man', 1), ('one', 1), ('giant', 1), ('leap', 1), ('for', 1), ('mankind', 1)] >>> mapper("c.txt" , i["b.txt"]) [('thats', 1), ('one', 1), ('small', … | |
Hi Friends, I want to parse a header file and auto generate a .cpp file. Can any one please suggest me good link in doing so or provide me a sample python script which will automatically generate a .cpp file. I planning to using VC++ pre-build event to call this … | |
I'M learning python and I can write very small simple programs with Tkinter or play sound through pygame. I've just started the book "Beginning Game Development with Python and Pygame". I'M in the earlier part of the book and I've just been given the program below. The thing is, even … | |
numpy.vectorize takes a function f:a->b and turns it into g:a[]->b[]. This works fine when a and b are scalars, but I can't think of a reason why it wouldn't work with b as an ndarray or list. For example: [CODE=python] import numpy as np def f(x): return np.array([1,1,1,1,1], dtype=np.float32) * … | |
hello, i created an executable from a python project, with py2exe & cx_Freeze for testing, and both versions work fine on my Windows OS, but none work on other PCs (Win32), when i start the executable it says : 'The application has failed to start because the application configuration is … | |
Hello, im starting a new project, about the game who wants to be a millionaire, so In the beggining I have a Start Button, but I want to know how to set the parameters of the mouse click to be only within the range of the START button. heres what … | |
Hello, I'm sure there is a simple solution to this but I cannot seem to find the information I need in my textbook or online. I'm creating a GUI with an entry box for the user to input their name. I then use getText() to retrieve the name they entered … |
The End.