15,181 Topics

Member Avatar for
Member Avatar for Ares08

I'm fairly new to python and I've been working on this script for a week. I would like to get your input on my script and what improvements I can make to it. The way it works is by reading a file for backup times, which folders to backup and …

0
30
Member Avatar for jacob501

Hi. I am making a python program that automatically enters information into a form on a website. I looked at a module called mechanize at first but then I realized that it didn't support javascript. Is there any way to take a piece of information and insert it into a …

Member Avatar for jacob501
0
125
Member Avatar for Tcll

this is just a little project I'm working on for my converter I'll be asking for C++ to Py conversion since IDK C++ well enough to do it myself... but the project involves converting the current functions as well as writing opposite functions... (since the SDK only worries about writing …

Member Avatar for Tcll
0
439
Member Avatar for BenDeMoor

Does anyone know how to duplicate the top of the 'Torre Agbar' building? I've been able to make the whole colom structure but the top code is bothering me Pls help; need it for my school assignment What I'e got so far : [CODE]from visual import* import math #gegeven straal= …

Member Avatar for griswolf
0
139
Member Avatar for carasel

Hello Sorry about the stupidity of my question, I'm rather new to python. I'm writing a text analysation program. It reads from a text file and creates a list called 'line' which has variable length and is a list of words. I want to make a loop that will go …

Member Avatar for carasel
0
6K
Member Avatar for monica23

Good day expert, am trying to direct user to a web page if login is okay in python but does not work [CODE] if username==okay and password == okay: # direct to success_page.py print "Location: success_page.py\r\n"; else: direct to errorpage.py [/CODE] the code does not work as the web page …

Member Avatar for inuasha
0
225
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
394
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
998
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

The End.