15,175 Topics
| |
Ive written a small program to convert celcuis o Fahrenheit and vice versa. The script as it stands works : [CODE]#!/usr/bin/python import sys def convert(t,fc): if t == "c": print (fc * 9) / 5 + 32,"Degress Fahrenheit" elif t == "f": print (fc - 32) / 9 * 5,"Degress … | |
i searched the internet and found no scripts for dynamic text (user input, process and output) for blender game engine. id appreciate any help. i can only make the user type in the game but could not get it to be saved in a global variable which i will use … | |
Hi, I'm new to Python, I'm practicing queries sqlite3 database, I will present what I have so far. until now I have not seen an example of how to reflect queries a database using wxPython I hope I help, do not write very good English. frame.py import wx import sqlite3 … | |
I am just learning python. I am switching from visual basic so this is a bit new to me. I am trying to write a loop for a super small script. It is below I am trying to understand the def f() how to loop that short code over and … | |
[B][LIST=1] [*]it's very exciting to be alive in this age of technological revolution and deep spiritual awakening. for me, to be fulfilled means to be fully engaged expanding your knowledge and wisdom and giving back to the society while you remain happy and true to your mission. i would like … | |
I have two text files containing multiple lines of text from a datalogger, and I need to compare the two files and save the difference into a third text file. ie.... text1: 10/13/01, 21:34:23, 4324 10/14/01, 09:12:32, 3423 10/15/01, 04:45:54, 7834 text2: 10/12/01, 43:34:34, 6453 10/13/01, 21:34:23, 4324 10/14/01, 09:12:32, … | |
for the past ten years i have tried without much success to program in c, c++, java and c# .net. my major problem has been inconsistency and lack of focus and direction. now, i want to start all over again with Python as my language of choice. what must i … | |
Hi all, I'm running a python program that takes to long to run - several days on a normal machine. To make things faster, I have decided to use a cluster of giant computers to run this code. Does anyone know how to use Message Passing Interface (MPI) in python … | |
Trying to build a simple python script on my mac, but the mac is 64 bit and apparently does not want to play nice. Does anyone know of any workarounds or if I am missing something? command i am running is python setup.py py2app -A output is: error: argv-emulation is … | |
Hi Friends, I want to learn web application development. I have good experience in C programming language and no other language. Can you please suggest me where to start with? I have already dived into Python a bit, so I searched the net for some good framework and got Django. … | |
Hi, I have a thousands of IP addresses, repeating randomly in my database and I wish to print each IP address along with the number of times they are repeated. For example, 162.10.2.1 162.10.2.1 162.10.2.1 192.34.1.10 172.11.2.9 192.34.1.10 192.34.1.10 Output: 162.10.2.1 - 3 192.34.1.10 - 3 172.11.2.9 - 1 I … | |
Hi All Please some one Help me find out why this code doesn't work: [code=python]codes=['zlib', 'zip', 'base64', 'hex', 'utf-8'] def encoder(str, i): return str.encode(codes[i]) def decoder(str, i): return str.decode(codes[i]) en = encoder('Some string here', 2) print en[/code] | |
[CODE]title = 'Pmw.NoteBook demonstration' # Import Pmw from this directory tree. import sys sys.path[:0] = ['../../..'] import Tkinter import Pmw class Demo: def __init__(self, parent): # Create and pack the NoteBook. notebook = Pmw.NoteBook(parent) notebook.pack(fill = 'both', expand = 1, padx = 10, pady = 10) # Add the "Appearance" … | |
Hello everyone! I've started developing a little application for one of my friends, which he will use at work to measure his hours working + the time he has breaks. I wanna do this in python cause, I just started with this language and wanna get more fimiliar with it. … | |
This does not look very efficient with transponation, sort and transponation back, so I am happy to hear about better alternatives. | |
Hello, I have to append 30 Excel 2007 files, each with 6700 columns, into one. The problem is that in these files the columns are not in the same order(the column names are the same in all the files). Im having Python27 with openpyxl, Win7, MS Office 2007, MS SQL … | |
Another task from C++ forum is trivial in Python even taking handicap of not using Counter. | |
I'M working my way through a python book and I've just come to a section on python web programming. Here's what it's had me to do. Create a folder called "public_html" in my home directory "developer", note that this is in linux system. Inside that folder create a file called … | |
My not OO version of timer for work and pause time (but it does use attributes for functions, which are objects, to avoid global declarations in functions). | |
Hey there, i would like to do a rank of the averages, but when i click in the button ranking, it says that global name 'media1' is not defined. can someone help me please? thanks in [CODE]# -*- coding: cp1252 -*- import wx class duff(wx.Frame): def __init__(self,parent,id): wx.Frame.__init__(self,parent,wx.ID_ANY,'Duffan Formula', size=(400,370)) … | |
I want to have two threads with a queue exchanging data (in the form of lists) between the two threads. However, at the moment I cannot fathom out how to write the code simply for taking the first list from the queue, processing it(which I have written the function for) … | |
Hi, I'm new to python and I am having issues attempting to input data into my code from a text file. The text looks like this: >INFO> CELLID, #729, >INFO> 20100520-035248 LightningTable (scale_1) >INFO> LON,LAT -96.485,34.67,0 datatime, maxref, ref_-10, MaxVIL, TotalVIL, Size(km2), CGDenAVG, CGmaxden, CGCount, FlashCount, FlashDenAVG, MESH 20:03:30:05, 63.5, … | |
Hello, I've this lise: [CODE]lst = ['10:User1', '80:User2', '100:User3', '00:User4', '75:User4', '45:User5'][/CODE] I want to print it as: [CODE]100 User3 80 User2 75 User4 45 User5 10 User1 00 User4[/CODE] So, I want to organize them by the number. | |
Greetings to Everyone :cool: , I just would like to know how to run/launch/start the IDLE ide of python in linux? (In windows the IDLE ide comes part of the python download, I assume its the same for linux??! or not?!) I currently have installed ubuntu linux, its already got … | |
Hello All This is my first post in this forum, despite my long visiting hours as a guest:D I don't have any background in programming and I'm a newbie in python too. But Learning python for S60(Python distro for Symbian Phones. anyway, I have a problem with printing from two … | |
Hello, I've got a problem that I can't seem to figure out. I'm writing a program to simulate a process manager, and I'm doing four different algorithms: First come first serve, shortest job next, shortest remaining time, and round robin. I've got the first two down perfect, but I'm having … | |
Hi, I am trying to use Regular Expressions to modify text without modifying the wildcard value. Here is an example: [CODE]import re text = 'Reference [14] and Reference [17] are References.' text = re.sub('Reference \[\d+\]','Ref. [\d]',text) print text [/CODE] I want the output to be "Ref. [14] and Ref. [17] … | |
Say I have a basic list. [CODE]x = [2,3,1,3,5,4,5] [/CODE] And I want to find the sum result applied against the list without duplicates. So with duplicates the code could be. [CODE][elem * 2 for elem in x if elem >= 1 ] > [2, 4, 6, 6, 8, 10] … | |
Can I ask for a little help with virtualenv. I am looking at the docs here [URL="http://guide.python-distribute.org/pip.html"]http://guide.python-distribute.org/pip.html[/URL] and here [URL="http://www.jython.org/jythonbook/en/1.0/appendixA.html#virtualenv"]http://www.jython.org/jythonbook/en/1.0/appendixA.html#virtualenv[/URL] There are a few things I can't quite understand about it. First just to clarify I am on ubuntu and my default python is 2.7.1 1. I use virtualenv to … | |
a software written in python to change the extension of all existing exe files on a system to a randomly generated integer would prevent a conventional virus as knowing the file is an executable and hence from infecting it. i know there are easy ways of getting around this. so … |
The End.