15,181 Topics

Member Avatar for
Member Avatar for blair.mayston

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 …

Member Avatar for targ
0
184
Member Avatar for hunterm

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 …

Member Avatar for hunterm
0
631
Member Avatar for Siaa

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 …

Member Avatar for Nick Evan
0
114
Member Avatar for xeo

Hi there, I need to know how to get the hard disk serial number, in windows. Thank you in advance.

Member Avatar for EAnder
0
6K
Member Avatar for rainobw

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 …

Member Avatar for jlm699
-1
272
Member Avatar for DaveF0223

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 …

Member Avatar for jlm699
0
171
Member Avatar for ihatehippies

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

Member Avatar for vidaj
0
90
Member Avatar for yemu

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 …

Member Avatar for vidaj
0
2K
Member Avatar for ak118

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 …

Member Avatar for tux4life
0
976
Member Avatar for gotm

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 …

Member Avatar for targ
0
142
Member Avatar for nonang

New python autodidact: please help with sorting the list "weather" in python using bubble sort, insertion sort, merge sort, quick sort, and selection sort.

Member Avatar for jlm699
0
113
Member Avatar for bhanu1225

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.

Member Avatar for Mearah
0
93
Member Avatar for Joe Hart

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 …

Member Avatar for Mearah
0
178
Member Avatar for harrykokil

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 …

Member Avatar for jlm699
0
114
Member Avatar for Straightone

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 …

Member Avatar for adam1122
0
144
Member Avatar for gotm

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 …

Member Avatar for gotm
0
140
Member Avatar for Trav580

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 …

Member Avatar for Trav580
0
449
Member Avatar for vidaj

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 …

Member Avatar for vidaj
0
103
Member Avatar for guano

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 …

Member Avatar for scru
0
519
Member Avatar for daviddoria

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() …

Member Avatar for daviddoria
0
194
Member Avatar for daviddoria

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 …

Member Avatar for jlm699
0
107
Member Avatar for mhangman

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 …

Member Avatar for mhangman
0
99
Member Avatar for mitchandsuzy

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. …

Member Avatar for mitchandsuzy
0
84
Member Avatar for Buckets78

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 …

Member Avatar for Buckets78
0
84
Member Avatar for max.yevs

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 + …

Member Avatar for max.yevs
0
204
Member Avatar for ihatehippies

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?

Member Avatar for ihatehippies
0
77
Member Avatar for jmil2

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 …

Member Avatar for adam1122
0
8K
Member Avatar for ssn

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 …

Member Avatar for vegaseat
0
109
Member Avatar for alicem

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 …

Member Avatar for alicem
0
71
Member Avatar for alicem

The End.