15,175 Topics

Member Avatar for
Member Avatar for simionpetrus

can anybody help me build a function to replace certain language specific characters in a file? for example, i want to replace Ș with &#350, so it will be published correctly in a web page.

Member Avatar for woooee
0
43
Member Avatar for smartdog

Heloo, i have just encountered a problem in comiling a module of a program made by python and um not experienced in it, where should i run the module, in the command prompt of windows or in the shell, i dunno wheather i post this thread in the right place, …

Member Avatar for Fuse
0
191
Member Avatar for Trenholmes

First thanks for taking the time to review my issue. I've been banging my head against a wall the last 24 hours. What I want to do is have a list of labels bound to a list of particular events. I want to be able B1-Motion from one label to …

0
43
Member Avatar for spoksss

Hello, I have a problem with calling a staticmethod from another staticmethod when I try use dictionary {} to handle. My code is very basic, but in the future I will add many other static method: [CODE] # -*- coding: utf-8 -*- import sys class DateFormat(): """Class to format and …

Member Avatar for bvdet
0
127
Member Avatar for TheOneElectroni

Hi everyone, I'm new in this forum. By the way it's not longtime since I started learning python. After a couple o months of studying and tutorialing I'm now nearly finished with my first application. I've used Tkinter as GUI and there's one thing that's making me nervous: I want …

Member Avatar for TheOneElectroni
0
3K
Member Avatar for parmenio79

Hi All, Beginner programmer here with an easy question I hope. I want to be able to compare the value of the first item in a list to the second item in the list to see if they are sequential. so in this list: numblist = [1 , 2 , …

Member Avatar for parmenio79
0
27K
Member Avatar for theOneCalledJef

I am working on making my own chat server and client, but have reached a little hiccup. The first line of text that the client send is not displayed by the server. Everything else is, just not the first line. Client [code=python] import socket uname = raw_input('username:> ') uname = …

Member Avatar for tac
0
159
Member Avatar for preyan

Am trying out the eric ide for python Am not sure how to enable the "." function in the editor i.e when i do >>> import os >>> os. It must list me the contents that can be used against the os module I tried the autocomplete calluptips nothing worked …

Member Avatar for preyan
0
91
Member Avatar for HowardR

Let me preface this by saying that I am not very skilled with computers. With that said... I have written a fairly simple python script that accesses a webpage and downloads some text before writing it to an outside .txt file. The webpage is constantly changing and I would like …

Member Avatar for eibwen
0
79
Member Avatar for atsuko

Hi all, I am trying to write float numbers in a file. But it gave me an error "argument 1 must be string or read only character not float" then i change it to xyz = 0.9878 text = f.write(str(xyz)) now the error is .. 'str' object is not callable" …

Member Avatar for atsuko
0
156
Member Avatar for linux

Is there any way for someone to, using PyGame or SDL, to do, say: [code]00000000 01222100 01112110 01112110 01111110 00000000[/code] And have it display the 0's as a water tile (10x10), the 1's as a grass tile (10x10), and the 2's as a rock tile (10x10)? As to make maps …

Member Avatar for linux
0
139
Member Avatar for ms_melagiri

Hi all, I'm trying to run 'svn update' on a given directory as a subprocess in python. I need to redirect the output of this process (svn update) to a file called updste.txt. And if 'svn update' fails, I'm trying to send out a mail to myself with the file …

Member Avatar for woooee
0
495
Member Avatar for jesouhaite08

I created an exe of my application. When I click on it on my computer, it already has built in for it launch the server and open the site, and it works. When I put it on a drive where other computers in the office I work in can use …

0
51
Member Avatar for elhallouf

hey all. I am trying to assign unique IDs to a list of strings I get from a file Let's say my list (list.txt) is: [CODE] Shoes from Italy 1 Shirts made in Japan Shoes from Italy 2 Shirts made in France Boots made in United Kingdom Socks [/CODE] I …

Member Avatar for slate
0
243
Member Avatar for inkcoder

Hello Everyone! I am new to Python, this is my second project. I am trying to make a program that will take a users input and then output the words into the format where A = 1, B = 2, C =3 ... and so on. I want to start …

Member Avatar for a1eio
0
139
Member Avatar for dinilkarun

How can I read data present in a large XML file into a list using SAX parser?. I want to transfer the data into tables created in MS Access. Please help. Regards, Dinil

0
53
Member Avatar for elhallouf

Hey you all I am starting with python (more familiar with shell in general) I am trying to write a script that replaces a column in a text file with numbers (or IDs) from an other file. Let me rephrase it : I have 2 files: ITEMS.txt and IDs.txt Items.txt: …

Member Avatar for elhallouf
0
158
Member Avatar for Py-er

hi, i want to know how can calculate width value of text for example: (text:'help me', font:'Tahoma 25') i want to calculate the full width value of the text so help me please to find a way to do that or with Tkinter lib or with any lib.

Member Avatar for Py-er
0
115
Member Avatar for bikehike90

I am relatively new to python. I am calling a a function from another script (imported) from the python shell. However, when I call a variable created in that function (after calling it) the variable hasn't been defined. I thought it was a global issue so I made the variable …

Member Avatar for bikehike90
0
89
Member Avatar for lllllIllIlllI

Hi Using a template from the tutorial Fuse offered i made this program: [code=python] import wx import os WINDOW_WIDTH = 700 WINDOW_HEIGHT = 600 class MainFrame(wx.Frame,object): def __init__(self): wx.Frame.__init__(self,None, title = "Paul's Text Editor", pos = (200,75), size = (WINDOW_WIDTH,WINDOW_HEIGHT)) self.menubar = wx.MenuBar() self.menufile = wx.Menu() self.menuinfo = wx.Menu() self.SetMenuBar(self.menubar) …

Member Avatar for lllllIllIlllI
0
635
Member Avatar for jesouhaite08

I created a program and when I click on it, it launches the server and runs at [url]http://127.0.0.1:8000[/url] This is my code for it: pyweb.py: [ICODE]import os, sys sys.path += [r'c:\dev\incidents'] os.environ['DJANGO_SETTINGS_MODULE'] = 'incidents.settings' from django.core.management import call_command from threading import Thread t = Thread(target=call_command, args=('runserver',), kwargs={'shutdown_message':"done", 'use_reloader':False}) t.start() import …

0
52
Member Avatar for Patrick1991

Hello! I'm new in this forum and i have some problems in school. I'm from Germany and my teacher gave me the task to install a dart game in Python. Now i have not much time left. So i want you to ask if you could maybe help me with …

Member Avatar for Patrick1991
0
115
Member Avatar for ronnix

Hi, It is possible to get values from thread , while thread is executing , but not yet complete? if it is possible then how can I realise it in python? with hope to solution

Member Avatar for BearofNH
0
87
Member Avatar for elhallouf

hey all I am trying to write a pogram with arguments and options I want to call it this way: [CODE] python myScript.py -c -f 'C:/Temp/my_file.txt' [/CODE] OR [CODE] python myScript.py -u -f 'C:/Temp/my_file.txt' [/CODE] where [-f filename] is mandatory and exactly one of -c or -u should be there …

Member Avatar for woooee
0
81
Member Avatar for knish

Hi, 1) how do I source a python script thru MEL. 2) Execute a python script thru MEL (python("") Brgds, kNish

0
73
Member Avatar for darkMatter2008

Hello, I am an experienced programmer in OO langauges such as C++, C#, Java... etc. The problem I have is that I have written a class, and when I try to instantiate that class from another object, the compiler says that it cannot find it at the Import stage. From …

Member Avatar for bumsfeld
0
86
Member Avatar for darkMatter2008

How do I make a static function in an Class that can be called by another object? Thanks in advance.

Member Avatar for darkMatter2008
0
98
Member Avatar for cdub

I'm running 2.4.4 using gentoo. I've compiled python with Tk. (USE="tk" in /etc/make.cont) I can not get "turtle.setup(width=800,height=600,startx=400,starty=300)" to set the screen size. Any ideas? Is there another way to set the screen size? ? cdub [code = python] import Tkinter import turtle turtle.setup(width=800,height=600,startx=400,starty=300) turtle.down() turtle.right(30) turtle.forward(100) [/code]

Member Avatar for Fuse
0
4K
Member Avatar for kittensaretasty

I'm a complete beginner. I know how to get things to print to the screen, with the print command. But I want to be able to input a string of text and have that text returned in all caps. Do I do this with an argument to the print command …

Member Avatar for Fuse
0
92
Member Avatar for happimani

Dear All, What is the Major Differences between Python 2.3 and 2.4 and What are all the Major Features in Python 2.4?????????? regards Mani

Member Avatar for paddy3118
0
140

The End.