15,406 Topics

Member Avatar for
Member Avatar for mgt

I'm new to Javascript and found some code on the internet that's supposed to create some nested select boxes. Here is the code: [code=html]<html> <head>Some testing</head> <script type="text/javascript" //src="http://trac.mochikit.com/browser/mochikit/trunk/packed/MochiKit/MochiKit.js?rev=1256&format=raw"></script> <script type="text/javascript"> /* <![CDATA[ */ // An array of the currently visible selects var level_selects = new Array(); connect(window, 'onload', function …

Member Avatar for digital-ether
0
1K
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
85
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
126
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
43
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
52
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
37
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
570
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
90
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
140
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
72
Member Avatar for jax2008

JAX ([url]http://www.jax-conf.com/[/url]) is the the most comprehensive conference on web and enterprise development. It provides an ideal forum for software developers, project managers and architects to learn about the latest Technology, Architecture and Agile Methodologies. It is this very special blend of topics which has made JAX the conference of …

0
55
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
625
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
164
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
180
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
106
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
190
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
95
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
98
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
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
255
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
639
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
41
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
195
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
68
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
223
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
99
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
78
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
85
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
68
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
102
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
88
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
72
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
263
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
257
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
72
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
133
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
113
Member Avatar for simionpetrus

can anybody help me build a function to replace certain language specific characters in a file? for example, i want to replace Ș with &#350, so it will be published correctly in a web page.

Member Avatar for woooee
0
45
Member Avatar for smartdog

Heloo, i have just encountered a problem in comiling a module of a program made by python and um not experienced in it, where should i run the module, in the command prompt of windows or in the shell, i dunno wheather i post this thread in the right place, …

Member Avatar for Fuse
0
226
Member Avatar for Trenholmes

First thanks for taking the time to review my issue. I've been banging my head against a wall the last 24 hours. What I want to do is have a list of labels bound to a list of particular events. I want to be able B1-Motion from one label to …

0
46
Member Avatar for spoksss

Hello, I have a problem with calling a staticmethod from another staticmethod when I try use dictionary {} to handle. My code is very basic, but in the future I will add many other static method: [CODE] # -*- coding: utf-8 -*- import sys class DateFormat(): """Class to format and …

Member Avatar for bvdet
0
129
Member Avatar for TheOneElectroni

Hi everyone, I'm new in this forum. By the way it's not longtime since I started learning python. After a couple o months of studying and tutorialing I'm now nearly finished with my first application. I've used Tkinter as GUI and there's one thing that's making me nervous: I want …

Member Avatar for TheOneElectroni
0
3K
Member Avatar for kabila

hello, everybody in dani, im system Administrator with MCSA certification, presently im working in millennium development goal in Nigeria. i have passion of python programming and i really enjoy forums for wxpython , wxglade and django :)

Member Avatar for Jx_Man
0
20
Member Avatar for carojedidiah

hi, am carol. I just started working on python and really want to know a lot more about it. Thanks for having me here! sayonara

Member Avatar for Jx_Man
0
22
Member Avatar for parmenio79

Hi All, Beginner programmer here with an easy question I hope. I want to be able to compare the value of the first item in a list to the second item in the list to see if they are sequential. so in this list: numblist = [1 , 2 , …

Member Avatar for parmenio79
0
27K

The End.