15,175 Topics
| |
Hello, I am having trouble using ctypes to call a Dll function. In short, the function accepts a pointer to an array of structures....like: [CODE] int arrayFiller( USHORT sensorID, void *pRecord, int recordSize ); [/CODE] I have generated a pythonified version of the function by importing the Dll etc. We … | |
hi all... create a loop for D link switch for both UPL and NMS ports..... can anyone plz explain about Dlink thanks in advance.... | |
Hi I am running a simple application which has three Radio Button and I have two problem with that as following: 1- First of all, two of the radio buttons [R2(Blue) and R3(Green)] are automatically selected when I run the code!(As you can see in attached screen shot). I tried … | |
im trying to replicate the screen contens in my application .. i need a certain area of the screen to be drawn in my app...although this code works fine, its very very slow...takes more than 20 seconds with inferior quality and around 30-40 with best quality... is there a quicker … | |
[CODE]a = [[[0] for col in range(4)] for row in range(4)][/CODE] I do that code and it runs fine, and then I manipulate that list with code I have later and it runs fine at a reasonable speed. But if I put this code in a module. Module ListToFillUp.py [CODE]def … | |
Hi :-) do you know how to move up one line in the terminal? Explanation with an example: [CODE]#!/usr/bin/env python # -*- coding: utf-8 -*- from time import sleep def test(): print "begin" i = 1 s = "#" while i < 5: print s sleep(1) i += 1 s … | |
I want to create a function wich prints all numbers over 1000000. So the user can input for example 500 and that dosent print but if you input 1005000 it prints. My code far is. v = [600,6300330,47, 1000001] for x in v if x >1000000: print x | |
Hi,there, I need to definea function make_tree(preorder, inorder). This function returns the Node which is the root of a binary tree with the pre-order and in-order traversals given as lists of values in the parameters. If either preorder or inorder is empty, the other must also be empty, and the … | |
Hello. I am have a problem while trying to write to a file some sorted lines . my initial file is somthing like this name2,number2;name3,number3;name1,number1 when i run this code ord = open("Be.csv", 'r') order = ord.read().split(";") order = sorted(order) for sort in order: print sort ord.close() f=open("Odd.csv","w") f.write(sort) f.close() … | |
Hi, Here is my code. [CODE]# class DefaultTamplate import wx import Image BUFFERED = 1 class FourByTwo(wx.Window): def __init__(self, parent, id=-1, image="JPEGImage", size=wx.DefaultSize): wx.Window.__init__(self, parent, id, image, size=size) self.SetBackgroundColour("white") self.W = 384 self.H = 272 self.photo = image # wx.Image("Test.jpg", wx.BITMAP_TYPE_JPEG) self.FrameSize = 96 self.SetVirtualSize((self.W, self.H)) if BUFFERED: self._Buffer = … | |
Keep getting Attribute Errors with my code any suggestions? There are two files attatched [code] from string12 import * from root import * def main(): tree1 = raw_input("enter numbers: ") print buildParseTree(tree1) def buildParseTree(fpexp): fplist = fpexp.split() pStack = Stack() eTree = BinaryTree('') pStack.push(eTree) currentTree = eTree for i in … | |
Can somebody help me with coding in Python for Hindi characters??.I specifically wanted code for counnting unique words ina hindi doc and frequency of unique words... Please help........... | |
so i am trying to write a code that takes is a function for defining Amino Acids. This function takes in a sequence and translates it into mRNA (DNA= ATCGATCG, mRNA= AUCGAUCG) i have no problem with this. The one problem I am having seems like the simplest part of … | |
I am working on a text based game for my class. Its not required, but I want to have a health system. I'm trying global health, but I keep getting an error. I want to make it so you have a base health of 100. After the battle it will … | |
i want to implement multicast using python can anyone tell me how can i get information on socket programming in python? | |
Hi all, I'm trying to make a Poker program. This is what I have so far but I'm not sure how I can check to see if the deck is a Royal Flush, Straight, etc. Could anyone help me get started? This is what my output should be. Enter the … | |
I'm having difficulty figuring out how to append two user inputs into a list as a tuple. I would also like to call the list and enumerate the list (e.g., 0. dog_name:dog_breed). I'm not sure how to call display or if it is even written properly. Here's what I have … | |
i am a beginner of using python,and i am doing an project about "Tic-Tac-Toe". well,the project needs very basci code.....however,i could not get it.... The following conditons are the project requested: 1.When the computer randonm selected a available number,so which means computer doesn have logic....the winner are user..... 2.user and … | |
I have a series of data files with large headers. Here is an example: [COLOR="red"]SpectraSuite Data File ++++++++++++++++++++++++++++++++++++ Date: Fri Feb 25 13:43:55 EST 2011 User: group Dark Spectrum Present: No Reference Spectrum Present: No Number of Sampled Component Spectra: 1 Spectrometers: USB2E7196 Integration Time (usec): 11000 (USB2E7196) Spectra Averaged: … | |
hi, i found a module called xlwt ([url]http://www.python-excel.org/[/url]) that can write to Excel. i want the code to read from a file (robert.txt) and then write to excel in a column. however, it seems that the output from this code is that it only writes to one cell in the … | |
HI, Could someone kindly tell me how to change the x y position of an empty bitmap. Say I have a rectangle on the window now I want to position the EmptyBitmap according to x y position of that rectangle? Thanks in advance Regards | |
Hi I am not a very experienced programmer, but I searched around and couldn't fint an answer to my question, so I am posting it here. I am trying to seach through a local directory and process all the files in that folder. The files are alle named "label" + … | |
Let's say this: [CODE]print """ Wleomce... * To start the quiz press <s> * For more information quiz press <i> * To exit press <q> """ main_menu = raw_input('Your choice: ').lower().strip() if mai_menu == 's': print """\ * Press <n> to write yoyr name. * Press <l> to choice your … | |
Hi Guys, Here I am trying to create a very simple function to change a Frame background color as by a btn event handling as following: [CODE] from Tkinter import * class App: def __init__(self, parent): self.myParent = parent self.fm = Frame(parent) self.fm.pack() self.btnBlue = Button(self.fm, text = "Blue") self.btnBlue.bind("<Button-1>", … | |
Hi, I've a multi line string, which I want to delete the first 22 lines from, I then want to use re.findall (which appears to only work on strings). Is there an easier way to do it than writing the string to a file, reading in as a list, deleting … | |
I wrote a program that interactively allows you to import files directly from your HDD into another python program. When building a new program, you simply call my program, navigator, and it lets you choose a directory and it prints out a numbered list of file: file a 1 file … | |
Hi guys. I downloaded pygame and a few other modules for Python. I know that I have to put them in a certain folder to make sure Python can read them, but what is that exactly? I'm running a Mac, OS 10.6.6. I already tried putting it in the main … | |
Yes i realize this is the fibonacci sequence and i understand the math im just having trouble understanding the line in red what does it equate to in laymans terms? Thanks in advance :D [CODE] a,b=0,1 while b < 100: print b [COLOR="Red"]a,b=b,a+b[/COLOR][/CODE] | |
| Hi, I'm currently trying to do something which I thought would be relatively straightforward, but it appears not. Basically, I have a set of data that needs to be done logarithmically in a histogram, but appears the 'log=True' command in the pylab.hist() only refers to the y axis, rather than … |
Hi every one! :) Based on the example of StyledTextCtrl of the wxPython demo i managed to write a small application intended to Php code writing. Does anyone know how to set styles for Php codes? I found it's necessary to use SetLexer(stc.STC_LEX_HTML) because STC_LEX_PHP is deprecated. But i have … |
The End.