15,406 Topics

Member Avatar for
Member Avatar for bumsfeld

Is there a good way to access browser like IE and run an HTML file from within Python code?

Member Avatar for you2
0
216
Member Avatar for shaun.b

Hi everyone, Ive just got a bit of a problem with a program i am currently writing. Basically i have got a csv file with a load of flight info in it, i need to parse that and add it to a dictionary so thati can search through it easily. …

Member Avatar for woooee
0
449
Member Avatar for ms_kichu

i have a file which contains some block of lines like - define host { use linux-box host_name node001 alias node001 address 192.168.36.133 } define host { use linux-box host_name node002 alias node002 address 192.168.73.19 } can anyone help me in getting a script which takes <node001> and <192.168.36.133> as …

Member Avatar for woooee
0
115
Member Avatar for dilbert_here00

Hi all, Following is a piece of code which tries to open an image using Tkinter, the root window opens but I am not able to see the image. I don't know what is wrong with my implementation. Could you please have a look at the code & see if …

Member Avatar for dilbert_here00
0
445
Member Avatar for darangho

Hi all I am working on a project with Python tk GUI and trying to make a scrollbar that scrolls more than one canvas horizontally tried to approach it as option command = ~~ and ~~ but it seems not working does anyone have any idea on this issue??

Member Avatar for darangho
0
3K
Member Avatar for LW00

Hi, I wrote a program which runs a .bat file using os.system like: 'os.system(pathToBatFile)' and everything was good. Then I decided to turn my program into a service as opposed to being run with the command prompt showing. When my program became a service, I noticed that the os.system command …

Member Avatar for LW00
0
112
Member Avatar for rybro1

im making a maths game but i need to know how to make 10 random questions appear in a text box for easy medium and hard addition and subtraction with 1-100 for easy, 1-200 for medium and 1-500 for hard..please help me =) [ICODE]from Tkinter import * import Tkinter as …

0
60
Member Avatar for tdeck

I'm having a problem which can be exemplified by this python (3) code: [CODE] def askname(): sys.stdout.write("What is your name? ") x = sys.stdin.readline() sys.stdout.write("Hello, "+x) [/CODE] When I run it, I expect to get the prompt, type in my name, and then get the greeting. Instead, it prompts for …

Member Avatar for jlm699
0
151
Member Avatar for penguin22

not to sure why this does this [code=python] server = smtplib.SMTP("smtp.mail.yahoo.com") server.connect("www.mail.yahoo.com") sendEmail("FlexPt1.txt") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 10, in sendEmail File "/usr/lib/python2.5/smtplib.py", line 691, in sendmail self.rset() File "/usr/lib/python2.5/smtplib.py", line 453, in rset return self.docmd("rset") File "/usr/lib/python2.5/smtplib.py", line 378, in …

Member Avatar for zachabesh
0
1K
Member Avatar for mishra59

HI, I am working on a project and need to take the sql table structure out using python language. Basic idea behind is to prepare a program which could run on any sql database and table name provided could fetch what are columns and rows present in that table.

Member Avatar for zachabesh
0
66
Member Avatar for ihatehippies

I've been looking around for the best way to access a frozen exe's stored resources, specifically bitmaps. Apparently this isn't very common or everyone already knows how to do it. I found the pkgutil, am I looking in the right direction?

Member Avatar for ihatehippies
0
106
Member Avatar for penguin22

I want to delete a directory through python and the cmd window but i want it to open the command do the rd and then close and continue on with the program with out me having to type RD /s folderName

Member Avatar for jlm699
0
112
Member Avatar for SuperMetroid

When I try to run the game it freezes and I get an error. the Code: [code] bif = "bg.jpg" mif = "ball.png" import pygame, sys from pygame.locals import * pygame.init() screen = pygame.display.set_mode((800, 600), 0, 32) background = pygame.image.load(bif).covert() mouse_c = pygame.image.load(mif).covert_alpha() while True: for event in pygame.event.get(): if …

Member Avatar for fallopiano
0
1K
Member Avatar for sleign

I've been trying to figure this out for a few days, and my teacher can't really answer my question, as he is just as stumped as I am. Python is supposed to be pass by reference, but I keep getting pass by value when it comes to returning a bool …

Member Avatar for woooee
0
389
Member Avatar for atqamar

I am given several coordinates on a 2D plane. These points represent the centers of circles of a constant specified radius. I've been working on a program that outputs all of the coordinates of the circles that collide. This is simple to do if I simply create a distance matrix …

Member Avatar for atqamar
0
140
Member Avatar for tdeck

I'm wondering if there's a way to open standard I/O as a stream, so I can write and read character by character. Something like [code] handle = open(stdio) [/code] Any ideas?

Member Avatar for jlm699
0
107
Member Avatar for plaf

Dear all, I need some help please :) I have been trying to plot several subplots, with the y axis being in linear and the x axis in log. I need both axis to be tight to the data. Here's what I have: [code] import wx import scipy.io.matlab as matlab …

0
54
Member Avatar for flipjoebanana

Hello, My problem is is that I have an area in the window for an image that is sized relative to that window. I want to place a panel below that image a certain distance from the top based on the height of image after resizing the window occurs(on idle …

Member Avatar for flipjoebanana
0
133
Member Avatar for you2

I have log file which gives CPU utilization and timestamp value at regular interval. Logs snippet below: ==========LOGS============== a:CPU [ 85%]: asdf asd 123 xyz A: Ts 23086, Netvalue 3286, someothervalues 3456 abc abc xyz xyz a:CPU [ 75%]: asdf asd 123 xyz A: Ts 24088, Netvalue 3266, someothervalues 6576 …

Member Avatar for you2
0
191
Member Avatar for dieg0s

Hi, I'm trying to use grep on a file from within a python script, I was thinking of something like this: [code] variable = 123 s = subprocess.Popen("grep" + "-w "variable" Data.txt") [/code] How do I use a variable from within the call to grep? Cheers Andy

Member Avatar for jlm699
0
7K
Member Avatar for smoore

Hey all. this is my first day python programming (been programming java for almost a year tho) and I was trying to put together the classic "shout" method. so far it is like this: [CODE] import time def shout(string): for c in string: print("Gimme a " + c) print(c + …

Member Avatar for sravan953
0
123
Member Avatar for ChipT

I am hoping to build a website that accesses a database (possibly Amazon's SimpleDB, but perhaps not) for both presenting query results and adding additional data to the database. I hope to eventually build a sleek AJAX interface as well. I have been told that Python would be an excellent …

Member Avatar for Stefano Mtangoo
0
133
Member Avatar for pymatio

I have this code: [CODE] import pygame from pygame.locals import * from sys import exit from random import randint from sys import argv from gameobjects.vector2 import Vector2 def Intersect(s1_x, s1_y, s2_x, s2_y, image): if (s1_x > s2_x - image.get_width()): if(s1_x < s2_x + image.get_width()): if(s1_y > s2_y - image.get_height()): if(s1_y …

Member Avatar for Clueless86
0
184
Member Avatar for zachabesh

Hey all, Working on a medium sized Tkinter app. I have it working fine, but I feel like the app isn't as clean as I would like it to be, namely because I have a million labels and different widgets and I can't figure out what to call them... For …

Member Avatar for bumsfeld
0
93
Member Avatar for penguin22
Member Avatar for penguin22

Hi i can not seem to find out how to put the output of mxmlc file into an output this is wat i have [code=python] os.system("mxmlc.exe swick.swc -output location/swiff.swf")[/code]

Member Avatar for JasonHippy
0
142
Member Avatar for penguin22
Member Avatar for southafrica1

Hi All I've seen this topic discussed in various forums, but that was awhile ago and they didn't really answer my questions. I'm looking for a version of py2exe that works with python 3.0.1. As far as I know, there isn't one that has been developed yet. Has one come …

Member Avatar for southafrica1
0
175
Member Avatar for sravan953

Hey guys and gals, I have a wordpress account and a blog...but I want to start another blog related to Python.. My question is this: is there a widget or anything by means of which any code I post on my blog gets automatically highlighted? Thanks a lot! :)

0
71
Member Avatar for penguin22

When i try to build a visual studio solution it does not want to build so far this is what i have [code]os.system("devenv.exe filename.sln /Build")[/code]

Member Avatar for penguin22
0
158
Member Avatar for sravan953

Hey guys, I have some trouble understanding global variables, threading, and functions... Code: [CODE] import threading a=1 class myThread(threading.Thread): def run(self): global a print(a) a+=1 t=input("Specify the number of threads: ") for b in range(t): myThread().start() raw_input() [/CODE] [I][B]#1 doubt:[/B][/I] [CODE] class myThread(threading.Thread): def run(self): global a print(a) a+=1 [/CODE] …

Member Avatar for Stefano Mtangoo
0
225
Member Avatar for Dixtosa

hi again!:) when i use urllib.urlretreive(somthing,local_somthing) it crushs cpu,comp. what can i do? sorrry for my english that is code: [code] class UPDATE(wx.Frame): def __init__(self): pass def Download(self): wx.Frame.__init__(self,None,-1,"Downloading",(0,0),wx.Size(500,500)) panel=wx.Panel(self,-1) self.gauge = wx.Gauge(panel, 57, 100,(100,100), size=(250, 25)) wx.StaticText(panel,-1,"downloading please wait..",pos=(0,0)) self.Show() self.geturl("http://vpython.org/contents/download/VPython-Win-Py2.5-5.11.exe","hoho") def _reporthook(self,numblocks, blocksize, filesize, url=None): #print "reporthook(%s, %s, …

Member Avatar for Dixtosa
0
156
Member Avatar for kdikert

I have a worker thread, and when the worker is done I want it to show a popup dialog. The sample application below demonstrates this. There are two buttons: a "Show dialog" button which immediately displays a dialog, and a "Do work" button which launches a worker thread. The worker …

Member Avatar for funfullson
0
635
Member Avatar for plaf

Dear all, I need some help :) I have been trying to plot several subplots, with the y axis being in linear and the x axis in log. I need both axis to be tight to the data. Here's what I have: [code] import wx import scipy.io.matlab as matlab import …

0
34
Member Avatar for catcit

Hello! I`m new here and I hope you could help me. I have to make o program that takes an excel file, counts the number of columns and extracts only two columns from the file and prints them in a .txt file. The number of the columns are inserted from …

Member Avatar for sab786
0
133
Member Avatar for Aiban

Hi There. My code is functioning well these days ... my first project which is a big project is nearing completion and would like some ways of tidying up some functions. It's a backup program and when you press a button it backs up a section of your system. Here …

Member Avatar for Aiban
0
627
Member Avatar for Stefano Mtangoo

I want to use folded panel in wxPython, like one In explorer in Windows XP. I have tried to check through API and Demo but I cannot Get Idea. The Demo example is complicated Anyone to get me up and running. I'm still googling, but your help is highly appreciated …

Member Avatar for Stefano Mtangoo
0
206
Member Avatar for Stefano Mtangoo

I have two different pyApps, and I want to make a task bar Icons. For one I use .ico file and another .png file. The .ico one works but not the .png file. Does it mean I cannot use PNG file to make taskbar icon? Here is a code that …

Member Avatar for Stefano Mtangoo
0
93
Member Avatar for penguin22

i need help trying to open an .exe file then opening a file in said exe program i.e i wanna open a file in flash after opening flash. so far i can open the exe file with no problem but from there I'm stuck. this is what i have [code] …

Member Avatar for sravan953
0
146
Member Avatar for Aiban

Hello. Before i embark on the grand search for the next few days of my life (hey who needed them anyways) i wondered if this was possible cause in my head i can't imagine a program being able to do this due to a difference in email clients etc basically …

Member Avatar for Aiban
0
139
Member Avatar for StMark

Hi My "callable" function doesn't work. Who knows why? [CODE]>>> callable(print) Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> callable(print) NameError: name 'callable' is not defined >>> [/CODE] Regards, Mark

Member Avatar for StMark
0
215
Member Avatar for aot

I have a nice little Tkinter program but need to make the mouse cursor invisible for parts of it. I have seen ways to make the cursor change to other images, but I need it to actually be invisible. Any help? P.S. If you think it's impossible that would be …

Member Avatar for Fistroman
0
163
Member Avatar for zanst

Hello all, I'm beginning in Python and I need to input some information in a declared variable, like this: [code]XML = """<?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Header> <Authentication xmlns="http://xxx"> <Account>xxx</Account> <Password>xxx</Password> <Guid>xxx</Guid> </Authentication> </soap12:Header> <soap12:Body> <SendMessage xmlns="http://xxx"> <message> <From>xxx</From> <MessageBody>xxx</MessageBody> <MessageDate>xxx</MessageDate> <Subject>xxx</Subject> <Devices> <DeviceMessageVO> <Phone>[B]I need to input …

Member Avatar for zanst
0
175
Member Avatar for akindo

Dear all, I am quite confused about the Python logging. I have read and re-read the Python documentation for the Python logging module and googled, but to no avail. I simply want one logger to log to a file and another logger to log to the console. Neither should log …

Member Avatar for akindo
0
152
Member Avatar for arya6000

Hello I'm brand new to Python, I usually program in Perl, C, C++, but I would like to try pamie with Python, I download it and I moved the 2 files called PAM30 and winGuiAuto to C:\Python26\Lib\site-packages but after I run this code [CODE] from cPAMIE import PAMIE # create …

Member Avatar for Salem
0
95
Member Avatar for kalyan mohan

Hey guys, I have got one problem.... I am very new to wxpython. I have coded a program which takes input in the terminal and I would like to take the file as input (a photo) with an interface... like when we upload pics in internet we get a file …

Member Avatar for kalyan mohan
0
106
Member Avatar for akindo

Hi guys, I am trying to use the Python logging API to log only to a file. The code below logs to only a file if I have it at the beginning of my class, right beneath the "class ..." line. If, however, I put it inside a method, it …

Member Avatar for akindo
0
3K
Member Avatar for SoulMazer

Hi, so I am trying to write a simple chat server in Python. If I just run the server, it runs fine. Yet, when I try to connect to the server from a different terminal via a "telnet localhost (port)", the server gives me an error: [quote] error: uncaptured python …

Member Avatar for SoulMazer
0
164
Member Avatar for Clueless86

I thought I should take a few days and read some more, and learn a little more. I decided to take a more easier approach. This 'start' of a simple pirate game, which I did not reference anything for once. So its all wrote from what I know, and not …

Member Avatar for jlm699
0
414
Member Avatar for bgk111

I am trying to write a python program that will enter another program using a shell command, then issue commands to that program, then exit the program and continue running the rest of a python program. To be more precise, if I was simply running in a shell, I would …

Member Avatar for bgk111
0
125

The End.