15,175 Topics
| |
i want to convert my pdf files with ImageMagic python module PythonMagick but i havent found any solution on net. import PythonMagick im = PythonMagick.Image('files.pdf') im.write("file_img%d.png") i am using below code and it returns only first page of my pdf file. any help would be greatly appreciated | |
Hi I ran python script on my windows and I got this error below ,how can I fix it? I'm using python 2.7.3 from pyasn1.codec.der import decoder ImportError: No module named pyasn1.codec.der | |
I am creating a text editor on a Mac and am having trouble with file saving. I can open, save as and save files but the save function stops working after I call `self.close`. I get this error: Exception in Tkinter callback Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line … | |
hello, Using Python 2.7, PyQt4, Qt Designer, and used pyuic4... I think thats it... windows 7? I have a GUI i created in Qt Designer. It has one button and one LCD number. I was trying to get the button to start and reset a timer, and have the elapsed … | |
I am trying to convert a file to a dictionary here is the contents of the file, Name: DragonMastur; Hand: None; Inventory: {"Gold": 0, "Brush": 0, "Twig": 0, "Sapling": 0, "Metal Axe": 0, "Grass": 0, "Metal Pickaxe": 0, "Metal": 0, "Log": 0, "Diamond": 0, "Stick": 0, "Stone": 0, "Wheat": 0, … | |
Hello. I was wondering if anyone could help me with a caesar cipher program I am attempting to create. I was asked to write a caesar cipher encoder program. Ok. No problem. This is what i got: [code] import string def main(): print "This program will encode your messages using … | |
Heya guys, i've been learning python for few weeks now and it's one of the best decisions i have made in my life so far..it's quite an interesting language and very helpful for beginners, i must say..now i tried to do some tickling with django and somehow managed to install … | |
I'm trying to run a python script from the cron but get the error "No module named requests" Traceback (most recent call last): File "testscript.py", line 2, in <module> import requests ImportError: No module named requests The script will run from the console but not through a cron job. I … | |
Hello , I can't understand why this loop doesn't work as I wanted. Why the continue statement isn't executed. I want the code to count **only** the user input which is 1 or 2 and stop when the sum is >=25. i = 0 user = input('Enter '1' or '2': … | |
I am trying to make a MS-DOS like program like python. I am adding a system to see if a command exists. the file "known.txt" contains: ['catfish', 'cls', 'dl', 'hello', 'help', 'help1', 'help2', 'info', 'logout', 'ping', 'run', 'stop', 'time'] This is the code i am using to run it: if … | |
i keep getting this error: WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'F:/Term/cmdrun/new.log' how can i make the logging module stop loggin to new.log so it can be moved and renamed? | |
I am trying to work on some code that will fetch all hyperlinks from a webpage url using the python. The code works perfectly fine when i try to run the code at home network without my proxy. When i have to show the code to my teacher in my … | |
Hi All, I've just tried to get going with Django using MySQL, but linking them has been a nasty headache. I am using Python v3.5, Django v1.9 and MySQL 5.6. I've definately got MySQL/Python talking, but Django always has the problem: File "X:\Program Files\Python\lib\site-packages\django-1.9-py3.5.egg\django\db\backends\mysql\base.py", line 25, in <module> import MySQLdb … | |
Can someone please help me write a convertor for Hexidecimal to Decimal, has anyone found a way to allow for the entries to be able to be multiplied as integers, even if the input is a character and not a natural number. Thanks Jack | |
hi , I have two different versions of python on my ubuntu machine : 2.7 and 3.4 . my question is how to tell sys.executable to use python 3.4 ? this is what I get when I run the code : `>>> import sys >>> print sys.executable /usr/bin/python which is … | |
so what I'm doing is building my own python IDE using PyQt. nothing can do what I need it to without a loss of something else, let alone properly. so I'm using a QPainter and getting the best results yet. however I'm having a problem trying to build indent guides … | |
Dear all, I am looking for guideline to read data from website[photon](http://www.photon.info/photon_site_db_solarmodule_en.photon) . & load into csv file. Whenever new supplier selection or typesection change data should recorded into same excel with new sheet. Can some guide how to get started using python This code to develop for database. Is … | |
we have the following code: I get the response (ValueError: Mixing iteration and read methods would lose data) Any help def extract_data(filename): def extract_data(filename): infile=open(filename, "r") #infile.readlines() v0 = infile.next() #or []/{}/ t=[] for line in infile.readlines(): t.append(line) return v0, t v0, t = extract_data("ball_file.txt") | |
Hi I am fairly new at pyhton and I am trying to create a program to append a new row of raw input to the bottom of my existing .csv file. So far I have this: [CODE]import csv x=1 y=1 n=0 citiesx=[] citiesy=[] city_names=[] total=input("How many cities do you have? … | |
Hey people! Im new to the community, i will contribute with doubts hehe, so i have this list of lists: TABLE =[["_","_","_"], ["_","_","_"], ["_","_","_"]] i want to print it so it looks something like this: 1 2 3 _ _ _ _ _ _ _ _ _ how can i … | |
I have no idea how to create a Gui from another Gui using python. What I have so far is simply a basic Gui which you select one of the options from a dropdown menu and create another Gui. Here's what I have so far... import sys from tkinter import … | |
Write a python program called mystery that should ask you to enter the last digit of your cell phone number and also ask to enter your birth year. (Hint: Use the input command but be mindful that the value entered is a string.) a. Multiply the cell phone digit by … | |
basically, I have some code defined to be executed in a restricted namespace: code = ''' def func(): print 'success' ''' NS = {} NS.update(__builtins__) exec code in NS try: f = NS['func'] print f # should print a function object f() except KeyError: print 'failure' as you can guess... … | |
I am a beginner programmer and have been learning about how to use Java since February 2015 of this year. However, I just started learning how to write code in the Python Language, a few weeks ago and find it to be much easier to work with. My goal here … | |
since the forum has been quiet for a while I thought to post this program , it might start new discussions . the idea is not new but it should be interesting to starters . as usual any comments is appreciated | |
Can someone please help me? I am using python 2, on mac yosemite thanks Also this is a project by me its a private server for closed toontown online so i have permission to use this. defaultText = "" def __inject_wx(_): code = textbox.GetValue() exec(code, globals()) def openInjector_wx(): app = … | |
Hey,fellow coders!:D I need some help with how to loop the following script until the right input is given:>>> className=input("Are you enetring results for class a, class b or class c:>>>") | |
I use python 3.4.2 + django 1.8 + Mysql database. + Table persons with blob fields in which a photo of a person My question is how can I retrieving and saving a photo with django. | |
Write an expression whose value is the result of converting the str value associated with s to an int value. So if s were associated with "41" then the resulting int would be 41. | |
I am using Tkinter to make a gui to display the output from a usb camera. It is for a microscopy experiment with the idea being that the gui shows a low resolution live stream, but at the click of a button a high resolution image is taken. I have … |
The End.