15,190 Topics

Member Avatar for
Member Avatar for sravan953

Hey guys! I run Windows XP(just though I'd let you guys in about it!) I have written code for a Facebook program: [CODE]import time import bz2 print print("Welcome to Facebook Secure Scratch pad. You can enter your Facebook password\nto encode and store.") print print("Please enter your Facebook password:") ps=raw_input() if …

0
60
Member Avatar for tomtetlaw

How do you render a font so that it changes when the variable changes? This is my code: [code=python] ############################## # Copyright lololol (c) 2009 # ############################## import pygame from pygame.locals import * pygame.init() GRAVITY = 0.07 FRICTION = None def getNumKeysPressed(): temp = 0 for item in pygame.key.get_pressed(): if …

Member Avatar for scru
0
288
Member Avatar for brashli

I am taking a text file and trying to do calculations with it where the line in the file looks like this: 'Corn For Grain', 'Irrigated', '1970', 'Colorado', 'Chaffee', '8', '10', '15', '11199199', '1', '', '100 acres', '75 bushel', '7500 bushel', '', '' It has commas because it came from …

Member Avatar for The_Kernel
0
140
Member Avatar for rithera

So, this is my hello world program for python and I have been able to solve all the problems except 1. When I grab the page data from WoWArmory in python, non-ascii characters like "ø" are printing as "ø" and "é" as "é" and so on. So, I went over …

Member Avatar for rithera
0
118
Member Avatar for poeticinsanity

I'm using HTMLParser to find some thing among this page given below. The link i'm looking to find and follow is in red. I'm using the code, also provided below to find this link, but it isn't seeming to find it at all. The portion of code that isn't working …

0
55
Member Avatar for gujjar19

Hi; I'm learning Python, need a little help here. I have a text file which has the below data, [QUOTE] <SYNC Start=5047><P Class=ENCC> Back, back, back, back! <SYNC Start=7235><P Class=ENCC>&nbsp; <SYNC Start=10725><P Class=ENCC> Yeah, Dan! [/QUOTE] I want to strip the text only i.e. [QUOTE] Back, back, back, back! Yeah, …

Member Avatar for gujjar19
0
141
Member Avatar for gujjar19

I have a subtitle file and I want to extract timestamps from the file. e.g. from below lines: [QUOTE] <SYNC Start=106377><P Class=ENCC> Hey... <SYNC Start=107350><P Class=ENCC> close the door. [/QUOTE] I want to extract timestamps '106377' and '107350' and append them with the name of the file including .bmp at …

Member Avatar for gujjar19
0
80
Member Avatar for poeticinsanity

When I use the external module that runs the same code (line commented out) the program terminates. However, when I run the code inside the current module, the program seems to work just fine. Anyone tell me where I'm going wrong? I'd like to be able to use the utilities …

Member Avatar for poeticinsanity
0
83
Member Avatar for nephisanchez

Hi - I've been spinning my wheels for days using Carbon.Qt to try and extract one frame from a quicktime movie, and save as a .jpg or .png or .gif to be used as a thumbnail. (You see, I have a load of quicktime movies that I'm uploading to a …

0
21
Member Avatar for oystercatcher

Let me begin by saying that I am a lousy programmer and I am hacking away at something that interests me. I havent used these forums before so I hope the code I post doesnt get corrupted. I am working on a logarithm solver using a method explained by napier …

Member Avatar for oystercatcher
0
186
Member Avatar for bhanu1225

Hello All. See,for example... in this community site, we can view 10 to 15 threads in a single page and it goes to the second page. It means, a single page can set few threads. I need like that in python. Any suggestions plz.

0
45
Member Avatar for bhanu1225

Hello All. I am having doubt that, is MS SQL works on Apple Mac Os X AND ".NET" too ??

0
62
Member Avatar for bobthebobish

Long time hobbyist programmer suddenly in charge of writing software for a small/medium non profit here. I'm not totally new to python but I wouldn't call myself a genius by any stretch. Anyways I have a rather specific question and want to know if it is actually possible to do …

Member Avatar for bobthebobish
0
104
Member Avatar for mindfad

Hi Ive recently tried to move a python code from a mac version to a version of Psychopy IDE. Now the code wont work on the pc it tells me there a syntax error. Is there something different that mac uses in the python code then the pc? if not …

Member Avatar for mindfad
0
158
Member Avatar for drjay1627

I'm trying to code a Trie in Python. Any suggestions as to where I should begin? drjay

Member Avatar for jlm699
0
109
Member Avatar for brashli

I am trying to do calculations onto a file that I created in python. But I can't seem to make a string with the data without loosing my quotations or going word by word... i have attached my code... This then produces... ['Corn', 'For', 'Grain', 'Irrigated', '1970', 'Colorado', 'Chaffee', '8', …

Member Avatar for jlm699
0
150
Member Avatar for hughesadam_87

Hey all, I have a class with various methods and I want to pass the output of one method into the next method. For example: [CODE]class RockPaperScissors: '''Rock paper scissors game, best of 3''' tries = 3 def __init__(self, name): 'Reads in users call' self.name = name print 'You picked …

Member Avatar for jlm699
0
175
Member Avatar for jaseerabubakar

I am trying to write a scipt which will take a movie name, search it in google with 'I am Feeling lucky' and return the redirected page. [CODE]import urllib.request import urllib.response import urllib.parse proxy=urllib.request.ProxyHandler({"http":"http://www-proxy.us.oracle.com:80"}) auth=urllib.request.HTTPBasicAuthHandler() opener=urllib.request.build_opener(proxy,auth,urllib.request.HTTPHandler) urllib.request.install_opener(opener) url= 'http://www.google.co.in/search' values = {'hl' : 'en', 'q' : 'Departed imdb', 'btnI' : …

Member Avatar for jlm699
0
207
Member Avatar for sravan953

Hey guys... I created a uber-basic brute force program(not exactly 'brute force'), where in the program opens a 'log.txt' file and reads the contents. I created a list of alphabets A-Z and numbers 0-9....what I wanted the program to do was, try out different combinations with the given set of …

Member Avatar for vegaseat
0
128
Member Avatar for ia2196

I have a list which is of type class people. def class people: name="" age=0 class poeple has two data members name, age I have a list of all person stating in the city as a list of objects of this class.list is called population now i get an query …

Member Avatar for jlm699
0
80
Member Avatar for Horia.Muntean

this is the code of a "dice roller" I made the output(result of print commands) shows in the terminal/cmd is there a way to make a textbox that will show the results directly in tk? eg. "You rolled 10 on the 1d12 dice!" #shown in a tk messagebox and something …

0
65
Member Avatar for SoulMazer

So, I have this script that I am using to study some Biology vocab words for my final tomorrow. All I did was put the list of words/definitions in my existing script, and everything seems to go wrong. I have a total of 50 definitions, yet it says there are …

Member Avatar for SoulMazer
0
132
Member Avatar for mahela007

Occasionally I need to make files in certain folder using python. To minimize the clutter which such files might cause I would like to make them hidden. It's pretty easy to do this using windows explorer but I have to do it manually for every file which my script creates. …

Member Avatar for mahela007
0
12K
Member Avatar for Stefano Mtangoo

I was out of programming for long and now I'm just trying back to regain my knowledge on the language. I have forgotten how the ListCtrl get populated. Here is the tutorial but I cant explain the mechanism. Please help me to understand the whole process. Cheers :) [url]http://zetcode.com/wxpython/advanced/[/url]

Member Avatar for Stefano Mtangoo
0
98
Member Avatar for hughesadam_87

I am trying to learn object oriented programming and am still shaky on the ins and outs of classes. I understand their purpose, but can't seem to grasp many simple operations when using them. The dive into python section on classes is not very helpful either, so if you know …

Member Avatar for vegaseat
0
411
Member Avatar for DayOldPorridge

I've been searching for an easy-to-understand tutorial on fetching web pages using sockets in Python, but haven't been able to find a really newbie-friendly guide. Could someone point me in the right direction?

Member Avatar for siddhant3s
0
97
Member Avatar for Horia.Muntean

Hello.I'm working on a d20 based game system and I'm pretty new to python.What I've done so far is: create 6 random rolls with values 3-18 rollOne rollTwo rollThree etc. There are 6 stats that need theese rolls assigned statOne statTwo etc. I've done the part on how to assign …

Member Avatar for Horia.Muntean
0
126
Member Avatar for knish

Hi, 1) I need to copy images from local to central thru a 3d appl. In doing so i m using threads to ensure that maya does not freeze. Now the case is for each image that is copied there is multiple sizes of this image that has to be …

0
54
Member Avatar for tehbrozor

Hello, The situation here is I have a file and each line has a 8 digit number in it (aorkey) the file is called target.lst In another file (file.lst) there are tons of paths in each path there is an aorkey (somewhere its not always in the same place and …

Member Avatar for tehbrozor
0
114
Member Avatar for SoulMazer

For my script, I am trying to open a text file and print out the information in the console window. However, I am having trouble finding the right way to load it. To start, I need to figure out how to load something in the same directory as the script, …

Member Avatar for SoulMazer
0
150

The End.