15,181 Topics

Member Avatar for
Member Avatar for yinyang

[COLOR="Red"][B]Do I use php or ssh? [/B][/COLOR]If so, please tell me how because I haven't got a clue as to either of them. I'm just a singer who started learning to design one site from the past few months. my site is yummyrestaurants.co.uk. [B]I read this [/B][URL="https://www.google.com/webmasters/tools/docs/en/sitemap-generator.html#execute"]article on how to …

Member Avatar for radlinks
0
241
Member Avatar for sarfrazashfaq

Hi there I have following hash related code in Perl that i need to translate in Python if ( exists $legs->{$reference} ) { logg(" 2nd leg of swapes: $ref - merging"); my $swap = merge_swap_legs( $legs->{$ref}, $fields ); $ref = new_fk_ref( $fxall, $ref, $swap ); } else { $legs->{$ref} = …

Member Avatar for leegao
0
240
Member Avatar for goodwin912

I have finally got my program finished and going. Im now looking to make it look a bit better. While it is processing it shows and empty tk window. How does one go about putting something in here? I'd just like my users to be reassured it is actually working …

Member Avatar for TrustyTony
0
672
Member Avatar for cyberparadox

I am writing a command line dbm editor and have ran into a small issue. If I try to run certain commands (ie add, remove, display) when I do not have a file open, I get the following error: [icode] Traceback (most recent call last): File "C:\Users\William\Desktop\dbmEditor.py.py", line 35, in …

Member Avatar for cyberparadox
0
144
Member Avatar for vskumar19

Hello friends, I am writing an Application in pygtk ,there i got stuck up with this problem I want to open a text file using any editor using python Can any give some solution to this please ... Thanks in Advance ...

Member Avatar for hondros
0
11K
Member Avatar for johnnyd1986

Hey everyone, I need help with a Python issue. This is what I have so far: [CODE]scores = [] choice = None while choice != "0": print \ """ High Scores Keeper 0 - Quit 1 - List Scores 2 - Add a Score """ choice = raw_input("Choice: ") print …

Member Avatar for Gribouillis
0
141
Member Avatar for StratmanPereida

I need to make this into a multi-dimensional array. I know I need to change presArray = Table1Builder(60, "STR") to presArray = Table1Builder(60,3, "STR") I am not sure how to load it. Do I need three load statements? Help Please! [code] # Import string to use split function. import string …

Member Avatar for StratmanPereida
0
180
Member Avatar for Krysis

Hey all, I must say that I've had a lot of success with my questions here at DaniWeb, which is why (in my time of need), I'm back and seeking the help of the wise! Hopefully, someone can help me with this and has some basic knowledge of Pygame? Heh, …

Member Avatar for Krysis
0
461
Member Avatar for jozz3

I am trying to define a function that draws a triangle of a given size using the turn method. I've never used turtle graphics before and am not sure how to go about this. Thank you

Member Avatar for vegaseat
0
809
Member Avatar for pankajpriyam

Hi, I am using Python 2.3.4 in Linux environment. I have some sql files, I execute sql files in a loop. I want to generate seprate log files for every sql files in loop. How can I do this. regards pankaj

Member Avatar for jice
0
98
Member Avatar for Alq Veers

Ive been working on this for a while, and still am quite stuck. I've got the menu code done and it causes no problems, but as for organising the screen for the remaining two sections I am still having trouble. Im using the .grid() setting, and am thinking if I …

0
63
Member Avatar for z 4

This def has too many IF, i don't know how to optimize this code for more simplier and professional. Please take a look. [CODE]def cfg_wlan(self, wlan_cfg): """ Configure a new wlan for Zone Director. Input: a dictionary, supplied in DUT.py Output: none """ if wlan_cfg['auth'] == "PSK": auth = "open" …

Member Avatar for Gribouillis
0
109
Member Avatar for TrustyTony

Here tool functions, which came up during discussions earlier. Expanded slightly, added elimination of traceback prints by try..except. Added dd.mm.yy routine as that is format in my home country Finland. Optimized docstring beginnings to be informative in editor tooltip (at least IDLE shows, but code must be run or imported …

Member Avatar for TrustyTony
1
962
Member Avatar for kadvar

Hi, I basically have a dictionary with a few key value pairs in it. [CODE] mydict = {} mydict['key1'] = 2000 mydict['key2'] = 3000 mydict['key3'] = 6000[/CODE] I have read that you can check if a particular key is present in a dict with the '[B]in[/B]' statement like: [CODE]if 'key1' …

Member Avatar for kadvar
0
151
Member Avatar for biomed

I have a tab delimeted file that I want to convert into a mysql table. there are 25 tab delimeted fields in the text file. I can get the values in when I construct the SQL statement word by word and get each value individually stated in the VALUES part …

Member Avatar for biomed
0
83
Member Avatar for LucyX

Hi Guys, im fairly knew to this world of programming, but it interests me greatly. In order to better my skills, ive decided to tackle a few personal projects in my spare time . . . . Ive been advised to give the Hilbert Curve a bash. However getting started …

Member Avatar for ultimatebuster
0
273
Member Avatar for G_S

Hi, I have another question: ¿is there a method that allows me to capitalize the first letter of EVERY WORD in a given string? I know that something like: [CODE=python]a = "hello world" print(a.capitalize())[/CODE] would print "Hello world" but I need it to print Hello World. It's for a program …

Member Avatar for TrustyTony
0
887
Member Avatar for ihatehippies

Does anyone know of a way to change a property from read-only to writable on the fly without changing the source?[CODE=python] >>> p = property(lambda self: self.__p) >>> p.fset = lambda self: self.__p Traceback (most recent call last): File "<pyshell#19>", line 1, in <module> p.fset = lambda self: self.__p TypeError: …

Member Avatar for jcao219
0
108
Member Avatar for toll_booth

OK, in reference to my last thread, I finally got PIL installed and set up. I can even successfully import it (from PIL import Image). All that remains to be done is for me to successfully get an image into my GUIs, and I'll be good to go. Can someone …

Member Avatar for vegaseat
0
175
Member Avatar for xSDMx

Here's the code I put together to create concentric circles using Python: [CODE]def concentric(myTurtle,number,spacing): for radius in range(number): x = myTurtle.xcor() y = myTurtle.ycor() myTurtle.up() myTurtle.goto(x,spacing) myTurtle.down() drawCircle(myTurtle,radius*y+spacing) myTurtle.up() myTurtle.goto(x,spacing) myTurtle.down()[/CODE] It, however, has a critical flaw. I need the code to be able to goto any given set of …

Member Avatar for xSDMx
0
750
Member Avatar for rasizzle

Hey all, Here is some code for reading Excel spreadsheets (2003 and before) with PyExcelerator. My main problem is that if I leave a cell blank, it gives me an error. I want to be able to have blank cells on my spreadsheet without any problems. Does anyone have any …

Member Avatar for Gribouillis
0
501
Member Avatar for peppermints

The commented part is where I believe the issue is at. [CODE]from livewires import games, color import random games.init(screen_width = 640, screen_height = 480, fps = 50) class Paddle(games.Sprite): image = games.load_image("paddle.bmp") def __init__(self): super(Paddle, self).__init__(image = Paddle.image, x = 10, y = games.mouse.y, bottom = games.screen.height) def update(self): self.y …

Member Avatar for TrustyTony
0
614
Member Avatar for theweirdone

Hi, I'm trying to take a date, add a day to it, and then convert it to a string. The date's format starts out like: '10/1/2009', and should end like: '2009-10-1'. I can do that part, but then I can't convert it to a date format and add a day. …

Member Avatar for TrustyTony
0
261
Member Avatar for toll_booth

OK guys, in regards to my [url=http://www.daniweb.com/forums/thread273163.html]last thread[/url], I've decided to give PIL a shot. Trouble is, the setup instructions are as clear as mud. I've got the files downloaded and extracted, but that's as far as I've been able to get. Can someone, IN PLAIN ENGLISH, walk me through …

Member Avatar for toll_booth
0
202
Member Avatar for dpswt

Hello everyone. My question is how can we save the items on listctrl so everytime someone opens the application, the items previously added are there. I'm trying to accomplish this with wx.Config, but I can't seem to find a good way to read the config so it accomplishes what I …

Member Avatar for lllllIllIlllI
0
243
Member Avatar for cyon

Given s.ss or seconds accurate to the hundredth place, what is the most effective way to convert it to the string mm:ss.s? Here is my current attempt: [CODE]import time def convert(t): print time.strftime("%M:%S",time.gmtime(round(t,1)))+str((".%01d" % (((round(t,1))-int(round(t,1)))*10))) t = float(raw_input('Enter time in s.ss: ')) convert(t)[/CODE] However, the results don't seem quite right: …

Member Avatar for TrustyTony
0
535
Member Avatar for rasizzle

Hey guys. I just started using portable python and I have to say this module is great. It helped me bypass some problems transferring modules between win32 and win64 cpus. So my question is for all you portable python users is: do you have to install python for each new …

Member Avatar for rasizzle
0
179
Member Avatar for soUPERMan

hello, was wondering how to sort a list which has different data types according to the data type, Example if a list containing 'person' objects. a person object wil have a name, gender and age like so: person1 = person(name, gender, age) so if i have 5 objects in a …

Member Avatar for soUPERMan
0
83
Member Avatar for elmaami

Hello I want u to help me about how to encrypt file is sent between web client and web server. Thank u....

Member Avatar for jcao219
0
47
Member Avatar for theweirdone

Hi, I'm making something of an RSS reader-ish. I'm using the [URL="http://www.feedparser.org/"]Universal Feed Parser[/URL] to do this. The feed is just a list of TV shows, and the date they air. I'm successful at getting the feed, now what i'm trying to do is split it up into chunks that …

Member Avatar for theweirdone
0
125

The End.