15,175 Topics

Member Avatar for
Member Avatar for Dekudude

Hi there! Let me start by saying this-- I have no experience with regular expressions. Simply put, I want a function that turns an array [eg: func(array)] into... an array, but add ONE space on both values. Meaning: [code=Python] array = ['red','blue'] #returns ['red','blue'] array = func(array) # returns [' …

Member Avatar for Dekudude
0
129
Member Avatar for dromias

Hi, recently I decided to download py2exe, but for some reason it's not working. I downloaded the all purpose version, and am sure that the scripts I am using are fine. I keep on getting an import error saying that there's no module named py2exe_util. Maybe I didn't install it …

Member Avatar for dromias
0
204
Member Avatar for J3STER

Hi All, new to this, and i havnt done much python programming, i have written a program to write data to a text file. each time i use the program, it appends the data to the file and leaves two lines between the sets of data however, i want to …

Member Avatar for J3STER
0
103
Member Avatar for gauthampdas

I have to copy a file into MySQL database as a Blob. I tried it using 2 methods. [B]1. Using MySQLdb module 2. Using mxODBC & pyodbc modules (through ODBC) [/B] The first one executed properly and I was able to retrieve the data from database. When I tried it …

0
42
Member Avatar for OutOfReach

Hello guys. I am having trouble with QTabWidget: I can't add multiple widgets with addTab nor insertTab. even when I try something like: [code=python] self.widget1 = QListWidget() self.widget2 = QPushButton("Foo") self.widget3 = QLabel("Bar") self.tabs = QTabWidget() layout = QVBoxLayout() layout.addWidget(self.widget1) layout.addWidget(self.widget2) layout.addWidget(self.widget3) self.tabs.addTab(layout, "Foobar")[/code] It will raise an error that …

Member Avatar for OutOfReach
0
1K
Member Avatar for twdesign

I am a Python newbie! I'm trying to list the feature classes in a dataset (Access .MDB) and then list the fields in each feature class. I'm able to list the feature classes and I'm able to list the fields in a particular feature class if I name it specifically. …

0
50
Member Avatar for Stefano Mtangoo

Hello dears, I need your help. I want to build executable file from py script using py2exe gui aka Gui2exe. but it keep crashing. "Error: execution of command python -u......system cannot find the file specified Have one compiled successful with Gui2exe? Which options do you use? Thanks alot, Steve

0
41
Member Avatar for cmac1212

Just as the title states, im looking for some help to press and hold keys down in any focused window. I have seen similar things using tkinter, but i have only seen code to send commands to a tkinter created window. thanks

Member Avatar for cmac1212
0
79
Member Avatar for GriffinHeart

Hello there i'm having some problems running my scripts in my hosting, first of all i would like to know if theres any way besides asking my hosting of checking if i'm using mod_python has a handler or cgi. i've done a .htaccess with AddHandler mod_python .py PythonHandler mod_python.cgihandler but …

0
43
Member Avatar for Stefano Mtangoo

Hello Guys, I have problem with Bindinging Event to menu. Every time I run this on IDLE (F5). I get always Attribute error that self have no attribute OnPrint. What's wrong with the Code???? [CODE] # SMD Inc since 2003.py import wx ID_ABOUT = 100 ID_PRINT = 101 ID_EXIT =102 …

Member Avatar for Stefano Mtangoo
0
114
Member Avatar for besktrap

I everyone! I'm having a little math trouble with a simple physics program I'm writing in python w/ pygame. If you notice in the code where it says: "((-ballSpeed[1]/4*3))", my ball on the screen just sits there and does nothing!! Whats wrong with my program? [CODE] import sys import pygame …

Member Avatar for besktrap
0
224
Member Avatar for Gribouillis

I'm on linux, and I'm using a command called 'espeak' which reads sentences on stdin and writes phonemes on stdout. Whe I run it in a console, the output is the following [code] bash$ espeak -q -v mb-fr4 -s160 bonjour tout le monde # <-- I type this input, the …

Member Avatar for woooee
0
164
Member Avatar for 2ashwinkulkarni

Hi, I wanted to know if there is a way to read multiple csv files from a folder, process them one by one and write the output to corresponding output files. Also it is necessary that the if the name of the input file is foobar.csv then the name of …

Member Avatar for 2ashwinkulkarni
0
2K
Member Avatar for Derme

I was just wondering, in Tkinter, is there any difference in assigning an event handler to a button through class1.btn["command"]=self.update and class1.btn(command = self.update)? Because I got an attribute error saying that there wasn't a __call__ function when i used class1.btn(command = self.update), whereas when I used class1.btn["command"] I didn't …

Member Avatar for ZZucker
0
23
Member Avatar for Stefano Mtangoo

Hello guys, I'm new to python I want to use wxPython for Gui programming The main problem to me is how to start wxpython have good looking but then no documentation regards steve

Member Avatar for ZZucker
0
134
Member Avatar for ping24

Hi Guys, I have just came into the wonderful world of Python. I am really enjoying it. Anyways I am having a query on Python. Here is my Query.. I have downloaded the python module Linkchecker. And you must be knowing that it dumps the website URLs of a specific …

Member Avatar for ping24
0
168
Member Avatar for Stefano Mtangoo

Hello guys! How are you doing all I again need help:?: Can anyone help me to get SPE IDE run as executable using py2exe? I have tried using code below what I get is exe file but when I run it I get message .....needs higher version of wxpython... error, …

Member Avatar for Stefano Mtangoo
0
153
Member Avatar for tzushky

Hi again, I am trying to do something really sillya nd it isn't working:( I have a main where I want to start two threads using the same handle function, but the second thread generates the following error: Unhandled exception in thread started by Error in sys.excepthook: Original exception was: …

Member Avatar for tzushky
0
162
Member Avatar for morraine

Hello I'm new to python and I'm programing an application using PyQt at the moment now i would like to know how to pass some variables from my main parent page to included pages which in the own right have a lot of processing, event handling and data entry and …

Member Avatar for woooee
0
224
Member Avatar for leegeorg07

hi again ive been lookin at this code that i found on the internet that test someones mathematical skills i have ironed out most of the errors but i cannot work out this one please help the code is [ICODE]name = raw_input("\t\t\tPlease Enter Your Name: ") print print "\t\t\t\tHello", name …

Member Avatar for Ene Uran
0
120
Member Avatar for Jadellll

Hi, I'm looking for the module that floor() is located in. I would have assumed it would be loaded from the path, but after trying several times, its not. Also, while I'm at it, is there a way to permanently add things to the path. So I can add my …

Member Avatar for Gribouillis
0
147
Member Avatar for lid

Hi everyone ! Inside my program, i have a function which delete all the values in the "Entry" widgets. This function works with a simple button "Reset". I have also 2 radiobuttons. I would like to know, please, how radiobutton.deselect() works to deselect all the radiobuttons with my buton "Reset". …

Member Avatar for lid
0
13K
Member Avatar for JA5ONS

aggr! i now have this problem. Traceback (most recent call last): File "C:\Users\User\Desktop\Python\File.py", line 87, in ? self.entID_Num = Entry(self) NameError: name 'self' is not defined part of my code is [CODE] # movie id input self.entID_Num = Entry(self) # movie id input position self.entID_Num.grid(row = 0, column = 1, …

Member Avatar for JA5ONS
0
90
Member Avatar for astrogirl77

Hi, I'm new to Python and am hoping to find help with coding a Python script, applet. I code in an old version of Visual Basic 4.0, I have a simple app that is about 3 and a half pages of code long it does some relatively simple math additions …

Member Avatar for slate
0
105
Member Avatar for JA5ONS

guys, im after a piece of code that when embedded into a button, clears the text entry boxes of the GUI so new information may be added. Like adding a new customer after you press save. At the moment you press save but the information stays there cheers.

Member Avatar for vegaseat
0
104
Member Avatar for vegaseat

This post by [B]s7plc[/B] was moved from the Starting wxPython (GUI code) thread ... [QUOTE]I've been working with various widgets from the wxPython demo library, and am making pretty good progress. But I just ran into a problem that I am sure has a simple answer, but I just can't …

0
81
Member Avatar for Peter_Saumur

Hi all, First-timer and first post. I have been given a task of convert large data files to/from a self-defined format. In the "xml" form, the format for each record is: [CODE] <power> <name> </name> <level> </level> <kind> </kind> <source> </source> <flavor> </flavor> <type> </type> <keywords> </keywords> <action> </action> <attackTypeAndRange> …

Member Avatar for Peter_Saumur
0
85
Member Avatar for JA5ONS

so i have created a program, im not sure how to change gui screens, for example, the first screen is username/password on the opening scree, and than it will move onto the next screen where i can input data when i have enterd password correctly. cheers

Member Avatar for shadwickman
0
106
Member Avatar for Dekudude

[code=Python] def checkIt(arr,inp): bool = 0 for i in arr: if i in inp: bool = 1 break return bool array = ['hi','hey','hello'] string = "Hi there!" if checkIt(array,string) print "Yay!"; [/code] That's my code. It returns, "Yay!". Now... I like what it does-- it searches the string for a …

Member Avatar for shadwickman
0
122
Member Avatar for slendergreen

I'm new to Python and not anywhere near a competent programmer. Anyway, if someone could help me get over this hump, I'd appreciate it. I need to write a Python script that calls commands from the OS that may have lengthy output. Let's say I want to see the results …

Member Avatar for Gribouillis
0
123

The End.