15,406 Topics
![]() | |
![]() | 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 … |
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 … | |
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 … | |
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 … | |
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 … | |
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> <SYNC Start=10725><P Class=ENCC> Yeah, Dan! [/QUOTE] I want to strip the text only i.e. [QUOTE] Back, back, back, back! Yeah, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
Hello All. I am having doubt that, is MS SQL works on Apple Mac Os X AND ".NET" too ?? | |
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 … | |
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 … | |
I'm trying to code a Trie in Python. Any suggestions as to where I should begin? drjay | |
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', … | |
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 … | |
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' : … | |
![]() | 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 … |
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 … | |
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 … | |
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 … | |
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. … | |
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] | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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? | |
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 … | |
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 … | |
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. | |
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 | |
[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 … | |
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 … | |
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 … | |
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", … | |
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? | |
I was wondering if it is possible to convert audio files with python. like wma to mp3. thanks! | |
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? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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"> … | |
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 … |
The End.