15,175 Topics

Member Avatar for
Member Avatar for runge_kutta

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 …

Member Avatar for runge_kutta
0
4K
Member Avatar for rssk

hi all... create a loop for D link switch for both UPL and NMS ports..... can anyone plz explain about Dlink thanks in advance....

Member Avatar for rssk
0
78
Member Avatar for Behseini

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 …

Member Avatar for Behseini
0
5K
Member Avatar for dos_killer

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 …

Member Avatar for vegaseat
0
241
Member Avatar for Peacer

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

Member Avatar for Gribouillis
0
193
Member Avatar for stefh

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 …

Member Avatar for stefh
0
7K
Member Avatar for Dogge3

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

Member Avatar for woooee
0
66
Member Avatar for eva yang

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 …

Member Avatar for bron92
0
184
Member Avatar for toritza

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() …

Member Avatar for toritza
0
180
Member Avatar for BirdaoGwra

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

Member Avatar for BirdaoGwra
0
294
Member Avatar for Ghostenshell

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 …

Member Avatar for Gribouillis
0
117
Member Avatar for nidhisajan

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

Member Avatar for TrustyTony
0
26
Member Avatar for jamseyjames

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 …

Member Avatar for Gribouillis
0
104
Member Avatar for yamiyuka

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 …

Member Avatar for yamiyuka
0
587
Member Avatar for fsl4faisal

i want to implement multicast using python can anyone tell me how can i get information on socket programming in python?

Member Avatar for woooee
0
156
Member Avatar for RICH148

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 …

Member Avatar for bpatt22
0
233
Member Avatar for joeywheels

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 …

Member Avatar for woooee
0
144
Member Avatar for canyvr

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 …

Member Avatar for woooee
0
126
Member Avatar for hughesadam_87

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

Member Avatar for hughesadam_87
0
144
Member Avatar for tcl76

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 …

Member Avatar for tcl76
0
2K
Member Avatar for BirdaoGwra

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

Member Avatar for richieking
0
162
Member Avatar for Thristan_

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" + …

Member Avatar for richieking
0
418
Member Avatar for Boubakr

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 …

Member Avatar for Boubakr
0
114
Member Avatar for Behseini

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

Member Avatar for Behseini
0
155
Member Avatar for yeleek

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 …

Member Avatar for TrustyTony
0
131
Member Avatar for hughesadam_87

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 …

Member Avatar for Gribouillis
0
159
Member Avatar for joaep2

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 …

Member Avatar for joaep2
0
907
Member Avatar for Celtrix

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]

Member Avatar for Celtrix
0
106
Member Avatar for tottletj

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 …

Member Avatar for tottletj
0
83
Member Avatar for stefh

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 …

Member Avatar for stefh
0
434

The End.