15,175 Topics

Member Avatar for
Member Avatar for aragonnette

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

Member Avatar for AdeleB
0
7K
Member Avatar for tony75

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

Member Avatar for tony75
0
11K
Member Avatar for Jonah_1

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 …

Member Avatar for Gribouillis
0
2K
Member Avatar for xopenex

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 …

Member Avatar for Ehtisham_1
0
3K
Member Avatar for DragonMastur

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, …

Member Avatar for Gribouillis
0
352
Member Avatar for pyguy25

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 …

Member Avatar for FaZeSkwlSh00ter
0
7K
Member Avatar for NightOwl19

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 …

Member Avatar for Manjunath_3
0
361
Member Avatar for eman neercs

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 …

Member Avatar for eman neercs
0
5K
Member Avatar for glao

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': …

Member Avatar for glao
0
151
Member Avatar for Dat One Lefty

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 …

Member Avatar for Dat One Lefty
0
162
Member Avatar for Dat One Lefty

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?

Member Avatar for Dat One Lefty
0
159
Member Avatar for Shailang

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 …

Member Avatar for Shailang
0
351
Member Avatar for mattster

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 …

Member Avatar for cereal
0
600
Member Avatar for Jacktheclimber

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

Member Avatar for vegaseat
0
199
Member Avatar for fonzali

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 …

Member Avatar for fonzali
0
998
Member Avatar for Tcll

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 …

Member Avatar for Tcll
0
487
Member Avatar for ajit.nayak

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 …

Member Avatar for jwenting
0
181
Member Avatar for rufael

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")

Member Avatar for ~s.o.s~
0
519
Member Avatar for jarograv

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? …

Member Avatar for Wesley_1
0
13K
Member Avatar for Tomi_1

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 …

Member Avatar for vegaseat
0
150
Member Avatar for Brandon Hatch

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 …

Member Avatar for Brandon Hatch
0
2K
Member Avatar for Kadian

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 …

Member Avatar for hericles
0
95
Member Avatar for Tcll

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... …

Member Avatar for Tcll
0
529
Member Avatar for Philip_5

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 …

Member Avatar for Lardmeister
0
415
Member Avatar for fonzali

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

Member Avatar for fonzali
2
2K
Member Avatar for mgracer48

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 = …

Member Avatar for rubberman
0
888
Member Avatar for Clive_1

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:>>>")

Member Avatar for Gribouillis
0
46
Member Avatar for dre-logics

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.

0
88
Member Avatar for container54

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.

Member Avatar for Slavi
0
155
Member Avatar for lost_scotsman

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 …

Member Avatar for Brandon Hatch
0
2K

The End.