15,181 Topics

Member Avatar for
Member Avatar for amanmazleigh

Hello everyone I've been trying to figure out how to make a joystick move a servo by using Arduino board, its software and Python with pygame module. But I can't just get the servo to move. I really wish someone can help me. This is actually part of my final …

Member Avatar for krigsmaskin
0
984
Member Avatar for doomas10

Hello, I have a txt file which contains data in this format: [CODE]cross-sectional study 21225114.txt prospective cross-sectional study 21225178.txt cross-sectional study 21225178.txt retrospective cohort 21225558.txt retrospective cohort study 21225558.txt cohort study 21225558.txt[/CODE] This shows what type of study each of the txt files have. Problem is some have more that …

Member Avatar for doomas10
0
187
Member Avatar for stefh

Hi pythoners! :) My question is very simple (the answer too, i hope): how to display files in a TreeCtrl? I've tried to use it, according to an example i've found on the web, but it displays only folder, subfolders. No files... I'll show you the portion of code i …

Member Avatar for stefh
0
173
Member Avatar for Rockpile

Hi there, I know there are some changes between Python 2x and 3x, and I know this is probably due to the changes with how 3x handles unicode and binary but I dont know how to make it work properly in 3x. In 3x my code returns the value I …

Member Avatar for TrustyTony
0
282
Member Avatar for Thropian

I'm writing a program in python,tkinter and I need the text on the button to update... is there a simple way to do this?

Member Avatar for Thropian
0
654
Member Avatar for andreasu

A simple streaming server-client pair with non-blocking user input can easily be coded in Python by using the 'select' module that provides a straightforward interface to the Unix select() system call. For Windows users however this is not an option as the acceptance of three empty sequences in the conventional …

0
585
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
156

The End.