15,406 Topics
![]() | |
Hi All, I made a python ftp client on Windows XP which does binary get & put. The issue here is that when I do FTP manually the time taken to either GET or PUT is about half the time taken by my ftp client. Following is a snippet of … | |
I want to let users select a line of text by triple-clicking anywhere on that line. How can I use the API to support the feature? | |
Hi all, We are trying to talk through .NET web service to retrieve some data from a windows system. We are using Python and SOAPpy (which is SOAP compatible with python) for this. We are able to talk to the system using this web service and is also able to … | |
hi guys,when i run my program which contains the following portion of code in the mainloop Code: ( text ) [CODE] 1. clock=pygame.time.Clock() 2. while True: 3. sound1.play() 4. clock.tick(60) 5. pKeys = pygame.key.get_pressed() 6. Eves=pygame.event.get() 7. villian.face() 8. villian.hert() 9. if Eves[KEYDOWN] and pKeys[K_UP]: 10. hero.moveup() 11. if Eves[KEYUP] … | |
Expected Output Your goal is to be able to create a python script like example.py that will: 1. Read input.bin byte by byte 2. Convert the value of each byte in input.bin into a string 3. Save the output into a file output.txt For example, given an input.bin that contains … | |
I have an external app that writes out a very basic xml files that contains data that needs to be processed. For Example, one type of job would be a simple file copy. So in the XML file there would be (among other bits of information about the job) things … | |
I started this hangman game as a suggestion for beginners but now I am stuck. The code runs with out any errors but I need some way to put a certain amount of turns that the user can have but I am not sure how I could add this to … | |
Hello hello, I am writing to you because I am having trouble obtaining something: I know it should be doable, but can't seem to make an example. I need to be able to run scripts from another central script. And as i' ve been reading, apparently they mustn't be imported … | |
Greetings All, Here is my filled-out questionnaire from the original (pre-Comm. Intro. forum) thread: Name: James Nickname: Jimmy Height: 5'10'' Weight: 182 Hair: Brown Eyes: Blue Location: NC Currently, hoping to move pack to PA within a few years Age: 22 Hobbies: Listening to music, playing the video games, going … | |
Hey Everyone. New to the forum, and am a bit of a beginner in most of the scripting languages I know. But I drastically want to get better at python and maybe a few others. I live in Culver City, Ca, and am also on the look out for some … | |
I am using python 2.2 and want to make use of the library PyUsb. I tried a lot but couldn't get it right. Can anyone please help how to do that. | |
Hey there everyone I need a little help. Right now I am in the process of writing a program that uses subscripts and superscript but I dont have a clue how to get them. I am not even sure if they can be used in python so if any of … | |
Hi, I have a code that creates a class 'Person' : [ICODE] class Person: def __init__(self, fname, lname): self._fname = fname self._lname = lname def fname(self): return self._fname def set_fname(self, fname): self._fname = fname def lname(self): return self._lname def set_lname(self, lname): self._lname = lname def name(self): return self._fname + ' … | |
Hello All, Currently, I have a static setup between Server and Clients. Server IP is hardcoded into the configuration file, so that clients connect to the server using this configuration file. In our network there are many server machines that can serve these clients and balance the load. I am … | |
![]() | im quite new to python and have made a few programs to help me in school but i dont know how to compile them. i have found a tutorial and have copied the code correctly but python says that the 'import' syntax is incorrect. this is the code: [ICODE]from distutils.core … |
Any way to get info about the battery in a laptop? Like how many % is left, and for how long that will last? | |
![]() | i started learning python about a week ago. and have a understanding of essential python, i want to try design a visual game do you think i should start now or learn more if learn more what do you think i should learn and where could i learn it? |
I started trying to teach myself how to program in python just a few days ago. I have been using a wikibook for non programmers and it has this piece of code as an example. I CAN NOT for the life of me figure out why it outputs the value … | |
Hi everyone, I have a problem to insert text into a text widget in Tkinter. I want to be able that each time some text is inserted (by means of an action -not directly by the user-) that text is displayed into a new line. However I can't figure out … | |
hello pals, I need a help with using re module to search and convert uppercase words in a string to title case Eg: [code] mystr='Hello everybody. Some times THERE ARE upper case words' #Results should be 'Hello everybody. Some times There Are upper case words' [/code] Hope you can give … | |
Hi, I have a question about lists and tables... So far, i've managed to take a list and make a table like so: 23 764 12 54 83 2 543 890 1235 453 98 the list being [23, 764, 12, 54, 83, 2, 543, 890, 1235, 453, 98]. i need … | |
Hi Everyone, Currently, working on wxPython and Python projects . New to python, learning python day by day. Daniweb forum has been helpful to me to solve couple of issues with respect to Python programming. Would like to have exciting time with Python and Daniweb ! Cheers to all. | |
I am programming for the first time...trying to make a game in pygame. I need to know how to design a really good background. All I can do at the moment is draw lines and change the background colour. Please help!! I am making this for my boss and I … | |
Hi I'm a python beginner! I'm trying to make a list of 3 numbers per line but I get an error. =( Here's my code: [CODE=python]list2 = [23, 764, 12, 54, 83, 2, 543, 890, 1235, 453, 98] k = 0 while list2[k] != -1: first = str(list2[k]) k = … | |
Can python programs with GUIs (such as Tkinter) be embedded into web pages? I have looked into CGI programming before, but despite a search, I have found no books relating how to do this with python. Is it possible? Can anyone recommend a good book? If not, what would you … | |
Hi I'm a Python newbie! I hope my questions get answered on here and I'll try to answer anyone elses as I venture through the language of Python. I'm learning it in my class. | |
I am using this function to download files: [code=python]def download(url): urllib.urlretrieve(url, url.split("/")[-1])[/code] I am downloading files from a site, but I don't know the EXACT filename... All I know is the id for them... Example: download("http://site.com/files/489411/") When i am to do that, it automatically resolves the appropriate filename and it … | |
Hello I have written code using python and C extensions which performs object detection on 3D data sets. The code was originally developed under Linux and has since been used under Windows XP where I continuously get MemoryError crashes when assembling a list of 78566400 integers. There is nothing wrong … | |
ok i know i have posted the same request before but i am still completley stuck with where to go from what i have got so far. the program i have to do is basically a very simple atm program. the user has to enter a pin number between 1000 … | |
data='115Z2113-3-777-55789ABC7777' I have a string in the above format. I want to remove 'ABC7777' from it. If there are any characters other then numbers after the right most '-' symbol, then only the string preceeding it should be retained.i.e., '115Z2113-3-777-55789ABC7777' should be stored in data. 'ABC7777' should be stripped off. … | |
Hi all, I am writing a multi-threaded application in Python. On the client, there are 2 threads, a GUI thread that contains PyGTK functions, and a networking thread, which contains the listener loop below. The problem is this - If the server sends the client a large amount of commands … | |
Ok, I've got a newbish question that Google is turning up tons of different answers too....hopefully I can get some interactive input. I've been working in Microsoft shops doing web development for going on 10 years now. I'm very familiar with SQL Server and classic ASP, and that is what … | |
Hi, Absolute newbie to python,infact just started learning it from yesterday.... I have installed Apache2,mysql,php and an ecomm software(osCommerce) on to my ubuntu machine. I downloaded a tool -funkload based purely in python,installed it by easy_install method,searched for the egg file in site-packages and could run the demos. I have … | |
Hi python guys, I just started to dig in Python. I am new to this. I came close to Python when I got a project to be done with Django. I got stuck when I was fetching data from database(mysql). the data was fetched in variable 'rows' which have Id, … | |
hello everbody, can someone please help me, how do i turn a list like a=[0,1,2,3,4] into 01234 i tried for i in range (len(a)) print a[i], but thats give me 0 1 2 3 4 thanks, fabio | |
Is it posible to delay the program for a certain time period. I know in blitz basic you could type "delay 5" and at that spot in to the program theere would be a 5 second delay when you run it. Can you do that in Python??? | |
I'm still grappling with the concept of passing parameters and returning responses. See code below: [CODE]#Measurement Converter # Converts Common Chinese Units of Measurements (Practicing function return) # Convert "cun" to "inches" def cun_to_inches(cuntoinchesQ): cuntoinchesUR = None while cuntoinchesUR == None: cuntoinchesUR = float(raw_input(cuntoinchesQ)) cuntoinchesUR *= 1.31 return cuntoinchesUR # … | |
Hi, I have written a program in python, and am looking to translate it into c++ code, here is the program: import random # You've got to guess 4 numbers between 0 and 30, if you get it right the program will output "WINNER" and tell you the computer's numbers … | |
I have a router mamangement requirement that requires a log file to be uploaded to a tFTP server. I wanted to do this using a python script. I have not been able to find a tFTP open source library anywhere. Does anyone know the where-abouts of one? | |
I would like to collapse whitespace in a string of the followinf foramat using a some pre defined functionalities. XXXXX<space>-<space>XXXX shoud be converted to XXXXX-XXXXX XXXXX<space>-XXXXX shoud be converted to XXXXX-XXXXX Please help | |
Dear All, How to write Batch file to Replace Pythonpath in Environment Variables. regards Mani | |
Hi! I just started poking around with Python recently, and I decided to do a text-adventure game project to practice some of the core concepts. Trying to think of ways to go about it, I stumbled on this DaniWeb post: [URL="http://www.daniweb.com/forums/thread55140.html&highlight=python+text+rpg+tutorial"]http://www.daniweb.com/forums/thread55140.html&highlight=python+text+rpg+tutorial[/URL] Gave me a lot of inspiration, and I took … | |
I have a problem guys. It's due to duck typing. Now I expected to run into something like this sooner or later, but I can't help but feel there's a better solution. [code=Python]import re def patternMatching(pattern, string): matchList = re.findall(pattern, string) print '\n'.join(['%s' % v for v in matchList]) [/code] … | |
Hi everyone! I'm new here, so just letting you know that. Anyway. I'm currently writing somewhat of a game in pygame and had a few questions for anyone who would be able to help me. I have created a python program that moves and object in a window, and I … | |
hi friends! i was searching for a base conversion script in python when i was stumped with the following code snippet [code language=python] >>> number = 1000 >>> hex2bin = {"0":"0000", "1":"0001", "2":"0010", "3":"0011", "4":"0100", "5":"0101", "6":"0110", "7":"0111", "8":"1000", "9":"1001", "A":"1010", "B":"1011", "C":"1100", "D":"1101", "E":"1110", "F":"1111"} >>> "".join([hex2bin[h] for h … | |
Hello, I am a new user to programming and to python. I have been trying to program for a while now, yet have been extremely busy for the past few months, and have done the minimum amount of work every day. But, I hope to be able to further my … | |
if i have a string e.g. string = "Hello\nWorld" and do list = string.split() '\n' would be ignored how can I preserve '\n' when splitting strings..? Thanks | |
Sorry to have to post two consecutive questions for other people to help me with, but I'm having a problem with winsound that I simply can't figure out. I've checked all the documentation I could, but there's no answer. The problem is with SND_PURGE. [quote=Python Library Reference]SND_PURGE Stop playing all … | |
[code=python]Y=1 N=0 cont=Y print "Welcome to SCLMIP(Simple Calculator For Linux Made In Python)" while cont == Y: equation=input("Equation: ") print equation cont=input("Continue? (Y,N)") else: print "Exiting..." [/code] If you type 5/2 you get 2, I want it to display 2.5. A workaround is typing 5.0/2.0, but it gets annoying. I … | |
I just registered here on this site. It seems a nice place to be;) Just before writing these lines i poked around here and read some of the tuts and looked into some fora. I'm somewhat of a programming layman, started sometimes long ago but focussed then on other things. … |
The End.