15,181 Topics
| |
I'm trying to extract information (people's names and other info.) from a public database into a spreadsheet. Unfortunately, info about the people in the dataset (like their name and occupation) is not visible in the source code. Instead, there is this application by Caspio done, from what I can tell, … | |
Hi I have made a program with wxPython and i have this bit of code: [code=python] def getpic(self,event,urlp='http://mirror.bom.gov.au/radar/IDR043.gif?20080427173538'): fc = url.urlretrieve(urlp,filename='Weather.jpg') image_file = 'Weather.jpg' self.bmp = wx.Bitmap(image_file) self.img = wx.StaticBitmap(self.background, wx.ID_ANY, self.bmp, pos = (20, 60)) self.background.SetInitialSize() [/code] This is a bit of my code, not the full thing but … | |
I have a list of document pages with indicators where each document begins "ND": [CODE] Page1,ND Page2, Page3, Page4,ND Page5, [/CODE] I am trying to format it so that I have a two column csv with the first and last page: [CODE] Page1, Page3 Page4, Page5 etc [/CODE] I cannot … | |
Could anyone please tell me a good place to start in making a generic and customizable media player in python. perhaps a tutorial on how to. I can't find much except for already completed media players by other people. I think it would be ideal for my college project, however … | |
I have been trying to run a code .But i have been getting this error [CODE] Traceback (most recent call last): File "notebook.py", line 126, in <module> Testbook() File "notebook.py", line 90, in __init__ bufferf = "%s %d credits %s Difficulty" % (question.question_id, question.credits, question.difficulty) AttributeError: 'ShortAnswerQuestion' object has no … | |
Hi I am new to Python, I would like to inquire why the script below can't use fileHandle.readline() I am trying to store the data in an input file into a structure, but I am not sure why line = file.readline() fails ? The structure contains mode. Each mode contains … | |
Hi All, I am in the process of learning python. I have a gui that gives the user the option of selecting between two applications to run. Currently each button calls one of these two modules (another python script), using the import command. Since it takes a few minutes for … | |
Hi everyone, I need to append checkboxes in a tree control structure using Python. While searching for the same, I came aross a module called “Snack” which can be used for getting a tree with check boxes in python(called as CheckboxTree). But I am not getting the Snack Library anywhere. … | |
Hi all, [code] class: FileCheck(object): def checkFiles(install_vers=None, uninstall_vers=None): if uninstall_vers != None or install_vers != None: if uninstall_vers != None: for ver in uninstall_vers: print "checking %s" % ver if install_vers != None: for ver in install_vers: pass print "done" if __name__ == "__main__": check = FileCheck() check.checkFiles(uninstall_vers=["1.0","1.3"]) [/code] I'm … | |
Hi All, I am using a python system command to execute a C++ executable file which takes certain binary input. For example: C++ exe name is "Test" "Test" takes the following input . '\x02\xfa\xcbQH\x00' command = '/opt/etc/Test %s' % ('\x02\xfa\xcbQH\x00') system command I am using is : os.popen(command) When this … | |
Hi everybody! I have a small prob here... I'm trying to assign a directory (folder) path to a variable while evaluating python script. Well, to be more clearer, I need to do run something like: getDirPath.py '[I]mypath[/I]' and after that I need to get this path as variable inside my … | |
Hello, I've been swimming with Python for a while, but there are remote field of it which I don't find easy. For example I have made an API from some XML files, and there will be many versions of it. The API is actually several modules either with functions or … | |
Hi: I want to reach through a batch file that has many lines of which I want to do further processing only if there is a line starting with "call ..." Also the line should not contain call %_anyvar% How do I search for a pattern where it matches call … | |
import win32com.client wordapp = win32com.client.Dispatch("Word.Application") # Create new Word Object wordapp.Visible = 0 # Word Application should`t be visible worddoc = wordapp.Documents.Add() # Create new Document Object worddoc.PageSetup.Orientation = 1 # Make some Setup to the Document: worddoc.PageSetup.LeftMargin = 20 worddoc.PageSetup.TopMargin = 20 worddoc.PageSetup.BottomMargin = 20 worddoc.PageSetup.RightMargin = 20 worddoc.Content.Font.Size … | |
I am running a very simple python application and I noted that the memory allocation is something like 4,5M. This is a problem in my case, because I have to run 2 thousand process at the same time. The memory I need is 100k or less. Is there any way … | |
Hi, I have seen in python`s help (the .chm file) that in the opengl section it has a code like this: import gl, GL, time def main(): gl.foreground() gl.prefposition(500, 900, 500, 900) w = gl.winopen('CrissCross') gl.ortho2(0.0, 400.0, 0.0, 400.0) gl.color(GL.WHITE) gl.clear() gl.color(GL.RED) gl.bgnline() gl.v2f(0.0, 0.0) gl.v2f(400.0, 400.0) gl.endline() gl.bgnline() gl.v2f(400.0, … | |
hi, I don't use python very often, and I don't have a lot of experience with network programming either. A friend of mine came up with a problem, and I was wondering if anyone could help out: "I need to connect to another computer with a UDP socket and TCP/IP … | |
Hi. I am opening jpg file with [code] a = Image.open(sys.argv[1]).convert("P")[/code] then I'm getting it on a list with [code] c = list(a.getdata()) [/code] could someone help me to conver this list to array?? I would be glad :) | |
Ok, I am fairly new in using Python, but have a pretty good understanding of it. But I'm up against something that I just can't figure out. I have an archived file that I am trying to take apart into individual files. It isn't a zip file, but an ascii … | |
Hello, I'm trying to make a web bot that fills out a login form from this at&t site [url]http://www.viewmymessage.com/en/legacy/login.jsp[/url] I cannot seem to get it to work though here is my code: import urllib import urllib2 url = 'http://www.viewmymessage.com/en/legacy/login.jsp' user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)' values = {'messageId' … | |
Hi all, I provide the following command in my run window (Start->Run) python setup.py sdist setup.py contains a module named Modular, from distutils.core import setup setup(name='Modular', version='1.0', py_modules=['Modular'], ) But there is no Modular.zip file being created [as said in the documentation]. There is no output whatsoever...Why is this so??? | |
Hello, I am fairly new to Python and starting to get it. But I am having some difficulty with pickle. I am trying to get a account program to pickle user input and to save that in a data file and then reload said info and read as input for … | |
Hello, I am trying to export a SELECT statement to a csv file. I have got it work like so: [CODE] for row in context.sqlTestExport(): print "%s,%s,%s,%s,%s" % (row.ID, row.test1, row.test2, row.test3 , row.test4) RESPONSE.setHeader("Content-type","application/vnd.ms-excel") RESPONSE.setHeader("Content-disposition","attachment;filename=SelectTest.csv") return printed[/CODE] it does return the csv file that I want. The problem is … | |
Hi, I was wondering how to get around a problem I was having with eval(). I have a list of strings and each one is the name of a python file found in the same directory as the current script. I was it to import these modules to use in … | |
hi, guide me,how to make a another way to write again [CODE] a=1 c=0 d=0 b=1 num1=1 e=1 while b <1000: b=a*3 a=a+1 c=b+c while num1<994: num1=e*5 e=e+1 d=num1+d print "Here is the sum of multipile by 3 and 5 is %d"%(c+d) [/CODE] | |
How can I read data present in a large XML file using SAX parser?. I want to transfer the data from XML into tables created in MS Access. Please help. Regards, Dinil | |
why does this code Hangs??!!! I am on Windows [CODE] from subprocess import * proc = Popen("cmd",stdin=PIPE,stdout=PIPE) pin = proc.stdout pin.read() [/CODE] <HANGS JUST RIGHT HERE> | |
Hi i have been fiddling around with the wxPython GUI toolkit for a bit and i wanted one of my programs to start with the window expanded. I googled it but couldn't find an answer there so any help here would be greatly appreciated. | |
I'm currently trying to make an address book that can store data in a .txt file. [CODE] print "Virtual Address Book" print "Austin Jackson; Project 4 : Jun 14, 2008" print " " print "1. Add New Contact Information" print "2. View Adress Book" choice = input(">") if choice == … | |
this was the question on my exam the other day Which strings does regular expression r"^([^aeiou]\w)+\1$" recognize? (3 answers) "o_o-o_" "baraba" "ananas" "anasan" "-O->-O" "izgriz" im not into re at all :D, I tried to compile that expression and check for every string.. funny thing was that none was recognized.. … |
The End.