15,175 Topics

Member Avatar for
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
172
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
486
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
269
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
122
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
589
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
Member Avatar for e-papa

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 …

Member Avatar for e-papa
0
19K
Member Avatar for bioplanet

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

0
103
Member Avatar for Ephexeve

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.

Member Avatar for Ephexeve
0
226
Member Avatar for vbx_wx

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 …

0
55
Member Avatar for mang0

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 …

Member Avatar for e-papa
1
158
Member Avatar for e-papa

Well just run, the only thing is that this is created using python 3.x. no modules required.

Member Avatar for e-papa
0
706
Member Avatar for e-papa

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.

Member Avatar for e-papa
0
911
Member Avatar for e-papa

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.

Member Avatar for e-papa
0
174
Member Avatar for joeywheels

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

Member Avatar for TrustyTony
0
1K
Member Avatar for sbiren

[CODE]def main(): i=input() print(i+1)[/CODE] (I use PYTHON 3.2) Why i get an error converting message ?

Member Avatar for richieking
0
172

The End.