15,181 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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>", … |
The End.