14,948 Topics

Member Avatar for
Member Avatar for ryan461

I'm testing to get my python script to still run if the smtp server it uses went down. I have a local mail server im testing this with. The issue is when testing it, i get a large spew of text. It checks all its libraries and such, untill its …

Member Avatar for ryan461
0
373
Member Avatar for MoosePaste

I am beginning to write a tkinter program that will generate a DnD 3.5 Character Sheet. I haven't gotten very far. I'm using Python 3, and for some reason the sticky option of the .grid() method isn't working. When I run the code below, I get an error that says: …

Member Avatar for woooee
0
10K
Member Avatar for vlady

Hello, pls can somebody have a look at my script and tell me why I can't get a value from d1? (print d1). Thank you for help. here is a script: [CODE]def subtract(): d1=file1(filename) dd2=file2(filename) res = dict() print d1 ## for key in d1: ## if key not in …

Member Avatar for woooee
0
1K
Member Avatar for NekoChan

I suggest it's just a simlpe tiny thing that has to be done to solve this but I simply can't figure it out! I hope anyone can help me. Here's what I koppied from a learnbook for python. >>> secret = 1337 >>> guess = 0 >>> l = 0 …

Member Avatar for NekoChan
0
816
Member Avatar for SgtMe

Say I have a file structure that looks like this [CODE]root folder/ main.py -folder a -script.py -folder b -img.png[/CODE] How could I load the img.png file from script.py? Should I just have a function in main.py that gets the path of the root folder, and then tac the 'folder a' …

Member Avatar for SgtMe
0
97
Member Avatar for MrAlshahawy

Hi all , I'm new here and new in Python for symbian ; I hope I'm asking in the right forum and the right section. What python provides to switch off mobile functions that consumes battery , How turn off BlueTooth , Wifi , GPRS , Vibration and Ringing ?? …

Member Avatar for jcao219
0
58
Member Avatar for TrustyTony

Do you know that there is clean way of doing what C-language ternary operator ? does in Python's recent versions. It is if with special twist. The syntax is: [CODE]'The value if true' if <condition> else 'Value when false'[/CODE] Values can be any type. You can put this structure to …

0
989
Member Avatar for Robertbra

Hallo ... I am very new to Python programming & I have this Question ... I am asked to write a program to calculate the No. of words & the length of each (letters) in this sentence : (An Oligonucleotide is a short segment of RNA or DNA, typically with …

Member Avatar for TrustyTony
0
111
Member Avatar for pratz

I have just started learning python, I am a Java programmer. I think python is more simple than java. What I wanted to ask is, where is python used? And if python does not follow the complete OOP concepts, then can it be used to design large / major applications? …

Member Avatar for snippsat
0
244
Member Avatar for tzushky

hi everyone, I have a tiny problem with a simple implementation: - i have a main window with a table in my central widget - i want to add stuff in the table gradually, and I allow only the 1st cell (index 0) of each row to be selectable. - …

Member Avatar for woooee
0
800
Member Avatar for Tech B

I want to improve my programming skill and decided to build python wrappers over other library's. I've done this with the face recognition and think it would be real world code for me to work on. I want to code as a career and I want to code stuff programmers …

Member Avatar for woooee
0
129
Member Avatar for Elthalion

Hi, i'm new to Python and i'm currently following the "How to Think like a Computer Scientist" tutorials. I'm at Chapter 4: Conditionals and doing the last exercise where i need to create six colored houses on a black background. I've successfully created the house at the bottom left, but …

Member Avatar for Elthalion
0
175
Member Avatar for lsmurfl

Alright i need help computing random dates and i have to use lists. this is what the program should do program must print out the following output: 1. The complete list of birthdays that you generated. 2. The birthday that was generated twice (printed separately from the list). 3. The …

Member Avatar for vegaseat
0
105
Member Avatar for MaxVK

Hi. I have a wxRichtextCtrl (although plain text is fine if I can find a way to do this), and I would like to return the last word typed while the user carries on. You know that way MS Word and OpenOffice etc, highlight a wrongly spelled word as soon …

Member Avatar for MaxVK
0
149
Member Avatar for dbphydb

Hi, The below code extracts the branch number and the test environment to deploy that particular branches build on from a txt file (branch_dest.txt). Then it parses HTML pages to reach a webpage which contains some checkboxes. I want to check the "Select/Deselect All" checkbox and then click the "Deploy" …

Member Avatar for Tech B
0
2K
Member Avatar for alakaboom1

So, I'm not sure if this is possible, but I'm in a situation where I need to do such or something similar. I'm designing a multi-level game, where the game goes on to level 2 once the player comes into contact with the door at the end of level 1. …

Member Avatar for TrustyTony
0
132
Member Avatar for Tech B

I'm revisiting an old IR tracking project, and want to use it in a blender game. I would like to know if anyone could help optimize the parsing algorithm or tell me an easier way to track multiple points with code. "im" is an instance of an image I captured …

Member Avatar for TrustyTony
0
204
Member Avatar for lsmurfl

Ok if anyone knows how to do python programming please help, this is my last assignment and i cant figure out how i should start this here are the directions... You are to write a Python program that randomly generates birthdays – considering only the month and day. For example, …

Member Avatar for griswolf
0
252
Member Avatar for hondros

I have created a program, and wanted some critique on it. There is a website that I go to in order to download roms, and I do not like clicking a ton of links and waiting 15 seconds to download it, so I created a program to fetch it for …

Member Avatar for hondros
0
127
Member Avatar for SoulMazer

Okay, I am writing a script that might be impossible to fully explain in words. Therefore, I am going to come up with an example that shows the same problem, so please do not tell me to simply combine the scripts or anything, as I am unable to. Anyways, I …

Member Avatar for SoulMazer
0
121
Member Avatar for sravan953

Hey All, I have 'Py-mailer' here.... here's how it is so far: [code='python'] import smtplib import wx window=wx.App() class pymailer(wx.Frame): def __init__(self): wx.Frame.__init__(self,None,-1,"Py-mailer",size=(900,700)) self.panel=wx.Panel(self,-1) menubar=wx.MenuBar() filem=wx.Menu() filem.Append(201,"Quit") self.Bind(wx.EVT_MENU,self.Quit,id=201) viewm=wx.Menu() viewm.Append(202,"About") self.Bind(wx.EVT_MENU,self.About,id=202) menubar.Append(filem,"File") menubar.Append(viewm,"Help") self.SetMenuBar(menubar) wx.StaticText(self.panel, -1, "Login ID:", pos=(10,10)) wx.StaticText(self.panel, -1, "Password:", pos=(10,40)) self.username=wx.TextCtrl(self.panel,101,"Login ID",pos=(100,10)) self.password=wx.TextCtrl(self.panel,102,"Password",style=(wx.TE_PASSWORD),pos=(100,40)) wx.StaticText(self.panel, -1, "@gmail.com", pos=(220,10)) …

Member Avatar for baki100
1
1K
Member Avatar for Syphilis

What's Up? OK, So I have a working python script that sends and receives text to and from the client and server python files, However if the Server and Client are on different computers, And therefore we need to connect over the internet, How would we do that? New to …

Member Avatar for SoulMazer
0
97
Member Avatar for QueryPoser546

I've read in data from a file using a GET request through a browser data= open(path) data2= file.read() return data2 and returned it to the console just fine. how do I post this same data to the browser I used as a client for the GET request? socket.send(<htmlcode here>)? what …

0
24
Member Avatar for keshav magge

I am trying to catalog mysql database items in a plone site using python. The function that catalogs the SQL query results takes 2 arguments. First is the item returned by the query (for example Select * from books would return many book objects) and second argument is the string …

Member Avatar for vegaseat
0
1K
Member Avatar for nezbo

Hello there, i've been searching the web and a few books for the last days with this (simple?) problem and only ended up fairly confused. the scenario: me and my friends are learning python while/by writing a little game together. My current problem is conserning getting the items (from classes) …

Member Avatar for nezbo
0
194
Member Avatar for hittmann

using graphics in python how am I able to contain a movable object within set bounds eg a ball with obstacles that it will not pass through. I can produce the ball and obstacles but the ball passes right through the obstacles :(

Member Avatar for vegaseat
0
25
Member Avatar for larsen182

Hi guys:-) I have no experience in programming, and i realise that asking for someone to write an entire programme for me might be a stretch, but unfortunately i havent got any mates that are good at programming. I think the program i need is fairly simple once you know …

Member Avatar for larsen182
0
203
Member Avatar for helios0684

Alright, let's try this again. I've started over from scratch and we have got the basic functions working. Everything so far has checked out, but I am still trying to get it to pull the right credentials. I can get it to pull one of the rows out of the …

Member Avatar for woooee
0
293
Member Avatar for toadzky

I am writing a script to rename and reorganize the mp3 on my iPod. For those who don't know, if you drag and drop your music from the iPod to a computer, there is a crazy F## folder structure and all the names are 4 random characters. I want to …

Member Avatar for TrustyTony
0
180
Member Avatar for mesuge6666

I have some random text like: [CODE]>>>text= \ """import sys n = int(sys.argv[1]) ;;print "blbalbalbalabllalbaa" replace me i in range(1,n) {print "numbers:";;replace me j in range(1,3) {print j} ;;print i ;;replace me k in range(1,3) {print k} ;;print "end!"} replace me n < 5 {print n ;;print "youragenious"} """[/CODE] i'd …

Member Avatar for griswolf
0
118

The End.