15,190 Topics

Member Avatar for
Member Avatar for rogwar

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

Member Avatar for rogwar
0
261
Member Avatar for sneekula

Draw a group of shapes on the Tkinter GUI toolkit canvas and animate the group using the common tag names.

1
5K
Member Avatar for mcroni

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 …

Member Avatar for Gribouillis
0
338
Member Avatar for mark103

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 …

Member Avatar for Gribouillis
0
277
Member Avatar for david.nicely.393

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 …

Member Avatar for sneekula
0
133
Member Avatar for Chtaylor5201

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 …

Member Avatar for Gribouillis
0
116
Member Avatar for Diellza

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 …

Member Avatar for vegaseat
0
446
Member Avatar for cjohnweb

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". …

0
129
Member Avatar for mark103

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

Member Avatar for Gribouillis
0
206
Member Avatar for fatalaccidents

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 …

0
146
Member Avatar for Muhammad_69
Member Avatar for sneekula
0
110
Member Avatar for Diellza

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

Member Avatar for Diellza
0
243
Member Avatar for 4m1nh4j1

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 …

Member Avatar for vegaseat
0
2K
Member Avatar for cjohnweb

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 …

Member Avatar for Gribouillis
0
1K
Member Avatar for Ed_3

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 …

Member Avatar for vegaseat
0
175
Member Avatar for joustwilliams

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 …

Member Avatar for vegaseat
0
2K
Member Avatar for alina.nazchowdhury

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

0
194
Member Avatar for valestrom

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 …

Member Avatar for valestrom
0
315
Member Avatar for vegaseat

Just the very basics on how to draw a rotated text using the Python GUI toolkit PySide (public PyQt). Please experiment and embellish.

Member Avatar for vegaseat
2
2K
Member Avatar for alexamicaa

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 …

Member Avatar for sneekula
-3
490
Member Avatar for satyanani40
Member Avatar for silverdust

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 …

Member Avatar for vegaseat
0
2K
Member Avatar for Ravi_exact

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

Member Avatar for sneekula
0
4K
Member Avatar for samuel1991

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 …

Member Avatar for samuel1991
0
654
Member Avatar for telmo96

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 …

Member Avatar for sneekula
0
3K
Member Avatar for Chtaylor5201

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 …

Member Avatar for vegaseat
0
424
Member Avatar for sneekula

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 …

Member Avatar for vegaseat
0
2K
Member Avatar for fonzali

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

Member Avatar for fonzali
0
340
Member Avatar for psichoman5

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

Member Avatar for vegaseat
0
258
Member Avatar for fatalaccidents

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 …

Member Avatar for vegaseat
0
490

The End.