15,190 Topics

Member Avatar for
Member Avatar for implor

I have a string that loks like "u'mystring'". i'm wondering if ther is a easy way to remove the u'' part of the string?

Member Avatar for jrcagle
0
17K
Member Avatar for nish88

[B] Have someone ever implement game of life without using cell??? just using a plain interface like tkinter and rectangle. [/B]

Member Avatar for jrcagle
0
38
Member Avatar for StepIre

Hi Guys, I have a nested dictionary that i would like to be populated from a file at the start of my prog and put back into the file at the end of the prog. Could anyone direct me to somewhere where i could get info on how to do …

Member Avatar for StepIre
0
129
Member Avatar for petr2008

Hi, I am using Python 2.4.4 and: from numpy import * from MA import * I am using masked data in arrays and functions: average, min and max. When the last item of an array is masked, I am getting "masked" results for min and max functions, even if there …

Member Avatar for petr2008
0
63
Member Avatar for nirmalarasu

Hi All, Currently Iam writing python ftp script to upload a file to FTP Server. The server where iam going to download a file expects the upload command in this format "put <filename> flash" I dont know how to send this same command in ftp session after login. I have …

Member Avatar for nirmalarasu
0
487
Member Avatar for mmxbass

Well I got past most of the problems with my boxlets application. I wanted to hear what people think of the functionality and if they have any input/suggestions. Known issues: * When you already have applications open, their boxlets pile up on top of each other. Remember, this software requires …

0
66
Member Avatar for rbracco

I have a server with access to 9 different IP addresses that I want to use for different purposes and I wish to keep them separated. I am going to be doing my work using UrlLib2, is there a way I can specify which IP address I am using through …

Member Avatar for BearofNH
0
109
Member Avatar for Carlo Gambino

I am trying to manipulate user input strings using the ord() funtion. This effectively allows me to identify the decimal value of each character in the string. I have been able to return the value of the characters, but what I need to understand is how to store each value …

Member Avatar for Carlo Gambino
0
149
Member Avatar for StepIre

Hey guys, sorry for this, what im sure is simple, but i just cant get it! i have a dictionary for restaurants.. then i have nested dictionaries holding information like when these restaurants open and close. [CODE] Restaurants = { 'Italian' : {"OpenTime" : "11:30", "CloseTime" : "20:30"}, 'Mexican' : …

Member Avatar for StepIre
0
113
Member Avatar for php.mca

Hi All, I am very much new to python.I need an application to generate password protected pdf. Can anyone help me out? Thanx in advance Dushyant Joshi

Member Avatar for php.mca
0
76
Member Avatar for trihaitran

Hi, I've got about 10 functions that all share a bit of code. They all look something like this: [code=python] def func(arg): statement1 statement2 statement3 unique code statement4 statement5 [/code] Each function does similar statements at the beginning and end, but has unique stuff in the middle. Is there a …

Member Avatar for G-Do
0
114
Member Avatar for trihaitran

Hi, My problem is that I have a large function with hundreds of lines. I want to break it apart into smaller functions. The issue is that if I make a module level function, the scope changes and I have to pass the necessary variables to it. This can be …

Member Avatar for woooee
0
99
Member Avatar for roelandt

Hi I'm new in python and i'm do not understand why my code is not working. I want to generated random figures with this code: import random import division a1 = '' a2 = '' def zufallsZahl(a1,a2): a1 = random.randint(1,10) a2 = random.randint(1,10) print a1, a2 s1 = [a1, a2] …

Member Avatar for woooee
0
99
Member Avatar for pythoxine

what is the best language-related python library, with support for spell checking (aspell?)?

Member Avatar for vegaseat
0
77
Member Avatar for G-Do

Hi all, I added a new script to the code snippets page. This time, it's a logic puzzle called "Petals Around the Rose." The goal is for you to infer what algorithm is being used to "score" rolls of five colored dice without peeking at the code. The snippet is …

Member Avatar for jrcagle
0
196
Member Avatar for wolih

Hi. I'm thinking about making a "gauge" to place in front of the taskbar (on windows) that measures RAM memory. How can I do that with python? It would be like some kind of "widget" but VERY small. about 44x32 pixels. I don't want no titlebars nor anything. Just like …

0
62
Member Avatar for nish88

hi..... i want to make a simulation where it start with 1 dot and its continues to propagate like the figure below. [B] . inital dot ... ...... ........ [/B] can anyone please tel me how to do it or give me the pieces of codes needed to do this …

Member Avatar for BearofNH
0
106
Member Avatar for Delta424

I am a begginer at python and only know the very basics. I was wondereing if anyone was experienced at Python and had any time to help a begginer. As far as first projects go I wanna make a program that can generate random numbers, letters, or words (in 3 …

Member Avatar for Delta424
0
80
Member Avatar for zclevenger

I have just started using python and am stuck on a particular project. I have been stuck staring at my computer not knowing what to do. I will post details below. What I am trying to do is use a CSV file named country.csv in which information about countries is …

Member Avatar for jrcagle
0
170
Member Avatar for lkk2116

I am new to python. Infact started yesterday and feeling out of place. I need to write a program which would transfer files under one folder structure (there are sub folders) to a single folder. I was going through COPYTREE in shutil. But some how I am not able to …

Member Avatar for jrcagle
0
99
Member Avatar for rysin

I want to make a program that prints how long it has been running. I tried this [CODE] import time b = time.tick() print b[/CODE] Even if this did work it wouldnt do what I want it to do. I basically want it to tell me how long the program …

Member Avatar for aot
0
183
Member Avatar for +--RagS--+

Hello, I'm using a askdialog box from tkinter with a form. My problem is when I use "print" or "return" to get the selected directory it prints it to the terminal (if open) and I would like it to print to an Entry textbox. For example: [code=Python] from Tkinter import …

Member Avatar for +--RagS--+
0
106
Member Avatar for hacker9801

I'm using MySQLdb. Alright, I'm doing [code=python]import MySQLdb as mysql db = mysql.connect("localhost", "root", "password", "database") cu = db.cursor() rows = cu.execute("INSERT INTO users (user, pass) VALUES ('test', 'test')") print "rows affected:", rows cu.close();db.close()[/code] Well, what happens is, it gets executed and prints "rows affected: 1" BUT when I check …

0
75
Member Avatar for abhinemo

I am a mew user of python.And I want to run following command in python perl test.pl -testconfig <config file> > test.log 2>&1 Can anybody help me.

Member Avatar for woooee
0
72
Member Avatar for dagray

The code will read in a file and build a table with the ctn_no and seq_no which works fine. I want to change it so that when I find a break mark I build a table of ctn_no + 1 and seq_no + 1 rather than a table of ctn_no …

Member Avatar for woooee
0
79
Member Avatar for StepIre

Hey guys, im trying to extract the top 10 links from a yahoo search results page. i can get all the links using the code below.. but that could be 70 links. Any idea how i could get just those top 10 ranked ones? and not the adverts etc. ie …

Member Avatar for StepIre
0
198
Member Avatar for mmxbass

How can I make my pygtk windows switch to another workspace. I'm working on a box-oriented task selector and I need my boxes to follow windows to their new workspaces when they change workspace. This is my code thus far: [code] import wnck import pygtk pygtk.require('2.0') import gtk import gobject …

0
179
Member Avatar for mmxbass

I am trying to make a box-oriented task selector similar to the style of nextstep. I am currently having problems painting the box background and application icon onto my window. If I just use a normal gtk.Image widget it works fine, but that won't let me have both the box …

Member Avatar for mmxbass
0
103
Member Avatar for nirmalarasu

Hi, I would like to know whether linux installed as default in all flavors of linux (redhat,suse) or in customized linux distributions. is not so is there any other script to be supported in all linux distributions? thanks

Member Avatar for Duoas
0
149
Member Avatar for nirmalarasu

Hi , Currently i am writing telnet python script for connecting remote server. I would like to save the telnet session activites in a file. Is there any better way to grap the remote output in a local machine file. example Login: --------- Password: ********* Login successful --> show port …

Member Avatar for nirmalarasu
0
1K

The End.