15,175 Topics
| |
Hi all, after many hours, I decided to ask my question. I'm making an editor for the ABC music notation language. It is not a supported language in the standard wx.stc lexers. It should be possible to add my own lexer, but how do I do it? If it is … | |
Hey, I have a function, though it's not working as it should be. My program is Dijkstra's algorithm, and I am trying to build a list of a node's nearest neighbours using info contained in a text file of the network (7 nodes in this case), in the form: 0,2,4,1,6,0,0 … | |
Hi all,i can send AT commands to my phone(over Bluetooth) using Hyper Terminal.I am trying to do the same process using python.So here is my code: [CODE]import time import serial # configure the serial connections (the parameters differs on the device you are connecting to) ser = serial.Serial( port='COM8', baudrate=2400, … | |
I am using python in win32 enviornment.i wanna add extra library for using serial port.So i have downloaded the lib for windows env. The package is installing fine.But when ever i import serial following error i get.Can anyone please help me out... [CODE]>>> import serial Traceback (most recent call last): … | |
Hello, how i can creat menu in wx.ListCtrl(), for example when i double click in item list, i return menu like for wx.Menu(). | |
hi all, I am trying to make a prog. which will download image from a web site.But the problem is the dynamic nature of the web site. The url is like [url]http://www.site.com/image.aspx?id=445[/url] If i wanna access image 1,2 or anything i can change the id and i can view the … | |
i am using a template which is working fine with mozilla, but it shows allignment problems with safari, is there any code to make templates cross - browser compatible. | |
I am having problems accessing a variable from one class to another. [CODE] class Player(pygame.sprite.Sprite): def rotateShip(self, rotAmt): radians = self.rotation * math.pi / 180 [/CODE] I am trying to use the variable radians from class Player to another class. radians only exists in 'rotateShip'. Thanks for your help in … | |
I everyone, I need help with making a program where the program would allow anyone to type in a certain weight of a package and the output would come out with a pricing. I will attach the detailed instructions to this thread. Help would be appreciated! This is what I … | |
hello all, i'm new to python programming and i'm facing a problem and need ur help i finished my script and i'm trying to execute it on windows cmd the script takes a file as an argument , when i run the script with the argument it works very well … | |
Hi All I have just started using a subprocess.call()to call external commands. I want to call R from command line and that I can do it easily by subprocess.call('Rscript script.R') and it works fine. I want to pass the several arguments instead of using default arguments. I tried using Rscript … | |
I have been working on pygame for awhile, and now I am working on making a fairly complex space ship game. I want the player to be able to go forward with 'w' and steer by rotating the ship with the 'a' and 'd'. I've tried pygame.transform.rotate, but it makes … | |
hello. I am quite new in python so i have a question. I have a csv file in which i have names of 30 cities and their coordinates(lat and long). i want to generate a distance matrix for these cities. How can i do this ? | |
Hello, I want to write to a file in a particular format. There should be 2 columns, the first column should allocate 5 spaces to store digits and the next column should allocate 30 spaces to store characters. Ex:- [code] 1 Dave 234 Einstein 100000 Bob . . . [/code] … | |
Recently I have been learning about the socket module and how you can create networking applications using it. I was curious if it would be possible using the socket module to either: Set the port as a USB port to trick the computer into thinking a USB is plugged in … | |
How would you go about extracting part of a key from a dictionary. I have a text file that lists about 1000 birthdays Ex. 1/2/1980 I want to extract just the year portion from the dictionary and then run a count against each year. I have no problems with any … | |
My code tries to solve an optimization problem constrained to hyperbolic PDE by matching a numerical solution to a desired one. The basic idea is that: I've initial condition "U" as input which is being updated by this line: U = Initialize(Update_Design_Parameter(U)). I expect that updated U will affect all … | |
Hello all. I am new to programming, taking my first class in college. Im enjoying it a lot so far, and much of the info on daniweb has been a huge help. Due to some unforeseen circumstances, I had to miss class and am now having some troubles with a … | |
Hello, I have some code that passes arguments between functions, though I am failing to understand why my code isn't working. This is the relevant section of my Dijkstra's algorithm code: [CODE]def network(): f = open ('network.txt', 'r') network = [[int(node) for node in line.split(',')] for line in f.readlines()] print … | |
Hello, I am having some trouble in working out the distance of each node from the starting node in my Dijkstra Algorithm code. Here is my code with the section i'm stuck on in bold: [CODE]infinity = 1000000 invalid_node = -1 startNode = 0 class Node: distFromSource = infinity previous … | |
Ok, so I pretty much have my program up and running, but it's not the best looking program aesthetically, and I am trying to do a couple of things to make it look better, and none of them are working. Here is what I want to do. 1) change the … | |
Hey everyone. I would really appreciate some help. I'm currently building a program in Python 2.6 for an introductory Comp Sci class. The program is supposed to use functions to read a text file from a URL, parse the data into tokens, and use the data to calculate a sort … | |
Hey !can somebody help me how to create a incremental search(numerical method) program using python! | |
Hey, I am doing a 'Helicopter'-style game for a project where the player holds the spacebar for the main sprite to go up, releases to go down. Objects come from the right side of the screen at random y-cords moving until they hit 0 on the x-cord. The player must … | |
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 … |
The End.