15,185 Topics
| |
why does this code Hangs??!!! I am on Windows [CODE] from subprocess import * proc = Popen("cmd",stdin=PIPE,stdout=PIPE) pin = proc.stdout pin.read() [/CODE] <HANGS JUST RIGHT HERE> | |
Hi i have been fiddling around with the wxPython GUI toolkit for a bit and i wanted one of my programs to start with the window expanded. I googled it but couldn't find an answer there so any help here would be greatly appreciated. | |
I'm currently trying to make an address book that can store data in a .txt file. [CODE] print "Virtual Address Book" print "Austin Jackson; Project 4 : Jun 14, 2008" print " " print "1. Add New Contact Information" print "2. View Adress Book" choice = input(">") if choice == … | |
this was the question on my exam the other day Which strings does regular expression r"^([^aeiou]\w)+\1$" recognize? (3 answers) "o_o-o_" "baraba" "ananas" "anasan" "-O->-O" "izgriz" im not into re at all :D, I tried to compile that expression and check for every string.. funny thing was that none was recognized.. … | |
I'm trying to use the BlueSoleil SDK with Python. To do this i use ctypes to call the BlueSoleil DLL. Here is the code: [code=python] import ctypes print ctypes.cdll.BsSDK.Btsdk_Init() print ctypes.cdll.BsSDK.Btsdk_StartBluetooth() print ctypes.cdll.BsSDK.Btsdk_StartDeviceDiscovery(0,0,0) ## print ctypes.cdll.BsSDK.Btsdk_GetInquiredDevices(None,None) [/code] The last call should return the number of active BT devices around, which … | |
Hello. I am a relatively new python programmer, but I know my way around the language. I have decided to do some work with PyOpenGL -- I just finished a game that had to be in XNA, now I have a bit more free reign and I prefer to do … | |
Hi. I'm having a little difficulty understanding character sets in Python. Basically I'm trying to write a function that will substitute a non-ASCII character with a similar ASCII equivalent. So if given a string like 'ÂBÇD', the function would iterate through the string object, replacing select characters to return a … | |
Hello, I am trying to split a word into an array For example, "airplane" becomes ['a','i','r','p','l','a','n','e'] Any suggestions? | |
I have started to use the PyScripter IDE and really like the many features it has. However, everytime I make an error in the code, and as a beginner I make a lot of errors, it rather ungraciously exits. There must be something wrong in my settings? | |
I am trying to compare a list of words to a dictionary to see if there are any matches. How do I do this, as diction.has_key() does not work for lists? | |
can anybody help me build a function to replace certain language specific characters in a file? for example, i want to replace Ș with Ş, so it will be published correctly in a web page. | |
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, … | |
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 … | |
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 … | |
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 … | |
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 , … | |
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) … |
The End.