15,406 Topics
![]() | |
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 = … | |
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 … | |
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 … | |
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" … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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: … | |
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. | |
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 … | |
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) … | |
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 … | |
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 … | |
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 | |
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 … | |
Hi, 1) how do I source a python script thru MEL. 2) Execute a python script thru MEL (python("") Brgds, kNish | |
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 … | |
How do I make a static function in an Class that can be called by another object? Thanks in advance. | |
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] | |
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 … | |
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 | |
Hello, I'm trying to convert a string which includes raw UCS2 unicode characters into a Python unicode object. For example: The string: "05E905DC05D505DD" The result I need: u'\u05E9\u05DC\u05D5\u05DD' What's the function I should use ? Thanks, | |
Hi Folks, For thoes of you who may have read and offered assistance on this problem already, I thank you. (Woooee, Slate.) The project/problem has been evolving and now I feel I am getting close to a solution...but still a few steps away. I have the code below, which is … | |
Hi I am making a program that collects data and then saves it to a text file. Then i want it to print the text file on a Network Printer and i was wondering how i would go about doing that? | |
Hi I have been doing text programming for a while now and i was going to start doing some graphical interfaces for my programs but i was wondering which one is the best for beginners and also what and ther advantages/disadvantages of each of them. Thanks | |
So I have a simple dice program that lets the user make bets. If their current money pool is larger than the money pool in highscores.txt it will write the new score to the file. The program works as intended except for the high scores. When I try to write … | |
Hello, I am exporting 3 seperate Selects to a csv file. What i have is a button that when clicked I would like to have to export. The problem that I have is that I can only get one of the three to work. All three do work just not … | |
Hi, i've been working on simple code just prototyping the system i'd like to make. This all works and is going great apart from my "quit" button, the button appears. however when you click on it, it doesn't close the interface..i think it just stops the code from running or … | |
I want to retrieve a variable's data that contain's an image i am using pys60 ,for example i have created a class of Image like this: i=Image.new((size,size)) and drawn a rectangle in it: i.rectangle('proper values') now there is a rectangle in i so we have an image and something is … | |
Hi friends I am trying to connect to a Linux machine from a Windows PC. I used to do it thru TELNET, but now I want to use SSH for better security. I tried with PYSSH, but I am going nowhere with it... Parmaiko is not working in Windows... Is … | |
Hi , I have a problem.. How can I get encoding for string which I retrieve from web or DB. with hope to solution.. | |
Hi, I have written a web service and have deployed it using Apache Axis2. What I want to do is to invoke this service using a python script. Can anyone point me in the direction of how to do this. I will be grateful If anyone can give me a … | |
Does anyone know how to install Python3.0a5 on a Windows Vista OS / AMD64 AthlonX2 platform? I downloaded the amd64 version of Python3.0a5 but Vista won't install it -- although it has msi. After much 'googling' of the matter, I found that many other people have similar problems with Python … | |
Hi there, I have a mixed list containing strings, integers, strings with numbers both prefix and suffix and mixed case strings as follow: mixedlist = ["cake", 12, "cakecar", "cAKe", "orange", "apple", "1cake", "cake1"] I'm trying to filter the list for any element containing "cake" so I get a new list … | |
Is this supposed to play on my computer? I can't get the PMIDI module to work. I can write a code and it doesn't show and error, but I can't hear anything. I'm sure the codes are well written(mostly because I've used examples from other places) so does anyone know … | |
Hello! I would like to sort (by number) a file of data that looks like below: ABGH SDFDS 123 SDFS sDF 12 ... Can somebody help me? Thanks | |
I just started messing with Python, and was having a great time with entering Tkinter GUI commands into the Python shell (ActivePython 2.5). Its fun entering commands one at a time and seeing components appear real-time (instead of normal process of having to compile the whole thing first). Anyway, I … | |
[ICODE]def aquariumTicket(total = 0): age = input("What is your age?") if age < 3: price = 0 elif age >=3 and age <=12: price = 19.5 elif age >= 55: price = 21.5 elif age >12 and age <55: price = 26 print "Ticket price: $%.2f" % price others = … | |
def divide(dividend, divisor): This function should return the calculated value of integer division of divisor by dividend. Calculate the solution by using subtraction recursively to divide the two numbers. You are not allowed to use the division operator for this problem. Explanation: note that 7 divided by 2 is 3 … | |
How to create a tree control with child nodes having check boxes? I want the check boxes to be preferably on the left side of the nodes. | |
Hi there. I'm new to Python. I started learning it 3 days ago. I've figured out everything by myself so far, but this is stumping me: Whenever I load a file such as a html document or a text file, it loads fine. But when I load this gif or … | |
Is there a way to overlay graphics in Python? I'm looking for functionality similar to X-fire. That is, I want to be able to press a set of keys in a game and a GUI screen with some options (possibly a shell script) that doesn't cover up the game should … | |
Hello Everyone, I just joined here hoping to increase my knowledge at python. I have been beginning to learn this language as of yesterday. I have decided that if I really want to increase my knowledge I should start on a project. Well here is my first project, a simple … | |
OK guys, I've hit a wall & can't find any info on what I'm wanting to do. Maybe someone can help me out here or point me in the right direction please? I have a shelve object- book. If I do book.keys(), naturally I get a list of the keys- … | |
Hi there. I'm now to this forum hoping to get an answer that I feel shouldn't be too complicated but, with that said, I haven't been able to find a solution to this after doing some research for a few hours today. What I am looking to do is take … | |
Hi! I've got an assignment to read an input file and do some calculation and a graph and fancy stuff like that. The problem I am having is reading the file. I get a file that looks like this: [code] 0.00 1.776e-12 3.756e-07 0.000e+00 0.000e+00 0.20 1.769e-12 2.377e-07 0.000e+00 0.000e+00 … | |
we installed Openoffice.org 2.3 and i am tryingt to run the script by importing UNO and it is throwing up an error saying there is no module called pyuno. I am not able to find pyuno.py file in the location where i have installed open office Please assist. |
The End.