15,175 Topics

Member Avatar for
Member Avatar for alexisellis

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 …

Member Avatar for lllllIllIlllI
0
126
Member Avatar for dinilkarun

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

0
69
Member Avatar for asciiman

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 …

Member Avatar for asciiman
0
2K
Member Avatar for dilbert_here00

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 …

Member Avatar for dilbert_here00
0
617
Member Avatar for reyev

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 …

Member Avatar for reyev
0
162
Member Avatar for tzushky

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 …

Member Avatar for tzushky
0
174
Member Avatar for indu_shreenath

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 …

Member Avatar for bvdet
0
103
Member Avatar for dinilkarun

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 …

Member Avatar for tzushky
0
186
Member Avatar for EduardoT

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 …

Member Avatar for EduardoT
0
89
Member Avatar for s_jmp

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

Member Avatar for tzushky
0
93
Member Avatar for Rodlikespants

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 …

Member Avatar for tzushky
0
96
Member Avatar for gest

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 :)

Member Avatar for tzushky
0
96
Member Avatar for s7plc

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 …

Member Avatar for s7plc
0
250
Member Avatar for anakastakis

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

Member Avatar for preyan
0
626
Member Avatar for plitanium

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???

0
38
Member Avatar for sibdizzle

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 …

Member Avatar for G-Do
0
191
Member Avatar for smithsf22

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 …

0
67
Member Avatar for shadwickman

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 …

Member Avatar for shadwickman
0
220
Member Avatar for MindControl

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]

Member Avatar for tzushky
0
95
Member Avatar for dinilkarun

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

Member Avatar for tzushky
0
75
Member Avatar for s_jmp

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>

Member Avatar for tzushky
0
82
Member Avatar for lllllIllIlllI

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.

Member Avatar for lllllIllIlllI
0
65
Member Avatar for inkcoder

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

Member Avatar for inkcoder
0
99
Member Avatar for saskvach

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

Member Avatar for Fuse
0
86
Member Avatar for VelcroMan

I'm trying to use the BlueSoleil SDK with Python. To do this i use ctypes to call the BlueSoleil DLL. Here is the code: [code=python] import ctypes print ctypes.cdll.BsSDK.Btsdk_Init() print ctypes.cdll.BsSDK.Btsdk_StartBluetooth() print ctypes.cdll.BsSDK.Btsdk_StartDeviceDiscovery(0,0,0) ## print ctypes.cdll.BsSDK.Btsdk_GetInquiredDevices(None,None) [/code] The last call should return the number of active BT devices around, which …

0
69
Member Avatar for L_E_G_I_O_N

Hello. I am a relatively new python programmer, but I know my way around the language. I have decided to do some work with PyOpenGL -- I just finished a game that had to be in XNA, now I have a bit more free reign and I prefer to do …

Member Avatar for s_jmp
0
252
Member Avatar for edholden

Hi. I'm having a little difficulty understanding character sets in Python. Basically I'm trying to write a function that will substitute a non-ASCII character with a similar ASCII equivalent. So if given a string like 'ÂBÇD', the function would iterate through the string object, replacing select characters to return a …

Member Avatar for edholden
0
255
Member Avatar for cheechand

Hello, I am trying to split a word into an array For example, "airplane" becomes ['a','i','r','p','l','a','n','e'] Any suggestions?

Member Avatar for lllllIllIlllI
0
69
Member Avatar for Lardmeister

I have started to use the PyScripter IDE and really like the many features it has. However, everytime I make an error in the code, and as a beginner I make a lot of errors, it rather ungraciously exits. There must be something wrong in my settings?

Member Avatar for sneekula
0
127
Member Avatar for cheechand

I am trying to compare a list of words to a dictionary to see if there are any matches. How do I do this, as diction.has_key() does not work for lists?

Member Avatar for woooee
0
110

The End.