15,175 Topics

Member Avatar for
Member Avatar for bond00

I've looked everywhere and I'm sorry if I'm missing the obvious, but I'm irritated out of my mind trying to find this solution. All I want to do is start an application with arguments in a new window (cmd.exe or linux terminal). I don't care about piping the data from …

Member Avatar for inuasha
0
6K
Member Avatar for p_sbk

Hi, I am new to python world ! Requirement is to automate plashing process. I need to run few ommand from command line (cmd) on window. - open cmd - execute command1 - execute command2 could you help me to develop script to automate this process ? Br, sbk

Member Avatar for inuasha
0
144
Member Avatar for imperialguy

Following is the system and software info [b]Platforms: Windows XP and OSX Lion Activestate Python 2.7.2 wxPython2.9-osx-cocoa-py2.7 (for OSX) wxPython2.9-win32-py27 (for Windows XP)[/b] I am trying to create a UltimateListCtrl using ULC_VIRTUAL and ULC_REPORT mode. I would like to know how can I put a checkbox beside the first column …

0
215
Member Avatar for Ares08

Hi guys, I am fairly new to python. The problem I am having is manipulating the data that I read from a file. Example: if a line of the file is Monday = 0800, is it possible to break up that line so I can read Monday and 0800 separately …

Member Avatar for woooee
0
154
Member Avatar for princessotes

i have two files containing lists and I would like to perform some manipulations with the numbers. file 1: [list] A 1 B 2 C 3 [/list] and file 2: [list] A 4 B 5 C 6 [/list] I have written the following code to read in the files and …

Member Avatar for woooee
0
90
Member Avatar for alpdoruk

Hello everybody, I wrote a script as like below arr = [(line.rstrip('\n').split(';')) for line in open('C:/Config_Changer.csv')] import sys import fileinput for i, line in enumerate(fileinput.input('C:/1.cfg', inplace = 1)): for f,t in arr: if 'description' not in line: line = line.replace(f, t) sys.stdout.write(line) ok my problem is my config changer file …

Member Avatar for alpdoruk
0
261
Member Avatar for oli82

Hi, Thank you for your help in advance, i am trying to create a dictionary, the code below works fine if I have two columns in each row with no spaces, however one of the columns data natively has spaces in it e.g. Sarah me hy uuuuu at the moment …

Member Avatar for oli82
0
2K
Member Avatar for Ismatus3

Hello friends In my window Tkinter there is 3 entries : actualpass , newpass , confirmnewpass . I just want to know how to do to check all entries one by one : if actualpass is empty : print "enter ur password" if actualpass is not empty and and newpass …

0
52
Member Avatar for iPanda

How can I use the "datetime" class to get a different time zone than mine? (for example gmt = 0 or utc+2) Thanks!

Member Avatar for iPanda
0
128
Member Avatar for BCBTP

I was wondering if anyone has some good examples of running python functions and scripts within C++ using the Python C API. I can't seem to understand the ways of the Python C API, and was expecting something more similar to the Lua C API. The real question is "What …

Member Avatar for vijayan121
0
316
Member Avatar for Jean Declaix

In the following code : [COde]#!/usr/bin/python # -*- coding: iso-8859-1 -*- import Tkinter import os import threading class Fil (threading.Thread): def __init__ (self): threading.Thread.__init__ (self) print "Init Fil" def f1 (self): print 'f1' #app().ecrit(1) class App(Tkinter.Tk): def __init__(self,parent): Tkinter.Tk.__init__(self,parent) print "Init App" self.initialize() ping() def initialize(self): self.grid() self.bouton1L = Tkinter.Label(text="-", …

Member Avatar for Jean Declaix
0
249
Member Avatar for Lemony Lime

I'm making an RPG, and am trying to split things up into multiple files to organize things better. (I mean, character creation alone was over 2000 lines.) But this is something that I've never done, and I'm really not sure how to do it. So, if I could get some …

Member Avatar for ret801
0
285
Member Avatar for hovestar

I'm trying to devise a program that attempts to solve the Collatz Conjecture, Wikipedia, but when I run it I get this error: [CODE] What value would you like to find if the collatz works for below?6 Traceback (most recent call last): File "/private/var/folders/fL/fL1lGxccGCypPBSIUXNGZGpkwIg/-Tmp-/Cleanup At Startup/Playground-345866896.786.py", line 27, in <module> …

Member Avatar for TrustyTony
0
247
Member Avatar for deeksha923

Hey ppl im a student and i just started studying robot framework using python.Can anyone pls help me out with the submissions. It is really important for me. I just cant get the whole thing how much ever i try.I have come up with the following code for fibonacci series(given …

0
93
Member Avatar for hszforu

I want to create text files(empty) depending upon the user input, suppose if the user enter 20 , then it should create 1.txt,2.txt to 20.txt Assuming i want to create 2o files, then i wrote the foll code: [CODE] for i in range(20) filename="i.txt" fp=open('filename','w') fp.close() [/CODE] but i know …

Member Avatar for TrustyTony
0
170
Member Avatar for sabbib

[CODE]import string def main(): print ("This program calculates the number of words in a sentence") sent = input("Enter a sentence: ") words = str.split(sent) print ("The total word count is:", len(words)) print ("The total character count-withspace is:", len(sent)) retry = input(''' Would you like to try again?''') if retry == …

Member Avatar for TrustyTony
0
233
Member Avatar for pythonstudent11

As promised, here is my final project in my Python programming course. I got the solution all by myself, although, feel free to make any changes you see fit, I've already turned it in. [quote]For this assignment you are to develop a Python program based on the scenario and following …

Member Avatar for pythonstudent11
0
382
Member Avatar for mang0

Hello all! I'm using the phenny IRC bot, and I've got this script, to greet people when they join a channel: #!/usr/bin/env python """ greet.py - Phenny Sahana-Eden Greet Module (c) 2011 Nolan Lum <nol888@gmail.com> """ import os, re import sqlite3 def setup(self): fn = self.nick + '-' + self.config.host …

0
124
Member Avatar for Daman824

I've been trying to make a cash register program and right now this is my draft. For the program, the prices need to add up to a total which than will be calculated with HST and discount amounts. The discount needs to be the lowest number price entered from all …

Member Avatar for Daman824
0
157
Member Avatar for Cenchrus

Hey guys and gals, I'm just starting Python, and I was wondering if someone could translate this code into english ? from sys import argv script, first, second, third = argv print "The script is called:", script print "Your first variable is:", first print "your second variable is:", second print …

Member Avatar for Cenchrus
0
5K
Member Avatar for jacob501

I was going to try and use Mechanize for one of my programs so I just tested a bit of code I found on a website when I was searching for a tutorial on mechanize. [url]http://stockrt.github.com/p/handling-html-forms-with-python-mechanize-and-BeautifulSoup/[/url] I know the site is 2 years old but on all of the other …

Member Avatar for jacob501
0
996
Member Avatar for C0deM0nkey

Alright guys, I'm kinda new to python. I've made a kind of an organiser program that allows you to make entries with deadlines, write them to a text file and display them in human readable format when I want it to. I first made it in command line and it …

Member Avatar for C0deM0nkey
0
242
Member Avatar for TrustyTony

This code is based on code from series of programs [URL="http://www.ferg.org/thinking_in_tkinter/"]'Thinking in tkinter'[/URL] This code is not perfect, especially it does not recognize key release when mouse moves out of button area during push. Leave event could also be captured for that to stop the event in that case.

0
497
Member Avatar for pynoobie

I am having trouble compiling an exe. I tried both py2exe and cxfreeze with similar results, I made an exe but it didn't work. I figured out that I needed to send the image files and sounds with it (should have thought of that to begin with). Now that I …

Member Avatar for pynoobie
0
251
Member Avatar for Koreakid101

So I'm writing a code that imports pygame to play files of music notes. I set each note to a button, 24 notes for 24 buttons. However, the program will also have four more buttons: "Record", "Stop", "Playback", and "Quit". when the record button is clicked, it will append the …

Member Avatar for TrustyTony
0
9K
Member Avatar for wkarl
0
107
Member Avatar for ChristianOncken

[CODE]from time import sleep import win32com.client as win32 RANGE = range(3, 8) def word(): word = win32.gencache.EnsureDispatch('Word.Application') doc = word.Documents.Add() word.Visible = True sleep(1) rng = doc.Range(0,0) rng.InsertAfter('Hacking Word with Python\r\n\r\n') sleep(1) for i in RANGE: rng.InsertAfter('Line %d\r\n' % i) sleep(1) rng.InsertAfter("\r\nPython rules!\r\n") doc.Close(False) word.Application.Quit() if __name__ == '__main__': word() …

0
60
Member Avatar for jimmy19

I am trying to create a walker that goes through directories. Here are the inputs and outputs which I have partly working. I am using a test directory but I would like this to be done on any directory which is leading to some problems. [CODE][IN]: print testdir #name of …

Member Avatar for TrustyTony
0
213
Member Avatar for subhra1234

hell everyone,i am ruuning a program from headfirst programming using pygem.....my pygem is installed in this location -------> [B][COLOR="Red"]C:\Python32\Lib\Lib\site-packages\pygame[/COLOR][/B] now my piece of code is: [B]from tkinter import * import pygame.mixer app = Tk() app.title("Head First Mix") app.geometry('250x100+200+100') sound_file = "Sototar Bilasita.wav" mixer = pygame.mixer mixer.init() def track_start(): track.play(loops = …

Member Avatar for C0deM0nkey
0
118
Member Avatar for init

Hi. I'm creating an interface using the Tkinter library, but I seem to be having some issues with placing 3 buttons BELOW 3 buttons which are on top. All buttons should be inside the second LabelFrame. I've looked all over and I can't seem to figure out why the other …

Member Avatar for Ismatus3
0
1K

The End.