14,952 Topics

Member Avatar for
Member Avatar for alagez

Hi there, I am planning to create one robot choosing center. But I do not know how to use the idea to execute in python software. my idea is, let say a customer wants to choose a robot how to use the rule below to execute in python: IF the …

Member Avatar for alagez
0
275
Member Avatar for abaddon2031

I have a python code that reads several csv files and writes teh data to a single file but every time it loops back around to the next file it prints the headers again. Is there a way to stop this I can post my code if it is nessisary.

Member Avatar for abaddon2031
0
281
Member Avatar for Spencer_3

Hello I'm currently working on a Interface for fun as a side project using Tkinter. I was wondering if anyone had a small code for a password and shutdown button I do have the button however it doesnt shut down the program. the password has a text box and is …

Member Avatar for Spencer_3
0
1K
Member Avatar for Nafisa Morsalin
Member Avatar for reham.mostafa.14268

I have two text files and I want to compare them and save the matched columns to a new text file. file1: 114.74721 114.85107 114.85107 2.96667 306.61756 file2: 115.06603 0.00294 5.90000 114.74721 0.00674 5.40000 114.85107 0.00453 6.20000 111.17744 0.00421 5.50000 192.77787 0.03080 3.20000 189.70226 0.01120 5.00000 0.46762 0.00883 3.70000 2.21539 …

Member Avatar for vegaseat
0
488
Member Avatar for aditya369

Hello all, please help me in writing a tic-tac-toe python program which actually learns as it plays with the user. So, starting as a dumb opponent, the program should be able to learn from the games being played against the user and evolve as a clever opponent it plays along... …

0
165
Member Avatar for begueradj

Hello How can we know which GCC version is compatiable with a given Python version ? Regards

-1
124
Member Avatar for John A.

Hey guys, this is my first project since I completed [CodeAcademy's](http://www.codeacademy.com) Python course yesterday. Besides that course, this is my first time programming and I would really appreciate input on my program. I decided to create a database to help me keep track of the anime I watch. For this …

Member Avatar for Gribouillis
0
398
Member Avatar for crebs

I have this code that works well. It works in a way that I have to type a function such as soccer for the games.soccer module to be active then i can type a query such as 'latest scores', again after i close this then type autocare for this to …

Member Avatar for John A.
0
154
Member Avatar for trade19

python3 Hi I am trying to compare these two (strings) of numbers. There may not be a space inbetween the numbers in the file, but here its just for clearity. I want to take the value of 40 and compare it with 14 then 18,35 and so on until 54 …

Member Avatar for trade19
0
408
Member Avatar for heycooldude

Hi, I want to send back reply to the same email but with different email account. Here is my script mail = outlook.Session.GetItemFromID(ID) subject = mail.Subject if mail: message_reply = mail.Reply() message_reply.From='_from_email' #not working message_reply.Body = "THE FOLLOWING TASK HAS BEEN MARKED AS COMPLETED: \n\n" message_reply.CC= '_CC_Email' message_reply.Send() I tried …

0
155
Member Avatar for GKAB

Hi All Dears, I hope this finds you well! Im a new Python learner. My aim is to use a script that will fetch any web site news. I came across URLLIB & URLLIB2 Anyone to kindly provide a guide on how to do this? In advance thanx alot!

0
74
Member Avatar for navi2582

I am trying to toggle between the two toolbars (in two different panes) and couldn't do it with the code below. Not sure where the problem is.... I should only see "Page number" details when I click on "Read/Write" and "Hello world" when I click on "Write". Any ideas are …

0
184
Member Avatar for kxjakkk

My Rational class code: from __future__ import division import math as _math def _gcf(a, b): # Returns the greatest common factor of a and b. a = abs(a) b = abs(b) while b: a, b = b, a % b return a class Rational(object): def __init__(self, numerator=0, denominator=1): # Contructs …

Member Avatar for Schol-R-LEA
0
300
Member Avatar for abaddon2031

Ok i had this in another question i asked yesterday and now im posting it in its own thread. I have a code that is supose to read files that are sent to me daily and after they are read i need to have them moved from their origional folder …

0
123
Member Avatar for abaddon2031

Hello I am new to python coding and have a couple of things that I could really use some help on. I need to move some sor files from one folder to another and to add a date and time to the facts sheet that it produces if any one …

Member Avatar for abaddon2031
0
306
Member Avatar for reham.mostafa.14268

I have a 2D contour plot and I want to fit it with 2D Gaussian. This is the script I used to plot the 2D contour. import numpy as np from pylab import * from scipy.stats import kde x = np.genfromtxt("deltaDEC.dat",delimiter="\n") y = np.genfromtxt("cosDEC.dat",delimiter="\n") n = len(x) H, xedges, yedges …

0
102
Member Avatar for kxjakkk

Python keeps getting stuck on this line because there is no attribute "numerator" (and I'm assuming it'd say it has no attribute for denominator either). third = Rational(25, 10) print ("third: 0/1".format(third.numerator(), third.denominator())) For my Rational class, I've got def gcd(a, b): if b == 0: return a else: return …

Member Avatar for Schol-R-LEA
0
624
Member Avatar for Siberian

Hi, I didn't know where to place this thread :) Any recommendations for an IDE app to save snippets of code within the program, I looked online, and there are many options, too hard to pick ! :)

Member Avatar for Siberian
0
323
Member Avatar for navi2582

I am trying to toggle between the two toolbars and couldn't do it with the code below. Not sure where the problem is.... Any ideas are very welcome!!! Here is the code: `Inline Code Example Here` import wx import wx.grid import wx.html import wx.aui from time import * import cStringIO …

0
174
Member Avatar for haze man

Hi guys i have been making this solor system simulator in python. I have added four planets and now I am trying to make it look a little nicer. What i am have trouble with is setting the background colour to be black (to give more spacey feel). But what …

Member Avatar for vegaseat
0
893
Member Avatar for alagez

Hi there, I am interested in phone selection by using if..else statement. so after viewing the phone specification we can select the phone and purchase that. so do you have python sample codes for that? a rough idea is enough. Thank you. and python is really interesting.

Member Avatar for Schol-R-LEA
0
255
Member Avatar for Diego_4

Do you know if I can change of line in a list of lists? tareas = [] > otraTarea = [tarea,year,month,day, hour, minute, second, microsecond,str(cuando),cuando] `+'\n'+ []`(this is what i have tried) #I have tried to concatenate two lists, but the program returns a message, in which it's explained that …

Member Avatar for TrustyTony
0
318
Member Avatar for foshan

I got this code from the internet. import random #create a sequence of words to choose from name = ("stephen","bob", "robert","craig") # pick one word randomly from the sequence word = random.choice(name) #create a variabe to use later to see if the guess is correct correct = word # create …

Member Avatar for foshan
0
195
Member Avatar for happycodingdude

Hello there, I am currently working on a indepedendent project and I am realtively new to Python. Please note that this question revolves around Python version 3. But if you have a answer in Python 2 just write it down and tell me it is in Python 2 thanks. What …

Member Avatar for iamthwee
0
316
Member Avatar for danielki

Hello, I am new to python and I am trying to do this task but it looks that I am missing some things which is not visible to me can any body help me see those mistakes I am making and suggest how I should restracture my code if needed? …

Member Avatar for David W
0
533
Member Avatar for Yozuru

Hello good people I am working on a caeser cipher program for class. However, I ran into a problem with my outputs. Up to a certain point for example: two('y', 'z') Would give a '\x92' output instead of a 'x' output. Currently this is my code so far: def chartonum(ch): …

Member Avatar for Yozuru
0
285
Member Avatar for navi2582

Hi, I am new to wxpython and trying to develop a small GUI interface (shown below). User selects a python script from "Browse run script" and when he/she hits the button "Execute RunScript", the script should execute via aardvark i2c interface. But I am not sure why it's not getting …

Member Avatar for Gribouillis
0
440
Member Avatar for TrustyTony

Here is simple text file example for beginners, using try..except for reading old content as it may not yet exist.

Member Avatar for TrustyTony
1
465
Member Avatar for come_again

Hello, I am relatively new to python and I am tryin to create, or better yet, find a text editor/box which displays simple html text/formatting and allows me to modify it (without having to deal with the html directly). For example in the text box you might find this: 1. …

Member Avatar for come_again
0
310

The End.