15,406 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
62
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
291
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
142
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
122
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
58
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
143
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
83
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
85
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
23
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
189
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
48
Member Avatar for bhanu1225

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

0
64
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
108
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
161
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
113
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
153
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
180
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
209
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
130
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
82
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
68
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
135
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
101
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
414
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
99
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
128
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
56
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
116
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
154
Member Avatar for ararik

Hi, I am very new to Python and computer programming language. I have been working on a text file where I want to find the average length of words in a text file. Well, to start with: Let's say I have only one sentence in my text file (we can …

Member Avatar for ararik
0
3K
Member Avatar for TerabyteST

Hi, in my program, I need at one moment to set a window on the top of the others created by my program but not of all the windows (so that it does not popup randomly when I'm doing something else) how can I do it?

Member Avatar for TerabyteST
0
70
Member Avatar for RDCooter

Just started working on a project that is using Python to drive C API's. When the C API's take an unhandled event they terminate using a C exit(3). How can I monitor for these exit conditions with in my Python code and handle and process the error code used in …

Member Avatar for woooee
0
118
Member Avatar for aot

So far the move to wxPython has been going fairly smoothly. However, it's crucial that I be able to display items in the center of the screen (images, buttons, and radioboxes). I read about wx.ALIGN_CENTER_VERTICAL and wx.ALIGN_CENTER_HORIZONTAL, but the vertical option just doesn't seem to be working for me. Below …

Member Avatar for sneekula
0
1K
Member Avatar for SAFC

Hi. I know that Python comes bundled with Cygwin, but can Cygwin work without Python? I believe it can but I'm just checking as there's some non-developers that we wouldn't want to get access to Python when using Cygwin and Xfree86.

Member Avatar for SAFC
0
26
Member Avatar for herrjanvier

Hello world,(yea, but I had to) I am Steven, I have been a VB6 programmer for about 10 years. Started working with Python / Django just before Christmas 08. I am a long time member of the SCA(Northshield). Gaming geek (started with the D&D red box. Steven

Member Avatar for Robdale
0
24
Member Avatar for tombatista

[CODE]Test = ''' SELECT /*+ INDEX (s_evt_act acc_temp_teste) */ todo_cd tipoemail, name subject, email_sndr_addr remetente, evt_stat_cd status, to_char(trunc(created), 'yyyy-mm-dd') data, COUNT(1) quantidade FROM sblprod.s_evt_act WHERE created >= TO_DATE(:DATAI, 'yyyy-mm-dd hh24:mi:ss') AND created <= TO_DATE(:DATAF, 'yyyy-mm-dd hh24:mi:ss') AND todo_cd IN ('Email - Entrada','Redução de Preço','Fax - Entrada','Email - Saída') GROUP BY …

Member Avatar for slate
0
155
Member Avatar for syris

This is my first time programming anything and i'm reading the learning python book. I'm stuck at step one and very annoyed. I'm trying to run just a simple print saved program i wrote in notebook. For some reason i can't open it, ive gotten to the point where i …

Member Avatar for Stefano Mtangoo
0
113
Member Avatar for poeticinsanity

When the .request method is called, an error is happening. The page does exist, but for some reason the request is failing. Any idea as to why? [CODE]''' Created on May 29, 2009 @author: snorris4 This program will spider the repo.or.cz site for information on their open source projects, gathering …

0
54
Member Avatar for harrykokil

how do i set the input value to 150 as default? n if i enter non-integer value how can i validate it?? thanks [icode] from Tkinter import * root = Tk() lbl = Label(root, text = "Enter Number of vehicles", bg = 'blue', fg= 'white') lbl.pack() textbox = Entry(root, width="20", …

Member Avatar for vegaseat
0
89
Member Avatar for ihatehippies

Is it possible to separate python's syntax checker and check a string object with it? I've read through the py_compile module but it looks like syntax checking it done at a fairly low interface level. Anyone tried this before?

Member Avatar for vegaseat
0
114
Member Avatar for billymcguffin

I was wondering if it is possible to convert audio files with python. like wma to mp3. thanks!

Member Avatar for vegaseat
0
83
Member Avatar for harrykokil

hi guys.. i want to disable a button in tkinter (this mean i can't click on that button) for 3 seconds if the user has already clicked on that button. how can i do that?

Member Avatar for vegaseat
0
120
Member Avatar for Aestter

I've been trying all day to make an executable from python file using pygame too. I was doing okay until it got to the mixer module which is where it failed quite epically. I then searched the web a bit and came up with this as it was on the …

Member Avatar for Aestter
0
596
Member Avatar for lickettysplit

hi ive got a school assignment where i need to access data in a MySQL table, use style formatting and output it in a HTML file. Additionally, there is a frequency column that I need to use to create the style. The more frequent it is the larger the font …

Member Avatar for poeticinsanity
0
116
Member Avatar for bond00

I've been working at this for nearly a week and just don't understand why it isn't working. The code works great in Windows, but once I move it to Linux, it doesn't work. I'm basically using mechanize to login automatically to a website. The website requires cookies, however, and I …

Member Avatar for bond00
0
163
Member Avatar for poeticinsanity

I'm new to the forum and to web programming. I appreciate all the help thus far, and I have a couple more questions. 1. What is the purpose of HTTPconnection object? If i can get a page simply using an HTTPresponse object formed from .request("GET",URL) call? What is the difference …

0
64
Member Avatar for daviddoria

I'm just starting python and it seemed reasonable to go ahead and learn the new version. I read that numpy wont be available for python3 until at least 2010. All I need is a basic "vector", "matrix", and some basic functions like matrix/vector multiplication. Is anything like this available for …

Member Avatar for sneekula
0
136
Member Avatar for gujjar19

Hi, I am new to python. I am working on parsing text from a smi file . I want to extract only dialogues and want to ignore the timestamps (lines starting with <SYNC) for one case, e.g. Below is part of smi file <SAMI> <HEAD> <Title>ÁŠžñÀ» ÀûŸî ÁÖŒŒ¿ä.</Title> <Style TYPE="text/css"> …

Member Avatar for gujjar19
0
3K
Member Avatar for pydude94

im a first time programmer learning python from books and so far ive learnt how to create and define functions but once ive saved them, im not sure how to call them so that i can use them. it works fine when i type in the function name but only …

Member Avatar for pydude94
0
266

The End.