python-2.5 Questions

6

I want to use output variables of NN as an input in another function,but met with error like this 'Only Tensors created explicitly by the user (graph leaves) support the deepcopy protocol at the mo...
Canaanite asked 14/6, 2019 at 3:5

4

I have several dictionaries with different and common keys, plus different and common keys in the nested dictionary. Below is a simplified example, the actual dictionaries have thousands of keys. ...
Horseman asked 20/11, 2010 at 21:3

10

Solved

When I read data back in from a CSV file, every cell is interpreted as a string. How can I automatically convert the data I read in into the correct type? Or better: How can I tell the csv reader...
Trumaine asked 26/7, 2012 at 8:49

4

Solved

I found some old Python code that was doing something like: if type(var) is type(1): ... As expected, pep8 complains about this recommending usage of isinstance(). Now, the problem is that the...
Efflux asked 26/6, 2012 at 9:53

6

I have code like this. for p in range(1,1000): result = False while result is False: ret = urllib2.Request('http://server/?'+str(p)) try: result = process(urllib2.urlopen(ret).read()) except...
Cripple asked 7/11, 2010 at 21:4

4

Solved

Once I have all the files I require in a particular folder, I would like my python script to zip the folder contents. Is this possible? And how could I go about doing it?
Untimely asked 17/11, 2008 at 19:0

5

Solved

Consider this dictionary format. {'KEY1':{'name':'google','date':20100701,'downloads':0}, 'KEY2':{'name':'chrome','date':20071010,'downloads':0}, 'KEY3':{'name':'python','date':20100710,'downloa...
Whoopee asked 5/11, 2010 at 22:35

6

Solved

Can i resize images in python to given height and width,i use python 2.5, and i tried as this tutorial http://effbot.org/imagingbook/introduction.htm, and i installed PIL library for images,but whe...
Novation asked 9/4, 2012 at 18:25

9

Solved

I've a method that I want to be able to accept either a single string (a path, but not necessarily one that exists on the machine running the code) or a list/tuple of strings. Given that strings a...
Condone asked 28/5, 2009 at 19:35

7

Solved

In a Python script, is there any way to tell if the interpreter is in interactive mode? This would be useful so that, for instance, when you run an interactive Python session and import a module, s...
Microbarograph asked 1/3, 2010 at 14:20

10

I am using Python 2.5. And using the standard classes from Python, I want to determine the image size of a file. I've heard PIL (Python Image Library), but it requires installation to work. How mig...
Amytal asked 7/11, 2011 at 4:11

2

Solved

I am making a screen capture program with python. My current problem is PIL.ImageGrab.grab() gives me the same output as 2 seconds later. For instance, for I think I am not being clear, in the foll...

3

Solved

I need to print the FULL local date/time in ISO 8601 format, including the local timezone info, eg: 2007-04-05T12:30:00.0000-02:00 I can use datetime.isoformat() to print it, if I have the right...
Jive asked 4/7, 2014 at 13:8

2

Solved

I'm interested in subclassing the built-in int type in Python (I'm using v. 2.5), but having some trouble getting the initialization working. Here's some example code, which should be fairly obvio...
Either asked 13/7, 2010 at 14:49

2

I know that there are lots of questions about the same import issues in Python but it seems that nobody managed to provide a clear example of correct usage. Let's say that we have a package mypacka...
Biannulate asked 28/11, 2011 at 16:49

4

I need install cx_Oracle for Python 2.5 on Linux (Linux 2.6.18-371.1.2.el5 i686). I have installed Oracle client 10.2.0.4. I have tried following: 1. Download cx_Oracle tar.gz from http://sourcefo...
Fumarole asked 3/7, 2014 at 9:26

5

Solved

When I enter: port select --list python This is the result: Available versions for python: none python25 (active) python25-apple python26-apple python27 python27-apple I thought when I...
Nibelungenlied asked 20/11, 2011 at 13:21

5

Solved

I'm running Python 2.5, so this question may not apply to Python 3. When you make a diamond class hierarchy using multiple inheritance and create an object of the derived-most class, Python does th...
Premillennial asked 3/3, 2009 at 16:45

6

Solved

I have a date of the form specified by RFC 2822 -- say Fri, 15 May 2009 17:58:28 +0000, as a string. Is there a quick and/or standard way to get it as a datetime object in Python 2.5? I tried to pr...
Beatty asked 19/5, 2009 at 21:3

2

Solved

I have answered a question regarding absolute imports in Python, which I thought I understood based on reading the Python 2.5 changelog and accompanying PEP. However, upon installing Python 2.5 and...
Incorporable asked 16/11, 2015 at 20:18

1

I'm looking for a way to do this without checking for the Python version used. Please refer to How to write exception reraising code that's compatible with both Python 2 and Python 3? for det...
Oma asked 31/8, 2015 at 20:18

1

Solved

I encountered Error: 'module' object has no attribute 'copy' while running a pygame program. In my code, I never referred to a copy attribute, so I don't understand where the error is coming from. ...
Ganges asked 2/5, 2014 at 0:33

4

Solved

I am following Apress, Beginning Python from Novice to Professional book. It is mentioned that: finally. You can use try/finally if you need to make sure that some code (for example, cleanup co...
Karenkarena asked 23/9, 2011 at 5:37

2

I need your help! Im kinda new whats regarding python and "hex". I have a site where people can enter their own HEX-Color for their messages. So currently i have everything built in except the "...
Aimless asked 14/5, 2015 at 15:36

4

Solved

Can I use clean Python 3 super() syntax in Python 2.5.6? Maybe with some kind of __future__ import?
Fortalice asked 10/10, 2011 at 21:6

© 2022 - 2024 — McMap. All rights reserved.