15,406 Topics

Member Avatar for
Member Avatar for dilbert_here00

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 …

Member Avatar for jlm699
0
97
Member Avatar for Miyuki

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?

Member Avatar for Scuppery
0
63
Member Avatar for somaraman

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 …

Member Avatar for somaraman
0
103
Member Avatar for joshuabraham

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

Member Avatar for jlm699
0
159
Member Avatar for programmingnoob

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 …

Member Avatar for jlm699
0
116
Member Avatar for FP101

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 …

Member Avatar for lasso17
0
135
Member Avatar for tweak

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 …

Member Avatar for tweak
0
101
Member Avatar for tzushky

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 …

Member Avatar for woooee
0
87
Member Avatar for jlm699

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 …

Member Avatar for zandiago
0
142
Member Avatar for FP101

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 …

Member Avatar for zandiago
0
75
Member Avatar for pravdexter

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.

Member Avatar for pravdexter
0
171
Member Avatar for Scuppery

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 …

Member Avatar for jrcagle
0
5K
Member Avatar for ymf

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 + ' …

Member Avatar for jrcagle
0
148
Member Avatar for adarshvp

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 …

Member Avatar for jrcagle
0
9K
Member Avatar for leegeorg07

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 …

Member Avatar for jlm699
0
105
Member Avatar for VelcroMan

Any way to get info about the battery in a laptop? Like how many % is left, and for how long that will last?

Member Avatar for VelcroMan
0
78
Member Avatar for leegeorg07

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?

Member Avatar for jrcagle
0
76
Member Avatar for cheesedoodle

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 …

Member Avatar for vegaseat
0
133
Member Avatar for TheOneElectroni

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 …

Member Avatar for TheOneElectroni
0
4K
Member Avatar for kasunc

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 …

Member Avatar for kasunc
0
296
Member Avatar for docaholic

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 …

Member Avatar for woooee
0
84
Member Avatar for adarshvp

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.

Member Avatar for zandiago
0
40
Member Avatar for ratperson

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 …

Member Avatar for ratperson
0
80
Member Avatar for Mazille

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

Member Avatar for Mazille
0
1K
Member Avatar for aot

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 …

Member Avatar for Jon Pierce
0
185
Member Avatar for Mazille

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.

Member Avatar for Mazille
0
35
Member Avatar for Shadow14l

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 …

0
85
Member Avatar for arkane

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 …

0
46
Member Avatar for muddpigeon

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 …

Member Avatar for teddies
0
229
Member Avatar for dinilkarun

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

Member Avatar for woooee
0
418
Member Avatar for brianez21

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 …

0
47
Member Avatar for edmicman

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 …

Member Avatar for sarehu
0
219
Member Avatar for ub007

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 …

Member Avatar for AceofSpades19
0
101
Member Avatar for Luckychap

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

Member Avatar for Luckychap
0
146
Member Avatar for linip

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

Member Avatar for bvdet
0
75
Member Avatar for megazear7

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???

Member Avatar for mengqing
0
487
Member Avatar for k.wiseman

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

Member Avatar for k.wiseman
0
123
Member Avatar for LaurenceB

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 …

Member Avatar for hacker9801
0
181
Member Avatar for rob spade

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?

Member Avatar for rob spade
0
121
Member Avatar for dinilkarun

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

Member Avatar for dinilkarun
0
236
Member Avatar for devstudio.2007

Dear All, How to write Batch file to Replace Pythonpath in Environment Variables. regards Mani

0
71
Member Avatar for k.wiseman

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 …

Member Avatar for k.wiseman
0
157
Member Avatar for Fuse

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

Member Avatar for paddy3118
0
138
Member Avatar for besktrap

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 …

Member Avatar for besktrap
0
107
Member Avatar for krazineurons

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 …

Member Avatar for krazineurons
0
157
Member Avatar for Tommy_101

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 …

Member Avatar for Freaky_Chris
0
84
Member Avatar for mengqing

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

Member Avatar for bvdet
0
107
Member Avatar for FreezeBlink

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 …

Member Avatar for Ene Uran
0
524
Member Avatar for Chris9999

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

Member Avatar for Ene Uran
0
84
Member Avatar for lilith2k3

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

Member Avatar for MakeMoneyOnline
0
132

The End.