15,185 Topics

Member Avatar for
Member Avatar for dare599z

Hello all, I'm taking a intro computer science course, yet somehow I'm much better at c++ than python. My professor is essentially useless. Can anyone show me how to let these variables persist into global scope? I assumed declaring them globally would make them persist, yet it appears to not. …

Member Avatar for dare599z
0
184
Member Avatar for Emred_Skye

Hello, I have a python script that deletes a line of a text file when the number in the second column is greater than or equal to 5. So my input file is three columns: [CODE]1 3 aaa 2 3 aaa 3 6 aaaaaa 4 2 aaa[/CODE] [CODE]def filter(in_file, output): …

Member Avatar for Emred_Skye
0
187
Member Avatar for Zaffron

Alright, so I'm trying to make a text rpg for proof of concept purposes, and I've hit a wall. My problem, which may be deeper than I hope, lies within class instance referencing. I have a chest class where it fills the chest with a random amount of items. This …

Member Avatar for woooee
0
454
Member Avatar for e-papa

HI everyone, I'm a month old python programmer that really loves anything sound, and will like to know how i can use python to create Audio software. What are the tools needed, the platform, the pros, the cons. Thanks in advance.

Member Avatar for e-papa
0
163
Member Avatar for adam80

Hi Experts, I am working on the project that is going to be complate in some days. I want to limit trial usage of program for 1 month. I am succeded to do it. If trial period expired the program doesnt work and prints warning messages. I want to add …

Member Avatar for adam80
0
2K
Member Avatar for avinash_545

Dear All, I am working on an assignment. I am using graphics.py to draw polygons and so on. My problem is that I have to get the pixel color under getMouse() or just get that pixel color. Can you all please help me with it.

Member Avatar for TrustyTony
0
100
Member Avatar for vegaseat

The tkSnack sound module was developed at KTH in Stockholm, Sweden. A great module to generate sound, play and analyze sound files and speech. It was written using Tkinter and its native TCL language. Alas, the latest release is from 2005. However, the important file tkSnack.py can be converted to …

Member Avatar for vegaseat
2
4K
Member Avatar for Rockpile

Hello, is this a bug? I get different results when I run this from command prompt and IDLE. [CODE] name = input('Hello what is your name: ') print('Hello ' + name + '.') [/CODE] From IDLE, it works correctly. The result shows as Hello Bob. If I run the program …

Member Avatar for vegaseat
2
445
Member Avatar for Daima

hello everyone (: I am learing python about now for 1 months and i am busy to make a autologing script with a post function. But i am stuck ): the login part is working but i cant get the post function to work.. Can someone look to my script? …

0
37
Member Avatar for rssk

Hi all... I am trying to upload 4 files on a local disk, onto a remote ftp server. All of them are in the same folder(in local machine). I am using the storbinary function of ftplib. Following are the file sizes: 1-- 70 KB 2-- 60 KB 3-- 73 KB …

Member Avatar for rssk
0
877
Member Avatar for Voidz

Hi DW(DaniWeb) - I hope that's the correct term, since I'm a total Python/DaniWeb noob. I [B]think[/B] Python doesn't have a RE(Runtime Environment), but Python has the option for one. [URL="http://www.python.org/download/"]http://www.python.org/download/[/URL]. So, basically what I want to know is, do you [B]have[/B] to have a RE(Runtime Environment) or anything like …

Member Avatar for TrustyTony
0
1K
Member Avatar for pink_872

I am trying to construct a function called maxSquare. In which it takes a list of integers X and returns Xi with the maximum square value, without using loops. [U]Sample Input/Output[/U] >>> maxSquare([5, ‐7, 3]) -7 If you coul help me with this, I would appreciate it. Thanks in advance.

Member Avatar for TrustyTony
0
87
Member Avatar for sarabb

HI, I am trying to write a script to find some mp3 file in some sites. But the code doesn't give any result. any help please ? [CODE]#!/usr/bin/python import sys,os, re, urllib2, socket ,string if sys.platform == 'linux-i386' or sys.platform == 'linux2' or sys.platform == 'darwin': SysCls = 'clear' elif …

0
61
Member Avatar for xxhellothere

Hello everyone, i currently trying to write a program that will locate a hyphen in a date in the format YYYY-MM-DD this is what i have so far [ICODE]date = str(raw_input("Enter a date in YYYY-MM-DD format: ")) i = 0 while i < len(date): if date[i] != "-": i = …

Member Avatar for jice
0
158
Member Avatar for woooee

Giudo Van Helsing today announced that the use of a main() function in Python will now generate an error. After stating that "Python is not C" he went on to say that for backward compatibility the programmer can import a module for programs already using main(). "...and since the people …

Member Avatar for griswolf
0
188
Member Avatar for group256

Dear everyone, I'm trying to implement something like gmail conversational view and the way I've designed it is that I store "subject" of the mail + other parties email address (in case you send, other party is recipient, and in case of receiving, sender is the other party). What I …

Member Avatar for group256
0
173
Member Avatar for TrustyTony

[URL="http://www.pyside.org/"]PySide[/URL]: Python for Qt 1.0 released! The PySide team is thrilled to announce the release of PySide: Python for Qt version 1.0.0. In addition to the source code release, project community packagers have already released binary packages [developer.qt.nokia.com] for all major Linux distributions, Microsoft Windows, Mac OS X, and Nokia’s …

Member Avatar for e-papa
2
416
Member Avatar for e-papa

We all know that the sum() function in python only takes two arguements, so i created a function in python that will take any number of arguements and add them together, just like the sigma letter in greek. Awaiting your replies on this one.

Member Avatar for e-papa
0
496
Member Avatar for Bazal

I am currently nearing the end of the final unit in my A - Level computing course in which we are developing a system for a company. My choice of system is a KML generator which creates placemarks with details on rescues. I have developed a working KML and GUI …

Member Avatar for Bazal
0
271
Member Avatar for Muro29

Hi there basically i am working on my year 12 project. my client is a company who takes orders from its customers, on a amstrad emailer phone. i need to develop a python program that automatically copies and paste's the caller number from the amstrad emailer to my main program …

Member Avatar for e-papa
0
78
Member Avatar for MUFC4life

Hello, i have to write a piece of code that allows me to open a txt file which then tells me the amount of each letter there is in the document. However i have this code which opens the document but instead of telling me how manu letters it lists …

Member Avatar for MUFC4life
0
123
Member Avatar for Atistus

I am having a little bit of trouble with loops. [CODE] mainTest = "Menu:\n(R)enter Numbers\n(O)dd or Even\n(S)um and Average\n(Q)uit\nWhat would you like to do?: " getInteger1 = input("Your first number?: ") getInteger2 = input("Your second number?: ") print mainTest while userInput != '': if userInput == 'r' or 'R': #This …

Member Avatar for TrustyTony
0
136
Member Avatar for EMT

Hi, In my python application I am importing my module from a xyz[B].[/B]dll. When I try to import my module from the xyz[B].[/B]dll the python shows error no xyz module found. But after [B]renaming the xyz.dll to xyz.pyd[/B] the same python code ([COLOR="Red"]without any change[/COLOR]) imports my module easily. The …

Member Avatar for TrustyTony
0
594
Member Avatar for danholding

input [CODE=python]import math print(repr(math.pi)) print(str(math.pi)) [/CODE] output [CODE=python]3.141592653589793 3.141592653589793[/CODE] could someone please tell me what the difference between [CODE=python]repr[/CODE] and [CODE=python]str[/CODE] is as the example on the documentation does not help as they both return the same figure? surely it does something more complex?

Member Avatar for vegaseat
0
1K
Member Avatar for jacksparrow01

how wud you write a code that wud convert a string of any input into a cool X formation for example if you had a string "names" how would you write it in the formation: [CODE][I]n n a a m e e s s[/I][/CODE] Or for example if you had …

Member Avatar for jacksparrow01
0
170
Member Avatar for e-papa

Please I downloaded the latest version of python QT but I've been unable to use because i don't know how, help from the experts in the house. Thanks in advance

Member Avatar for e-papa
1
873
Member Avatar for e-papa

It solves quadratic equations, for both real and complex roots. Please answer the pol to let me know how I'm doing. This function just needs the python 3.x environment, no modules needed.

Member Avatar for e-papa
0
4K
Member Avatar for ThePythonNoob

(Python code 3.0) I have been trying to make it that when you the number it will loop around, I tried this: If guess==num: #this is randomly generated number ask for yes or no the playagain if answer==yes replay=1 play_guess==0 if replay=1 play=("yes") however this does not work, please could …

Member Avatar for richieking
0
121
Member Avatar for Jerix

Hey, I'm trying to write a program right now with the following requirements: 1. Read a CSV file for field ID#. 2. Compare it to a second CSV file for the same ID # 3. If Csv1ID == Csv2ID, write the rows from both files to outputfile. So basically I …

Member Avatar for TrustyTony
0
503
Member Avatar for parijat24

Hi , I have interesting problem as I have a file 'A' which looks like [CODE]>BIG_CLUSTER96 ENSTNIP00000002777 TETRAODON8 1 [COLOR="Green"]105[/COLOR] 136 [B]Ank[/B] [COLOR="red"]NGCTPLHYAASKDRYEIALMLLENGADPNATD[/COLOR] >BIG_CLUSTER96 ENSTNIP00000002777 TETRAODON8 1 [COLOR="Green"]141[/COLOR] 169 [B]Ank [/B] [COLOR="red"]TPLHRASAKGNYRLIQLLLRQSASTNIQD[/COLOR] >BIG_CLUSTER96 ENSTNIP00000002777 TETRAODON8 1 [COLOR="Green"]172 [/COLOR] 202 [B]Ank [/B] [COLOR="Red"]GNTPLHLACDEERVEAAKLLVEHGASIYIEN[/COLOR] >BIG_CLUSTER96 ENSTNIP00000002777 TETRAODON8 1 [COLOR="Green"] 40 [/COLOR] 71 …

Member Avatar for TrustyTony
0
193

The End.