15,175 Topics
| |
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 … | |
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. | |
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 … | |
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 = … | |
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 … | |
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 … | |
[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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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 | |
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. | |
(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 … | |
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 … | |
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 … | |
I tried to find the square root of a negative number while writing a function to solve quadratic equations but the interpreter said something , it said math domain error, what does this mean. Even though I've been able to solve the quadratic equation using complex numbers and i will … | |
Hi all, I have the following script for creating scatter plots and I was wondering if there is a way of adding the legends also for each dot in the plot (i.e. Method1, Method2 etc) [code] #!/usr/bin/env python import sys,re,os; import matplotlib as mpl; import matplotlib.pyplot as plt; datafile = … | |
I've been looking for an exercise book for Python, a book that we get some stuff to code, like ideas, and etc. I have already finished the "Invent your own computer games with Python". Is there any other book? Thanks in advance. | |
I want to open a process in the background and it should be invisible in both Linux and Windows. I made something like this, but I don't know the console still appears on the screen: [code] command = "cmd /C dir c:\\" startupinfo = None if os.name == 'nt': startupinfo … | |
I just recently (one week ago) started learning Pyton. I'm using 2.7 as I heard that is best for begginers. I am also following a manual, which is really helpful! The one problem with manuals is that it's very easy to just type whats written and not understand it at … | |
Well just run, the only thing is that this is created using python 3.x. no modules required. | |
Is python 3.2 stable yet, because i use portable python v1.1py3.0.1, so far I'm making improvement, but I have problems loading modules, how do I go about it. | |
Please i just downloaded the latest version of pygame, but I've been finding it difficult to install, okay when i unpacked it, everything came up, but i don't know which should go to which. Python experts in the house what do i do. | |
I'm trying to create a vertical histogram using only built-in modules. I understand the current histogram function isn't truly a histogram (and the code is probably very ugly), but I'm totally lost on how to create a vertical histogram. [CODE]import itertools def histogram(s): print("Histogram:") print("%s %7s %12s" % ( "No.", … | |
[CODE]def main(): i=input() print(i+1)[/CODE] (I use PYTHON 3.2) Why i get an error converting message ? |
The End.