15,181 Topics
| |
Hi , Have downloaded a feed from a news site and trying to show only the first paragraph for each story. At present, the output to email looks like this: "http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&objectid=10568455&ref=rss" Man arrested after pointing fake gun at police (A 59-year-old man has been arrested after pointing an imitation gun … | |
So I am trying to create a mirror image that is horizontal. I am having trouble getting the actual image to mirror because I am not sure how to go about doing this. I am using PIL 1.1.6 and Python 2.5.4, if that matters. So far I have: [code=python] def … | |
hello friends........ i need a program which counts the total number of galaxy stars of an image.........i think if the RGB value is less than 50.....then is wont be a star otherwise it will be detected as a star......all the clusters of the stars joined together should be considered as … | |
Hi there, I need to know how to get the hard disk serial number, in windows. Thank you in advance. | |
can anyone of u guyz get me out of da problem m having m sure u guyz can ... i had the python re-captcha thingy to enter the captchas on a website but now tht website has putted some code on the captchas nd re-captcha script is not working someone … | |
I'm trying to use a DLL that I have used many times in other languages including C, Java, Perl, etc so I am pretty familiar with the library, but I didn't write it. It came from a comercial source. I'm using ctyps to load the library as such: [code] from … | |
I have a shared drive that I'm trying to access from another computer on the network with a script. I keep getting IO errors(does not exist), is there a module that deals with network locations? -thanks | |
Hi All, I've been learning python for some time, and I really like it. I used this forum many times, and found answers for many of my questions. Unfortunatelly I can't find answer for my current problem: I have two lists (both the same size) and I need to sort … | |
Hey guys. I'm a college student who just took a introduction to programming course for general credit. We are learning how to program with python. I am having real trouble with creating a graphical tic tac toe game. I am just a beginner and any help would be appreciated. This … | |
So here is my program: [code=python]#!/usr/local/bin/python #Scott Landau #CS 380 #Assignment 1 Programming Portion in Python #Created - 4/6/09 #Last Edited - 4/22/09 import pdb #n is going to be equal to 4 for this queens problem. n = 4 #Assigning the empty list to initialState. initialState = [] #Making … | |
New python autodidact: please help with sorting the list "weather" in python using bubble sort, insertion sort, merge sort, quick sort, and selection sort. | |
Hello all. For getting the values from text field, we use [COLOR="Red"]".get"[/COLOR] function. I would like to get all the contents from the [COLOR="Red"]text area[/COLOR]. What is the function to use. | |
Hi, This is my first post to this forum. I am just a beginner so I am not really sure what everything in my code does. Below is my python code. I would like to change the code to ask the user where the files are located and automatically update … | |
hi guys.. ive tried to integrate a timer code (which works fine) into a tkinter window but im having errors. can u plz fix it 4 me? thanks. this is the code i want to integrate. [icode] import Tkinter as tk import time def start(): global count_flag count_flag = True … | |
My question is how do i call the variable Neotile from the main function into the Neo() function and then redefine it and return it back into the main function at the begging of the while loop so it is redefined? [code]from p2lib import * from string import * def … | |
How come this just hangs, after debugging I found it never returns True for precondition even though it should on the very first go around....ugh!!! [code=python]#!/usr/local/bin/python #Scott Landau #CS 380 #Assignment 1 Programming Portion in Python #Created - 4/6/09 #Last Edited - 4/8/09 import pdb #n is going to be … | |
Ok, so I just started using Python last week and I have written 4 VERY simple, non-GUI programs. This is for my intro to game physics class and I happen to be stuck on the last project until my next class. What this project is SUPPOSED to do is ask … | |
Hi, In my current project I'm trying to compose some objects at runtime based on a string containing the object-configuration. Based on the "Favour composition, not inheritance" pattern, but done runtime. My usecase: I have a downloader that downloads web-pages. The downloader is configured with a set of request-handlers and … | |
Dears, I am staring to learn python/wxpython in order to make an app aimed at structural geology analysis. As usual, I am starting with something simple, and after I get the way of it, make it more complex. The idea is (what I have running so far): a window with … | |
I need to get an unknown number of file names from the command line, ie ./python MyScript.py --Files 1.txt 2.txt 3.txt [code] parser.add_option("-n", "--NumFiles", type="int", help="Number of files") parser.add_option("--Files", nargs=options.NumFiles, help="a triple") (options, args) = parser.parse_args() [/code] Clearly this will not work because options.NumFiles is not available until after parse_args() … | |
I want to parse some simple arguments from the command line. This shows all of the arguments: [code] #!/usr/bin/python import sys #print all of the arguments for arg in sys.argv: print arg [/code] but I want to handle something like [code] --file a.txt [/code] or [code] --x 12 --y 13 … | |
Hi, Im trying to write an irc client with python. This is its login page(i hope it will be) [CODE] #!usr/bin/env python # -*- coding: utf8 -*- import gtk, sys, socket class PyApp(gtk.Window): def con(self): iserver = self.entry.get_text() inick = self.entry2.get_text() room = self.entry3.get_text() password = self.entry4.get_text() socket.server = iserver … | |
hi everyone, I have searched for and answer to this and cannot find any solution. So please forgive me if it is a straight forward answer! I have a module that is imported. It has a number of subroutines inside it that need to be run, one for each year. … | |
Let me start out by saying I've been playing with Python for a few weeks now, was recommended by a friend who uses Perl, and it's been quite enjoyable to play with. I've no other programming experience except HTML/CSS. This site has been a wealth of information and an excellent … | |
I'm trying to make a perfect numbers script but having almost no success... Perfect numbers are those whose factors add up to twice the number itself... factors don't have to be prime... So like the first four are 6, 28, 496, 8128... 28: 1,2,4,7,14,28 1 + 2 + 4 + … | |
The question is in the title. How do you create a list r = range(5) and just reference the data without referencing the object itself. ie. o = r .. I just want to reference range(5) without referencing r itself. if i did o.pop(0) it likewise does r.pop(0) ...ideas? | |
I am working on a problem that requires that i create a 3x3 matrix in python using the list function. these are the functions that im required to use to create my matrix: def mlist(size): list = [] for i in range(size): list = list + [None] return list def … | |
Hi, I am interested in working on this project and would like to know more about this project...I am a completely newbie to Python. So I would like to know what I should study in Python and features that will be useful for this prj. Could you also explain in … | |
Hi, I'm a beginner, and just want to display an image using Python. I have this code... [code]from PIL import Image Image.open("pic.jpg").show()[/code] which according to what I've read, should work. However, it just opens Windows Photo Gallery and says 'There are no photos or videos selected'. I have ensured that … | |
The End.