473,598 Members | 3,252 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.
0
1,599
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
4
1,077
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
1
11,530
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,384
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
0
1,066
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...
3
3,443
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...
2
1,282
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()
0
992
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...
0
1,059
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...
2
7,109
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?
4
4,898
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...
0
1,247
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) ...
1
1,329
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,112
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?
0
1,398
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"
1
1,805
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?
13
1,348
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?
2
1,849
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...
1
1,208
bajajv
thread by: bajajv | last post Dec 6 '13 by: dwblas
hi I am trying to read an xml and trying to write in excel using csv.writer. I am providing xml file name and xpath file name at command line. But getting output like this- (,,) While I want it like this- 1006T000565430,2013-01-23 Why am I getting comma after every character? This is my code - import libxml2
1
1,571
thread by: Cdrdrb | last post Dec 2 '13 by: Cdrdrb
Hi, I made a Python script that monitors the Public folder on Dropbox and adds links to files to a XML file when executed. How can I execute the script remotely (When I'm on my iPhone or not on the computer my Dropbox is linked to)? Also possible is make the script run periodacally, but then how can do that? Thanks, Cdr
0
1,113
thread by: mefistofelis | last post Nov 28 '13 by: mefistofelis
I have the following script however when the clipboard contents are greek letters it fails to print them right. I have used all posible encoding for greek letters including utf8 but to no avail so i just stay with latin1. Can you suggest a solution? Here is the script: import win32clipboard win32clipboard.OpenClipboard() data =...
0
1,048
thread by: chrrox | last post Nov 28 '13 by: chrrox
I have a byte array b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A`' what i am trying to do is get lets say 2 values starting at x position every 4 bytes so the new byte array would be so if my position was 0 in the stride and I want 2 bytes and the stride is 4 this would be the end result b'\x00\x01\x04\x05\x08\x09' basically I want to...
0
1,179
thread by: indylmc | last post Nov 25 '13 by: indylmc
I'm still breaking ground with Python (less than a year of coding). I like it and want to try using it for droid coding. Is this doable? Any pointers or links perhaps to point me in the right direction?
3
1,582
thread by: pcbala | last post Nov 21 '13 by: anmoluppal
Hi,I am a newbie and i am thinking of learning Python now. I need help as to where to start and is this the language to learn at this time. If, yes suggest some good books or websites online. What can i do by learning it. I mean, real-time kind of thing like... application oriented. Thank you in advance.
0
1,117
thread by: happyjava | last post Nov 19 '13 by: happyjava
I am importing an 3rd party library which has some global variables. The global variables are updated when my script calls functions in the third party library. But I want to execute multiple instances of my script as thread in parallel in such a way that the global variables should be global only the specific thread. Each thread needs to...

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.