15,190 Topics

Member Avatar for
Member Avatar for terious

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 …

Member Avatar for TrustyTony
0
114
Member Avatar for TrustyTony

Another task from C++ forum is trivial in Python even taking handicap of not using Counter.

0
523
Member Avatar for lewashby

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 …

Member Avatar for TrustyTony
0
146
Member Avatar for TrustyTony

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).

0
824
Member Avatar for duffsil

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)) …

Member Avatar for duffsil
0
164
Member Avatar for machine91

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) …

Member Avatar for Gribouillis
0
264
Member Avatar for bsh6wc

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, …

Member Avatar for TrustyTony
0
260
Member Avatar for Boubakr

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.

Member Avatar for TrustyTony
0
141
Member Avatar for NetByte

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 …

Member Avatar for snippsat
-1
1K
Member Avatar for M.S.

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 …

Member Avatar for M.S.
0
537
Member Avatar for Benderbrau

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 …

Member Avatar for majid_shqeer
0
3K
Member Avatar for Smed

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] …

Member Avatar for TrustyTony
0
138
Member Avatar for flebber

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] …

Member Avatar for TrustyTony
0
298
Member Avatar for flebber

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 …

Member Avatar for flebber
0
192
Member Avatar for vidur

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 …

Member Avatar for pseudorandom21
0
222
Member Avatar for adrianandreev

Hi guys, What i need is a way to [B]check the available USB ports in windows[/B] using python. The purpose: I'm trying to run on startUp a script that wait to plug in my Token, and after that the script will log me in automatically into the system that I'm …

Member Avatar for TrustyTony
0
11K
Member Avatar for debasishgang7

As i dont know php i am unable to understand how this code is working? Can any body please help me to convert the following php code into python code. [CODE] function icmpChecksum($data) { if (strlen($data)%2) $data .= "\x00"; $bit = unpack('n*', $data); $sum = array_sum($bit); while ($sum >> 16) …

Member Avatar for debasishgang7
0
97
Member Avatar for hadoque

In order to learn some basics about sockets I'm trying to program a simple IRC client. In order to receive server messages I have a thread that is receiving from the socket. When sending commands to the server a new thread is created, with the same socket. This doesn't seem …

Member Avatar for hadoque
0
172
Member Avatar for newtopython1111

Hi all, I have a data set that has a text header, followed by binary data. I want to search for a certain variable in the text header, store whatever name comes after the variable, and then replace it with X. Since I want to leave the binary alone, I …

Member Avatar for woooee
0
152
Member Avatar for debasishgang7

Hi all, I am trying to calculate checksum of some data using python. I am putting a sample ICMP header here and the correct checksum of that packet(Got this by sniffing network with wireshark) [B]DATA is "08 00 69 eb 8e 13 00 01" And the correct checksum is "0xa9eb". …

Member Avatar for debasishgang7
0
437
Member Avatar for duffsil

wxpython i cant figure out the problem. it says that the global neme 'panel' is not defined. Traceback (most recent call last): File "C:\Users\Daniel\Desktop\Duffan Teorem", line 34, in clickbutton wx.StaticText(panel,-1,media,pos=(150,240)) NameError: global name 'panel' is not defined could someone please help me to figure tha problem out? Thanks in Advance …

Member Avatar for duffsil
0
295
Member Avatar for hughesadam_87

Hey everyone. I have a matrix of matricies. Basically, I have a 3 dimensional matrix object which stores i 2-d arrays. For example: M=(i,j,k) A= M[1,:,:] = (j, k) B= M[2, :, :] = (j', k') etc.. Now, what is want to do is actually do the entire product (A*B*C...); …

-1
75
Member Avatar for felix001

Im trying to run a small python CGI script but when i run it i get the error : [B]malformed header from script. Bad header=[Querying whois.internic.net]: hello_get.py[/B] The CGI scripts im trying to run are : [CODE]#!/usr/bin/python # Import modules for CGI handling import cgi, cgitb import os # Create …

0
76
Member Avatar for de1337ed

Hey guys, I'm a little confused on a web scraping topic. I understand that you can use urllib2 to webscrape, but my project requires a little more advanced scraping. I want to use python to inpute data into a search box, then return the results of that information. As an …

Member Avatar for griswolf
0
3K
Member Avatar for blackcorner

Hi folks: How can I get information regarding the drives in the system?, using Python, off course ;) The information must include (at least in part) the following: [LIST] [*]Size [*]Used space [*]Free space (although you can calculate this value from the former two, some systems are tricky and don't …

Member Avatar for asdsdadfgdgsafd
0
4K
Member Avatar for rhuffman8

This is a continuation of problems with the program posted here: [URL="http://www.daniweb.com/software-development/python/threads/372311"]http://www.daniweb.com/software-development/python/threads/372311[/URL] I started thinking there was something wrong with my statement to open the csv file, using the reader. [CODE]reader = csv.reader(open('C:/Documents and Settings/VPC.VPC-SCALA.000/Desktop/RAH 7-11-11/RH/Projected Cash Goals Template.csv', 'rb')) [/CODE] I put a test statement above the open statement …

Member Avatar for rhuffman8
0
350
Member Avatar for TrustyTony

Breakin news item from [url]http://python.org/download/releases/3.2.1/[/url] (hope the input from command line will also be fixed) Python 3.2 is a continuation of the efforts to improve and stabilize the Python 3.x line. Since the final release of Python 2.7, the 2.x line will only receive bugfixes, and new features are developed …

Member Avatar for bumsfeld
1
497
Member Avatar for hughesadam_87

Hey guys, I am writing a GUI program, and one of the routines requires that I choose a file to be my data file. If the data file is chosen correctly, then my program will send it to a subroutine which will perform a bunch of methods and ultimately construct …

Member Avatar for hughesadam_87
0
135
Member Avatar for magnetic rifle

Is it possible to assign a variable to be a random vector. The only syntax I could find was rand.jumpahead but further research did not seem promising. Thank you, Suhail

Member Avatar for Gribouillis
0
159
Member Avatar for debasishgang7

Hi all, I am trying convert IP addresses form Decimal format [Like 192.168.12.13] to HEX format [c0 a8 9d 80]. For Example the IP "192.168.157.128" is equivalent to "c0 a8 9d 80" in HEX. How to do that.??

Member Avatar for debasishgang7
0
2K

The End.