15,181 Topics
| |
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 … | |
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 … | |
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 … | |
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= … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
How can I use the "datetime" class to get a different time zone than mine? (for example gmt = 0 or utc+2) Thanks! | |
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 … | |
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="-", … | |
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 … | |
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> … | |
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 … | |
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 … | |
[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 == … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … |
The End.