15,175 Topics

Member Avatar for
Member Avatar for davorka.tonkovic_1

hi. i'm trying to convert program from c++ to pyhton, but i don't have any experience with python. can someone help me? #include <stdio.h> #include <conio.h> main() { float uplata,i; do { printf("Unesite pocetnu uplatu:"); scanf("%f", &uplata); if(uplata>3000) { printf("Pocetna uplata ne smije biti veca od 3000 kuna."); } } …

Member Avatar for Ancient Dragon
0
674
Member Avatar for chophouse

Using Python 3.3.0 and this script: from ftplib import FTP_TLS ftps = FTP_TLS('xxx.xx.xxx.xx') ftps.sendcmd('USER myuname') ftps.sendcmd('PASS mypwd') ftps.prot_p() ftps.retrlines('LIST') ftps.quit() I get a connection failure due to timeout >>> ================================ RESTART ================================ >>> Traceback (most recent call last): File "C:\Python33\fixFTP.py", line 2, in <module> ftps = FTP_TLS('xxx.xx.xxx.xx') File "C:\Python33\lib\ftplib.py", line …

Member Avatar for Gribouillis
0
2K
Member Avatar for vegaseat

PySide's QWebView can load a given url and display the web page associated with it with just a few lines of code.

1
1K
Member Avatar for TrustyTony

There is free tools to do the same, but I was curious to see what it takes to make one myself. For info see: [url]http://en.wikipedia.org/wiki/LC-3[/url]

Member Avatar for TrustyTony
5
2K
Member Avatar for ccandillo

I am not a big time developer but just a guy to likes to tinker with python. Most of the python scripts I write are for myself. And lately, I started reading up on virtualenv. So I get the wroking on various projects inside a virtualenv is a good thing. …

0
87
Member Avatar for belladiluna

Help me please! Need c# code... import numpy from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter import matplotlib.pyplot as plt def zadachaOPrepyatstvii(h, f, fi, xi, sigma, epsilon=0.0000001): m = int(1/h) h2 = h * h u = numpy.zeros(shape=(m+1, m+1)) gamma = numpy.zeros(shape=(m+1, m+1)) prevnormr = …

Member Avatar for vegaseat
0
5K
Member Avatar for marin_10

Hi guys, I have question about python. I mean I need a litle help. How can I increase date from date given in file by start after midnight? File looks like: PROGRAMSKA SHEMA ZA PETAK, 13.12.2013. 06:00 ZMBT televoting 06:05 Madhubala, igrana serija, 138. epizoda, r. 06:50 Tajne, igrana serija, …

Member Avatar for vegaseat
0
264
Member Avatar for idiotguy

Hi Friends, (i) I'm very new to python.so i wanna know which version of python is suitable for me.I have [I][B]python 2[/B][/I] and [I][B]python 3[/B][/I] in my choices..which one is best for me??? (ii)Also give me the list of GUI toolkits for respective versions.. (iii)which version has the best library …

Member Avatar for Tcll
0
705
Member Avatar for hochspeyer

All I want to do is install Python on a Windows 8.1 box. The "EXTREMELY HELPFUL" note in the reademe says goto "PCbuild". Where is this wonderous file? Bueller? I searched from the very TOP of the Python directory, and as soon as the "C" was entered, I got a …

Member Avatar for hochspeyer
0
127
Member Avatar for vegaseat

Shows you how to get a Python object's memory size. Notice that there can be a difference between Python versions.

Member Avatar for Tcll
3
522
Member Avatar for Overtim3

I am looking to run a subprocess and not let the subprocess be seen. I have something like this: proc = subprocess.call(["some.exe", "arg1", "arg2", "argN"]) The needs to be ran in the background. I also tried something like this: info = subprocess.STARTUPINFO() info.dwFlags = 1 info.wShowWindow = 0 subprocess.Popen('some.exe arg1 …

Member Avatar for Mouche
0
318
Member Avatar for aboubakarsalim.khamis

Write a program that accepts a date in the form month/day/year and outputs whether or not the date is valid. For example 5/24/1962 is valid, but 9/31/2000 is not. (September has only 30 days.)

0
49
Member Avatar for a8med

I am having big trouble with classes. I don’t think I really understand them and sourly not as clear as functions. I do know that they are an important part of programming so I appreciate all the help I can get to get things clearer. I am trying to rewrite …

Member Avatar for a8med
0
165
Member Avatar for stuartlross

I am a newbie to python so exude the not so well constructed code.. I have two text files. The first one (WordFile1.txt) is " John Mary Joe alice William ….." The second (SearchText.txt) is "JOHN EGGS,24,BEEF,36,BACON,56,HAM,66 ALICE TOMATOES,16,HAM,35,BEANS,35" ……." If my response number is 2 I will get BEEF …

Member Avatar for woooee
0
283
Member Avatar for vegaseat

If you decorate a function, then some of the information is lost during the debugging process. Python supplies another decorator @wraps to help out. A decorator for a decorator, very interesting.

1
433
Member Avatar for tony75

Hi I would like my python script take screenshot of my desktop every 15 mints and saving in my home dir in pic folder.but I get error? import os import sys import time import ImageGrab environ=os.environ img = ImageGrab.grab() FILES_DIR = 'pic' SAVE_PATH = os.path.join(environ['HOMEDRIVE'], environ['HOMEPATH']) LOGFILE_NAME = 'test.png' LOGFILE_PATH …

Member Avatar for tony75
0
4K
Member Avatar for MrNoobieCoder

I am an amateur python coder and i was wondering if it is possible to put a timer into my times table game and if possible where i could put it. Here's my code for my game help would be appreciated , thanks :) import random import time print ("Hello …

Member Avatar for woooee
0
302
Member Avatar for a8med

I nead too run a python program from another code. I have the main code wher you can chose what too do and if you chose 1 you will run a surten python program and then return and if you chose 2 you will run some other program and then …

Member Avatar for a8med
0
122
Member Avatar for Ismatus3

Hello , As mentioned in the tittle , i haver created a python small programm , that use MySQLdb , and just want to know the steps to be able to use it in an Android environnement ?

0
79
Member Avatar for ajit.nayak

Dear all, i have data coming in file named time.csv and i wanted to convert the file in format conv_file format . How could i do it python

Member Avatar for slate
0
267
Member Avatar for DougArndt

Greetings, first, I'm totally new to python. What I'm attempting to do is rebuild a clipped off sound wave. As I've been poking around I've come across things like "cubic spline interpolation" (that sounds like what I need -- but really is way over my head) I've come across other …

Member Avatar for Gribouillis
0
764
Member Avatar for ajit.nayak

Dear all I have downloaded matplot lib for python2.7.2 windows using[(http://matplotlib.org/downloads.html)][Click Here](http://www.) . As per example i tried coding i found pyplot is not highlighted.i have attached test.cv file for which graph has to be plotted import csv import matplotlib.pyplot as plt plt.figure() def main(): pass if __name__ == '__main__': …

Member Avatar for Gribouillis
0
695
Member Avatar for dean.ong.14

# calc.py - a Python calculator from tkinter import * # the main class class Calc(): def __init__(self): self.total = 0 self.current = "" self.new_num = True self.op_pending = False self.op = "" self.eq = False def num_press(self, num): self.eq = False temp = text_box.get() temp2 = str(num) if self.new_num: …

Member Avatar for Gribouillis
0
14K
Member Avatar for racigan

**this is my main file:** ExcelAppl = win32com.client.Dispatch('Excel.Application') Workbook = ExcelAppl.Workbooks.Open('excel file path') Sheet = Workbook.Worksheets.Item(1) Sheet1 = Workbook.Worksheets.Item(2) **this is the Python gui:** from Tkinter import * from tkMessageBox import * from tkColorChooser import askcolor import tkFileDialog import MainLibrary root = Tk() root.title("Chrysler Test Framework") root.geometry("800x500") def callback(): file_path …

0
192
Member Avatar for aVar++

Hello, This if statement is always returning true and I cannot see why. Could you guys tell me why? menu = input("Choose what you would like to do:\n\n1. Work out how far you will travel with a set time and speed\n2. Work out the speed you will need to travel …

Member Avatar for Gribouillis
0
247
Member Avatar for dany12

Hy I would like to know what python gui framework, I can use that will be compatible cross platform and will help me create my snippet saver, that will be relational database, with categories for each language. I thought I can use kivy to create my graphical interface than use …

Member Avatar for dany12
0
345
Member Avatar for tunisia

Trying use radio buttons to select which host I'm referring to since ultimately there will only be two and they are fixed addresses. This is the error: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1410, in call return self.func(*args) File "Untitled 2.py", line 63, in command=lambda: callback_power_off(off, host)) File "Untitled 2.py", line 28, in …

Member Avatar for woooee
0
376
Member Avatar for amini.chenini

I'm trying to figure out a way to define my function for loaning a book within a class. This is what I have so far: class Library: # the class constructor def __init__(self, books, patrons): self.books=books self.patrons=patrons def __str__(self): s="Patron(" for patron in self.patrons: s+=str(patron) + ', ' if len(self.patron) …

Member Avatar for woooee
0
234
Member Avatar for krystosan

I have made a QTableView that displays images from disk, there are two seriously agonizing problem I am facing. First of after the windows shows up making it maximize or changing size of window is very slow, and secondly I want to display images height width dependong on what can …

0
179
Member Avatar for Jade87

Hello, I've created a script that parses and downloads images from a website however now what I want to do is create a script that matches the files I've downloaded against common image file type signatures and then tells me how many of the files aren't those types. I'm still …

Member Avatar for Jade87
0
373

The End.