15,181 Topics

Member Avatar for
Member Avatar for grisha83

Hello, I am new to Python. I am trying to start writing some simple programs in it. Which IDE would you suggest? I am currently using NeatBeans for my Java programs but i don't think i can use it for Python P.S. I am using Mac OS X 10.5.7 Thank …

Member Avatar for vegaseat
0
100
Member Avatar for arinlares

I'm working on learning on programming with Pygame by following a tutorial linked from the Pygame site. I seem to have stuck myself in a hole, however, because I can't seem to set keys to do different things within the program. I'm trying to first close the program by pressing …

Member Avatar for arinlares
0
6K
Member Avatar for daviddoria

If I do something like this: [code] print "%08d" % 2 [/code] It will print '00000002'. However, I want to change the "8" to a "3" at runtime (to get '002' instead). I tried this: [code] MyLength = 3 print "%0" + str(MyLength) + "d" % 2 [/code] but I …

Member Avatar for daviddoria
0
136
Member Avatar for tehbrozor

Hello, I am trying to write a GUI front (with tcl/tk) for a python module. Unfortunately the module takes parameters and I don't know how to call a python module with parameters without going into interactive mode (I'm running Debian) I can get tcl to run a test module with …

Member Avatar for jlm699
0
168
Member Avatar for hughesadam_87

Hey guys, Lets say I had two different files, each with a column of data. So: [CODE](File 1) 1 2 3[/CODE] And [CODE](File 2) Friend Foe Fighter[/CODE] In the end, I want to unify these into one large file: [CODE] 1 Friend 2 Foe 3 Fighter[/CODE] Each file has an …

Member Avatar for hughesadam_87
0
85
Member Avatar for harsha_kusam

Hi All, In my python script i use to run some oracle queries for this i require a library to connect to oracle which is [B]cx_Oracle[/B]. When we were using 9i(oracle).. my script was running fine.. and now when we migrated to 10 G its giving problem... Few lines of …

Member Avatar for harsha_kusam
0
251
Member Avatar for pyarticles

Hi, I posted some Python code on my blog at blogspot [URL]http://pyarticles.blogspot.com/[/URL] . However, it not display my code correctly. How can I do to solve this problem ? Thanks :) Eiwot

Member Avatar for gissolved
0
140
Member Avatar for gudivada213

Hi, I am new to socket programming, I have a generated data for every minute in client side and i want to send this data to server for every minute using python script. Client laptop having Airtel GPRS connection(in moving vehicle) and server desktop at my home. Both client and …

0
60
Member Avatar for dinilkarun

Hi All, I am using the following code to write data into an excel sheet: [CODE]# Open the Output Spreadsheet objExcel = win32com.client.Dispatch("Excel.Application") # Creating object to write to Spreadsheet self.xlApp =Dispatch("Excel.Application") # Creating Workbook self.Wkbk = self.xlApp.Workbooks.Add() # Get sheet count intShtCnt=self.Wkbk.Worksheets.Count # Creating worksheets wsObjReport = self.Wkbk.Worksheets.Add() # …

Member Avatar for dinilkarun
0
2K
Member Avatar for rajasekhar1242

Hi friends, I have developed a program with reportlabs module to generate a PDF file on macos x. The pdf file is generated successfully But, i cant open the pdf file automatically i mean manually i click on that file then it will be opened. Also i used this syntax …

0
86
Member Avatar for iliketacos

I need help please. this cgi program works fine only if the user puts in more than 66 chars..i chopped the lines into 66 chars each so they would fit in the textarea the problem is that record comments() works perfectly for writing multiple lines and the \n char in …

Member Avatar for iliketacos
0
254
Member Avatar for Your_mum

This will hopefully be my last noobish question post. Please could somebody explain or link to explanation: 1.yeild 2.return thanx in advance

Member Avatar for shadwickman
0
169
Member Avatar for leegeorg07

Hi a while back you guys helped me make a good spell checker, now i want to advance it so that if the difference between 2 words is small it will change them, I think i need to use diiflib for it but i don't know how to do itmy …

Member Avatar for leegeorg07
0
190
Member Avatar for hughesadam_87

Hey guys, Has anyone here ever used python to produce data files which can be immediately read by excel? I thought at first if I just tab-delimited my data, I could copy and paste an entire data file into excel. This is not the case. When I take a tab …

Member Avatar for hughesadam_87
0
112
Member Avatar for drxnele

Hi, i am making downloader, and I want to use diferent progressbar for every link (like ff downloader)... I made treemodel [CODE]treemodel = gtk.TreeStore(gtk.gdk.Pixbuf, str, gtk.ProgressBar)[/CODE] and i put in components with this [CODE] def insert_row(self, model, parent, type_image, file, pbar): myiter = model.insert_before(parent,None) model.set_value(myiter,0,type_image) model.set_value(myiter,1,file) model.set_value(myiter,2,pbar) return myiter[/CODE] my …

Member Avatar for drxnele
0
268
Member Avatar for Aue

How do you copy and paste the text from every page of a book from Google books View plain text option: For example: [url]http://books.google.com/books?id=r70CAAAAQAAJ&printsec=frontcover&dq=true+devotion+blessed+virgin&lr=&as_brr=1&ei=cwB1SZOcI5j4MO6c-bkM[/url] instead of doing it by hand. Also how do you open a series of table of contents like this: [url]http://www.catholictradition.org/Classics/humility-text.htm[/url] and then 1. copy paste on …

Member Avatar for leegeorg07
-1
1K
Member Avatar for wdsd

My goal is to write a function that takes a number and returns the number of solutions for that number, a form along the lines of f(a) = x_0 + x_1 +...+ x_n = a. where n can be any number such that n < a. Another restriction that I'm …

Member Avatar for BigTurtle
0
100
Member Avatar for sedampatil

import csv file = open('signin.csv',"rb") reader = csv.reader(file) rownum = 0 for row in reader: if rownum == 0: header = row else: colnum = 0 for col in row: print '%-8s: %s' %s(header[colnum],col) colnum += 1 rownum += 1 file.close() Hi could any one help me out, i am …

0
48
Member Avatar for OffbeatPatriot

I'm making a module to simulate a neural network, speed is an issue so I've written it in c, basically you build the network in python, and then run call a simulate method that is pure c. One thing I want to add is the ability to inject current into …

Member Avatar for OffbeatPatriot
0
257
Member Avatar for Nyaato

I'm a little stuck on this particular piece of code that I'm working on. I'm supposed to check the contents of 1 text file (original), and compare it with another text file (filter) to see if there's any words that matches up. What I have now is a so-called working …

Member Avatar for Nyaato
0
423
Member Avatar for tomtetlaw

[code=python] def prints(value, ..., seps='', ends='\n', files=sys.stdout): print(value, sep=seps, end=ends, file=files) print = prints [/code] Would this permently overwrite print or just overwrite it while my program is running?

Member Avatar for shadwickman
0
129
Member Avatar for Your_mum

Hi, I am pretty new to python and I have a really noobish question: What does %s mean

Member Avatar for Your_mum
0
88
Member Avatar for BigTurtle

I'm trying to learn wxPython. Unfortunately when I came to China in Jan I had to leave the nice wxPython book in Canada because it was too heavy for my suitcase. So I humbly ask you to bear with my ignorance. As practice (and because I have a practical use …

Member Avatar for BigTurtle
0
942
Member Avatar for tomtetlaw
Member Avatar for tomtetlaw
-1
92
Member Avatar for pymatio

I have the following files: [CODE] # add.py #!/usr/bin/env python import os import Cookie import hashlib import MySQLdb import cgi import cgitb; cgitb.enable() def showform(): reshtml = '''Content-Type: text/html\n <html> <body> <form action='add.py' method='post'> Name: <input type=text name=name size = 15><br> URL : <input type=text name=url size=30><br> <input type=submit value="Add"></form> …

Member Avatar for jlm699
0
72
Member Avatar for leegeorg07

Hi I was asking around for ideas for programs and I was challenged to make a browser, but I have no idea how to do this, do any exist currently? and how could I do it please?

Member Avatar for leegeorg07
0
77
Member Avatar for sravan953

Hey guys, I have some code here which checks the last three characters in the list: [CODE]site_list= ['C', ':', '\', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', 's', ' ', 'a', 'n', 'd', ' ', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', '\', 'S', 'r', 'a', 'v', 'a', …

Member Avatar for sravan953
0
113
Member Avatar for tomtetlaw

Whenever I run this code, it always returns an empty list, can someone tell me why this is happening? [code=python] ## Written by Tom Tetlaw ## Copyright (c) 2009 ## Written in IDLE<www.python.org> import sys, os import re sys.path.append('E:/Tom's Personal Project/engine') import shared.useful.Useful import shared.charactors ##TODO: ## Make the Monster …

Member Avatar for shadwickman
0
210
Member Avatar for mbox_96

Hello everyone, I'm new to pyhton and this is my first post. Please help me understand how can I tell python where my parallel module is located. parallel module I think is located under parallel folder. Any help will be appreciated... [CODE]import sys sys.path.append('C:\\Python26\\Lib\\site-packages\\parallel') class HelloWorld: _reg_clsid_ = '{BEA1AA48-1D0A-4D19-8E98-03C54F195B59}' _reg_desc_ …

Member Avatar for Stefano Mtangoo
0
136
Member Avatar for tomtetlaw

The End.