15,190 Topics
![]() | |
Hi everyone. I have question and i hope someone will be pleased to help me. I am trying to write a python script which can extract data from a file (Iter.dat) and then put data in a tableau like the out.dat file. Here is what i wrote: f = open('Iter.dat', … | |
Draw a group of shapes on the Tkinter GUI toolkit canvas and animate the group using the common tag names. | |
hi, have already written a GUI program on a different Pc, i copied the py file unto a new pc to continue with the building,i have installed all the necessary modules but it gives an error when i run it. Traceback (most recent call last): File "C:\Python34\aaaa.py", line 2, in … | |
Hi all I have got a problem with the list of strings. I have got the full list of strings, but I can't be able to print for each string which I can only print for the full string. When I use this: programList = list() # set the channels … | |
Need help with writing an algorithm: Department Store Sale! Prompt the user to enter the sticker price of each of the clothing items they’re purchasing (make sure all input prices are positive). The user should be allowed to purchase as many items as he or she would like. For each … | |
How do I change my inputs simple and compound with two decimals behind them? n = 5 rate = 0.05 for n in range(0, 3): principal = 10000 for n in range (0,6): principal <= 15000 simple = principal * (1 + rate * n) compound = principal * (1 … | |
I have wrote this code but it shows me only the timing not the values, can any bady tell me where is the problem? import time import random def procedure(): time.sleep(0.60) # measure process time t0 = time.clock() procedure() print time.clock() - t0, "seconds process time" #BUCKET SORT (up to … | |
Hi there! I've googled around, and can't seem to find an answer to this question: How do you check if UART# has already been enabled or not? And what I mean is, I need to be able to get into python and say "If uart1 is not enabled, enable it". … | |
Hi guys, I'm created the variables in the loops to generating the list of values and channels, I want to use the variable outside of the loop so I can get the list of values. I have a problem with get the list of values. When I try this: # … | |
Hello all, I was curious as to how run many jobs serially on a Cray XE6 machine. You usually qsub things with a ccmrun (for a serial job) or an aprun (instead of mpirun or mpiexec). I first wanted to use the Pool() function, but due to it not being … | |
I want to know hot to move 4 circle in python according to the dice roll. | |
have problem with understand how to resolve error in my code. Here it comes: def counting_sort(some_list, max=100000): licznik = [0] * (max+1) for x in some_list: licznik[x] = licznik[x]+1 i=0 for x in range(max+1): for y in range(licznik[x]): some_list[i]=x i=i+1 return some_list.reverse() def gen(number, b=100000): some_list = [] return [some_list.append(random.randint(0, … | |
I am using python multiprocessing lib and I would like to reload a list of processes every x time. In other words, when the configuration is modified, all processes should read it again. def get_config(self): from ConfigParser import SafeConfigParser .. return argv def sched(self, args, event): #schedule instruction: schedule.every(0.01).minutes.do(self.worker,args) while … | |
At work I am taking on some development stuff on the beaglebone black and I have to learn Python. I've had a blast so far!! So I'm trying to understand what some of the code is doing. I have a sample script that opens a port and listens for connections … | |
I have a task to create a GUI program that is a logger. This means it needs to be able to show a leaderboard, allow users to add personal information in a form (lots of input boxes), and allow the users to view their personal info. im using wxPython and … | |
Hello, this is my first post in this forum. I recently decided to try my hand at programming with python. I'm completely new to programming so I thought I should try some simple projects to reinforce what I've learned so far. I saw a post from 3 years ago on … | |
Dear, All Viewers I need your help guys I need to convert the python Asterisk Gateway Interface (AGI) PHP or Java or Perl Asterisk Gateway Interface (AGI), Please if anyone know about it help me ASAP, I wait for your feedback guys. Thanks here is Code... asterisk.py code is below: … | |
My program is supposed to replace all sets of 4 spaces with a tab but it only seems to be editing the first line then skipping the rest of the lines. "work_string" is defined via another function which takes and saves an entire files input into one string. I just … | |
Just the very basics on how to draw a rotated text using the Python GUI toolkit PySide (public PyQt). Please experiment and embellish. | |
I have no idea how to write in Python. Please help me with this! Best answer if you write the program! Central Limit Theorem I Goal Write a python program that will use your accept / reject Monte Carlo algorithm to demonstrate the central limit theorem. Recall: The central limit … | |
I have this as my major code #!/usr/bin/env python # # @author: Joseph Rex # @website: http://josephrex.me # @repository: http://github.com/bl4ckdu5t/registron # # # import sys, webbrowser from PyQt4 import QtGui, QtCore from ui_registron import Ui_MainWindow try: import pyttsx except ImportError: raise ImportError, "pyttsx module is required for speech features of … | |
How to replace only 1d values in 2d array after filter using numpy in python without loop i.e in pythonic way. I want to filter only t2 rows and replace values in second column ( middle column ). example: `>>> x = np.array([['t1',10,20],['t2',11,22],['t2',12,23], ['t3',21,32]])` >>> x array([['t1', '10', '20'], ['t2', … | |
Hi all, my question is as follows: If I use the code as below: text = '中文' #Text is in Chinese, whereby text = 'chinese' with open('file.txt','w', encoding = 'UTF-8') as f: f.write(text) f.close() My file.txt on Windows notepad will show it as saved as UTF-8. However, if the text … | |
Hey ya guys, it's my first topic on DaniWeb, sounds like a good place to find help with programming. :) Today I'm trying to compile a simple code made for PyQt4 using cx_Freeze, but I'm getting an error, I'll show you all the codes: [B]example.pyw[/B] [CODE]import sys from PyQt4 import … | |
Can someone give me an idea on how to get started on this program? I have been having problems on this for a week and cannot get started. I understand this in visual logic but cannot get the total amound to print. Can anyone walk me through this or show … | |
I have a tkinter program like the one below (for example) and want to create an executable file using module cx_freeze. I am using Python33 and Windows7. # Tk_circle2.py # draw a circle with given center (x,y) and radius # tkinter normally needs a specified square try: # Python2 import … | |
hi , last night I downloaded pyzo package on my ubuntu 14.04 system , I just do not know how to get it working . any help is appreciated | |
I dont know how to convert a matrix of 10x10 into 4 matrices of 5x5, for example: [[10, 11, 12, 13, 14, 15, 16, 17, 18, 19], # matrix 10x10 [20, 21, 22, 23, 24, 25, 26, 27, 28, 29], [30, 31, 32, 33, 34, 35, 36, 37, 38, 39], … | |
Hello all, I was writing code that was supposed to spawn multiple jobs from a sqlite DB and my first idea was to implement the multiprocessing Pool function. I'm not sure if this question would be better suited somewhere related to shell scripting, but I'm not sure how to call … |
The End.