15,193 Topics

Member Avatar for
Member Avatar for deostroll

I've create a C program that makes a call to routines which I create inside of python...however when I copied the final exe to another machine the program crashed saying it couldn't find the python25.dll...tried looking for it but could not find it. Is it enough that we have this …

Member Avatar for deostroll
0
83
Member Avatar for jobs

I would like to convert url into md5 hash. My question is that md5 hash will create collision at 2^64. If you do long(value,16), where value is the md5 hash string, would value returned from long(value, 16) be unique as long as md5 hashed string is unique? when you move …

0
73
Member Avatar for dr_kac

Hello everybody! As I thought I became more comfortable with data structure I've got the problem I can't solve. It looks so: I have that kind of text file: ABCD vvvv 1e-12 ABCD hhhh 1e-6 ABCD ggggg 1e-3 ASDE ffffff 1e-57 ASDE dddd 0.001 etc. I would like to read …

Member Avatar for paddy3118
0
191
Member Avatar for olipals

Hi. I'm making a program to plot carrier concentration as a function of semiconductor depth. The program is almost ready, the last part I'm missing is actually making the plot. I've been googling a lot and never found a simple example of how to use the plot. My data is …

0
43
Member Avatar for s_jmp

i have seen in some examples that when they are explaining the sockets they write a sck.bind(('',PORT)) for server and a sck.connect(('',PORT)) for the client part but when i try to use this code it doesnt work but when i change the client part to sck.connect(('localhost',PORT)) it works fine. so …

Member Avatar for tzushky
0
97
Member Avatar for reyev

Hi everybody! I need to split my path, let's say' "C:\path1\path2\path3\path4" into separate strings... Not sure how to do that, I've tried os.path.split / splitdrive etc. but it always give me just 2 arguments I need to get "C:\path1" from this path string for example, which would be the root …

Member Avatar for reyev
0
136
Member Avatar for odinroot

Hi, Is it possible to access a https site using a certificate and keeping the session alive like it happens in the browsers? I'm doing a console app that needs to access a server by https to retrieve information but using the httplib, each time i make a request it …

0
41
Member Avatar for sorno

I want to install it in vista, but i get this message in the process: could not create... py2exe-py2.5 I press 'OK', then.. could not set key value python 2.5 py2exe-0.6.8 I press 'OK' again, then... could not set key value c:\Python25\Removepy2exe.exe" -u "c:\python25\py2exe-wininst.log The installation goes on and do …

Member Avatar for sneekula
0
121
Member Avatar for darkMatter2008

I'm having a problem comparing floats, given the values below, I'm getting the wrong results when running this piece of code let distAppart = 4.76837158203e-007 let factor = 0.01 [CODE] if distAppart < factor and distAppart > -factor: print 'this should not print with the given values.... But it does …

Member Avatar for darkMatter2008
0
84
Member Avatar for python_bite

[code=python] class A: id = "" fld = [] def __init__(self, id): self.id = id def method(inp): a = A("a") b = A("b") c = A("c") a.fld.append("Histogram") a.fld.append("Dendogram") b.fld.append("Milligram") b.fld.append("Pictogram") c.fld.append("Pro--gram") c.fld.append("Dodge-ram") print a.fld print b.fld print c.fld inp.append(a) inp.append(c) inp.append(b) #__main__ inp = [] method(inp) for ins in inp: …

Member Avatar for vegaseat
0
125
Member Avatar for Trenholmes

Hi! First, thanks for taking the time to look at my problem, I really appreciate it. Right now I'm trying to setup a columns of 'cells' made up of labels separated by horizontal panes within a scrolledframe. When i initially run my code everything fills in fine. However, when I …

0
41
Member Avatar for reyev

Hi everybody! Don't know if it's possible to do with python... Anyway, I need to get some information from a QuickTime movie file (for now I need movie's duration in seconds, in fact). Topics in different forums point me to the QuickTime format specification PDF, I've already downloded it and …

0
50
Member Avatar for k125m20

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

0
36
Member Avatar for lllllIllIlllI

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 …

Member Avatar for lllllIllIlllI
0
567
Member Avatar for parmenio79

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 …

Member Avatar for rikxik
0
89
Member Avatar for swills

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 …

Member Avatar for swills
0
138
Member Avatar for ankuj.gupta

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 …

Member Avatar for woooee
0
87
Member Avatar for franziss

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 …

Member Avatar for woooee
0
157
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
127
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
70
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
623
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
163
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
178
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
104
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
187
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
92
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
94
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
97
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
98

The End.