473,554 Members | 2,544 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,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) ...
0
1,055
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...
0
1,065
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...
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
0
974
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
0
983
thread by: lightstar | last post Jan 29 '14 by: lightstar
This is what i tried but i says: TypeError: open_ftp() takes exactly 2 arguments (3 given) I know that ',"wb"' causes that Error but how can i download a .wav and is it actually possible? This is my Code: download = urllib.urlopen("ftp://server/timeover.wav","wb") downloadR = download.read() downloadC = open("timeover.wav", "w")...
0
1,019
thread by: aasifsheikh01 | last post Feb 5 '14 by: aasifsheikh01
Hello, I am writing an application in python that will initially interact with the user in runlevel 5 i.e graphical mode. Then I want to shift to run level 3 automatically and then execute some commands there depending on the users interaction in graphical mode... Is there any way to do this... As i think the application terminates when we...
0
1,195
thread by: developersend | last post Feb 9 '14 by: developersend
How to get screen capture on windows using python 3.3. I used a python code but output bmp image is very big size. I need small output python code. I am use this code import win32gui, win32ui, win32con, win32api hwin = win32gui.GetDesktopWindow() width = win32api.GetSystemMetrics(win32con.SM_CXVIRTUALSCREEN) height =...
0
1,280
thread by: yuvei | last post Feb 11 '14 by: yuvei
for choice in current_xml.xpath("//choice"): log.info(date_string+" "+choice.get("startTime")+" "+ current_time_in_user_timezone.strftime("%Z")) start_time=datetime.strptime(date_string+" "+choice.get("startTime")+" "+ current_time_in_user_timezone.strftime("%Z"),"%Y-%m-%d %H:%M:%S %Z")...
0
1,082
thread by: gunisandhu | last post Feb 25 '14 by: gunisandhu
Hi, I am using pxssh to create an ssh connection with a server. this pxssh is defined in a script called session.py. in session.py i create an ssh connection and then send commands to be executed in that session and after execution of commends it will exit the ssh connection. Now i am calling this script using subprocess.call() ,from master...
0
2,101
thread by: schwen | last post Feb 25 '14 by: schwen
Hey there! I am trying to phase a spectrum. In order to do that, I need to minimize following function of phi: import numpy as np from scipy.optimize import minimize intgr = np.array() intgi = np.array()
0
1,047
thread by: Joshuas | last post Feb 26 '14 by: Joshuas
To add some clarity to this discussion I can illustrate what I am trying to do. - I am stationed at a Windows 8 station - I need Python to log in to a godaddy FTP we have setup (using username and password) or out to our EC2 Linux instance on our AWS again username and password) - Needs to search the root directory for newest files based on...
0
1,317
thread by: Hello World | last post Feb 28 '14 by: Hello World
How do you find if the user defined modules are imported? This tries to see if it is imported ("-" is for easier to read): Loaded modules: - tokenize: LPAR,PseudoToken,ENDMARKER - heapq: sort,izip,_nlargest - __future__: __module__,getMandatoryRelease,division - copy_reg: _inverted_registry,_slotnames,__all__
-
-
thread by: anisha | last post Feb 28 '14 by: anisha
Moved:
0
1,330
thread by: Raviexact | last post Mar 12 '14 by: Raviexact
Friends, I'm completely new to python, i have question with setting width of PySide.QtGui.QDockWidget in python. I have MainWindow class in python which inherits QtGui.QMainWindow ( PySide ) and have added one left dock widget with simple plot and one right dock widget with simple plot and embedded simple plot in central widget. I...
0
1,404
thread by: shifali | last post Mar 12 '14 by: shifali
I am trying to use django-allauth for signup/login with github in my web application; following http://django-allauth.readthedocs.org/en/latest/ documentation I reached till Post Instillation and stuck from configuration heading. Have successfully modify settings.py, urls.py, run command for updating database "python manage.py syncdb" also when...
0
1,678
thread by: varsha1901 | last post Mar 13 '14 by: varsha1901
hey guys, i am trying to calculate the euclidean distance, but it is not giving me the proper values. i have no idea, whether the problem is with my code or the IDE i'm using. I use enthought canopy with python and opencv. from collections import * from CBIR import * from experiment import * from scipy.spatial import distance ...
0
1,319
thread by: DusX | last post Mar 17 '14 by: DusX
I am opening an EXE via subprocess.Popen (via CGI python) Unfortunately it opens in a location that is not desirable. Since I am performing live, this is a deal breaker. Is there a way to specify the size and location for the subprocess to open it window? Or force it to open minimized (an option for some cases)
0
1,440
thread by: schwen | last post Mar 30 '14 by: schwen
Hi, I am trying to fit experimetal data with scipy.optimize.anneal, but I think I didn't get the syntax right from reading the documentation, and I can't figure out what's wrong from the error I get. ydata are the y-values, t are the x-values (experimental data), and I am trying to optimize p0 (Baseline, A1, fwhm, t0, decay1): import numpy...
0
1,381
thread by: pie2637 | last post Apr 26 '14 by: pie2637
I am making a program to remotely shut down my server/computer if I receive an Email from an address on a list of senders I have. I don't care about anything except for the address, and everything else in the program is done. I looked up the documentation and most methods are sending-oriented. Any and all help is appreciated.
0
1,194
thread by: jakov314 | last post Apr 27 '14 by: jakov314
I can call my class only one time. My code is: class fish: def __init__(self, x, y, image, speed): self.x = x self.y = y self.image = image self.speed = speed def be(self):
0
1,577
thread by: jakov314 | last post May 2 '14 by: jakov314
When I try to build my game compiler I get error: Traceback (most recent call last): File "gamecomp.py", line 22, in <module> executables = ) File "C:\Python33\lib\site-packages\cx_Freeze\dist.py", line 365, in setup distutils.core.setup(**attrs) File "C:\Python33\lib\distutils\core.py", line 148, in setup ...
0
1,331
thread by: vuze | last post May 11 '14 by: vuze
my problem is that in the tab contact info if you click on column it sorts the data but but i want to do it also in the the tab User Chat in which i can edit the cell but i can not sort the column what i have to add in the def add_message to make it work like the def add_line or everywhere else in the code?? In the txt file is my python code
0
1,129
thread by: S1Seq | last post May 21 '14 by: S1Seq
Hey would anyone be able to help me create a regex for Python that has a minimum of 3 characters and a max of 5 characters? the first 3 characters have to be unique and the last two optional characters can be any characters. Once again, the last two characters can be anything! (even the same as one of the first 3 characters) This is what I...

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.