473,544 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python Forum

Python programming language - Ask questions about python interpreter, control flow, data structures, modules errors, classes, standard library, gui, databases, unit testing, object oriented, structured programming and more.
2
1,845
thread by: ab231189 | last post Dec 6 '13 by: dwblas
I have two lists: list1: list2: iterate over list1: compare each element in this list with the elements in the list2, if there is a number encountered in the 2nd list which is an exact match or an approximate match to the element in list1 then output that match Note: I want to avoid the N^2 iteration strictly...
13
1,342
thread by: mar12 | last post Dec 7 '13 by: Luuk
Reading from a file and writing to a different file. Any guide on how to initialise the read and write functions?
1
1,801
thread by: mar12 | last post Dec 8 '13 by: bvdet
How can i read from keyboard an integer followed by a list of length consisting of floats? Is there a single line command for that or must it be done separately? Is a for loop applicable?
0
1,390
thread by: tupipindo | last post Dec 11 '13 by: tupipindo
I need a download progress window (gui) and resume capability added to it. So far I have done this: import urllib2, base64, os def dl(): dwnld="http://xxx.xxx.xxx.xxx:xx/user/file.zip" username="user"
0
1,110
thread by: mathurin | last post Dec 12 '13 by: mathurin
How do I know which modules I need? I mean I want to move a file around a network so I import sockets; but how do I know I need to import sockets? Is there a list somewhere of all the modules and what they do?
1
1,324
thread by: mathurin | last post Dec 12 '13 by: bvdet
Hi, Total newbie; I kind of understand modules and I totally see why they are so useful. I guess my big question with them is how do I know what modules are out there and how do I know which modules I need for the code I'm trying to write. I.E. instead of writing a bunch of functions, code, etc, how do I know or not know if there is a module...
0
1,244
thread by: mark1bristol | last post Dec 16 '13 by: mark1bristol
Let me preface this by I am very new to python programming... I was looking at an old discussion about this that basically showed how to create a pointer to a structure to send to a C function in a DLL, it was... from ctypes import * class STUDENT(Structure): _fields_ = buffer = (c_byte * 1024)() buffer_p = pointer(buffer) ...
4
4,887
thread by: RivalDealer | last post Dec 16 '13 by: RivalDealer
As part of a real coded genetic algorithm, I have to generate a random number beta that follows Laplace Distribution. The give relationship is - beta(i) = a-b*log(u(i)) = a+b*log(u(i)) Where i varies from 1 to n (n is the length of the chromosome). r(i) and u(i) are uniform random numbers belonging to the interval . a and b are...
2
7,102
thread by: Cedilex | last post Jan 2 '14 by: dwblas
I know that PythonWin is for Windows platform but is there a f=version of PythonWin for MAC? If not what is the alternative?
0
1,052
thread by: Overline | last post Jan 2 '14 by: Overline
There are some online sites where different langauge can be compiled Some are as under http://ideone.com http://www.compileonline.com i guess these sites cannot compile many libraries/modules of computer languages e.g. Beautiful soup for Pyhon or Mechanize for Perl & some other for other languages Is there any website which can compile...
0
990
thread by: precyoz | last post Jan 2 '14 by: precyoz
I have a code here and I just want to ask if what are the missing codes or what should I add so that every time I'm going to run this code a GUI will already appear and not the IDE/console anymore. from ftplib import FTP import os, sys, os.path, operator import wx host_name = raw_input("Enter your FTP Site: ") if "http://" in...
2
1,277
thread by: roryclancy | last post Jan 2 '14 by: roryclancy
I am on a window xp and I've down loaded python 2.7.6 and wxpython 3.3, and i've run the following code #import wx class bucky(wx, frame): def __init__(self, parent,id): wx.Frame.__init__(self, prent, id, 'Frame aka window', size = (300,200)) if __name__== "__main__": app = wx.PySimpleApp()
3
3,437
thread by: precyoz | last post Jan 6 '14 by: precyoz
Hello everyone. I'm encountering a problem with the python ftp download. Every time I run this script and connect to my ftp site it only downloads 16 files wherein the ftp site contains almost hundred files and counting because it always update and add files everyday. I'm wondering if is it because of the internet connection or maybe there's...
0
1,064
thread by: precyoz | last post Jan 6 '14 by: precyoz
I have here a script from Kika http://zetcode.com/wxpython/gripts/ which is a gript that connect to an ftp site (when you run the Kika program it will show a log in window and when you click connect it will state that you're successfully log in and nothing follows.)What should I add in this script so that every time I run the script and...
4
1,382
thread by: roryclancy | last post Jan 8 '14 by: bvdet
how do you configure python-idle to color code the code I've tried going into options and clicked on the highlighter tab and massed around there but i cannot to work
1
11,508
thread by: dillonko | last post Jan 8 '14 by: bvdet
def remove_duplicates(xlist): new_list = return print remove_duplicates() i am trying to remove repeating numbers from a list that can be any size. but when I test out this idea i hit a brick wall. I get TypeError: 'int' object is not iterable. I have tried several alternatives as a single liner but was unsuccessful. Please can...
4
1,075
thread by: roryclancy | last post Jan 9 '14 by: roryclancy
when I did this on hypercard all i had to do was: put the date into date convert date to secs(onds) date =+ (24*60*60*No_of_days_i_want_to_add_on) convert date to the date Is there any way I could do that with Python
0
1,595
thread by: papilon | last post Jan 16 '14 by: papilon
1.Declare, the vbcom was Global variable 2.After, vbcom was closed(use vb close button) but, the vbcom process is activating , Certainly! 3.Then, declare the vbcom was local variable but, a function(py2vb button) is not operating... 4.ASK!!! •When the vbcom is local variable •How do I write the code to operate the py2vb button
1
1,621
thread by: sudarshana91 | last post Jan 16 '14 by: bvdet
I am working on linux.I want to convert .doc and .pdf file to .txt in the python program code itself. but i am unable to do this.Please help me with the code. I am using putty to run the python code and python 3.3 is installed in my machine.
2
7,213
thread by: Bhag | last post Jan 17 '14 by: Bhag
Hi, I have an excel file which contains RGB values of an image. I would like to know how to get the image from those RGB values. Can someone help me? Thank you
1
1,754
thread by: Bhag | last post Jan 17 '14 by: bvdet
Hi, I have an excel file which contains 3 columns and lots of rows. How do I put these data into a list in Python? (like )
1
1,656
thread by: Bhag | last post Jan 23 '14 by: bvdet
Hi, I have a data set which contains RGB values. The RGB colours are clustered as 1,2,3 and 4. The file is like this. R G B Cluster 12 2 123 1 23 32 45 1 21 56 45 2 12 57 87 2 .... I want to display these data according to the clusters like yellow color for cluster 1, Black for cluster 2 and so on. Could you please tell me...
0
972
thread by: sraju310 | last post Jan 24 '14 by: sraju310
Hi, How to detect remote machine os, while connecting? I want to find out remote machine os is windows/unix/linux/solaries, without login into the machine, while connecting itself. Thanks, Raju
1
1,612
thread by: SkSeMi | last post Jan 24 '14 by: bvdet
I have a string variable string of the date: data = "24.01.2014 15:25:45" How convert this data to Unix timestamp and back? Which Python commands? Thank you very much!
3
1,327
bajajv
thread by: bajajv | last post Jan 29 '14 by: bajajv
Hi, The below code works: newList = newList = 'zz' print newList But the following code is giving error -

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.