15,175 Topics

Member Avatar for
Member Avatar for saulius

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 …

0
43
Member Avatar for kinto

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 …

Member Avatar for kinto
0
227
Member Avatar for debasishgang7

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

0
103
Member Avatar for debasishgang7

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

Member Avatar for debasishgang7
0
195
Member Avatar for kur3k

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

Member Avatar for kur3k
0
862
Member Avatar for debasishgang7

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 …

Member Avatar for debasishgang7
0
457
Member Avatar for prateekmeharia

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.

Member Avatar for wulaishiwo
0
85
Member Avatar for progr

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 …

Member Avatar for Gribouillis
0
152
Member Avatar for Vi3tkevin

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 …

Member Avatar for TrustyTony
0
139
Member Avatar for weblover

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 …

Member Avatar for weblover
0
402
Member Avatar for pythonbegin

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 …

Member Avatar for TrustyTony
0
5K
Member Avatar for Clotoss

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 …

0
118
Member Avatar for toritza

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 ?

Member Avatar for Gribouillis
0
2K
Member Avatar for appsrox

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

Member Avatar for richieking
0
948
Member Avatar for Python_nooby

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 …

Member Avatar for richieking
0
485
Member Avatar for jamseyjames

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 …

Member Avatar for richieking
0
82
Member Avatar for Simplicity.

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 …

Member Avatar for Gribouillis
0
163
Member Avatar for silence02

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 …

Member Avatar for silence02
0
3K
Member Avatar for kinto

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 …

Member Avatar for kinto
0
3K
Member Avatar for kinto

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 …

Member Avatar for woooee
0
166
Member Avatar for laroca

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 …

Member Avatar for woooee
0
252
Member Avatar for Torien7

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 …

Member Avatar for Torien7
0
237
Member Avatar for cloudspade

Hey !can somebody help me how to create a incremental search(numerical method) program using python!

Member Avatar for Zeref
0
102
Member Avatar for etypaldo

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 …

Member Avatar for Clotoss
0
365
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
983
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
652
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
584

The End.