Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
142 views

I am trying to port a Python2 library to Python3. (My reason is a bit silly: just that Python3 ships with Ubuntu and so if my library works in Python3 then there are fewer installation steps.) It is ...
personal_cloud's user avatar
-2 votes
1 answer
184 views

I am doing a Python environment setup practice in which given the code(cannot modify), I need to generate a requirements.txt and install the packages to pass the tests. I am in a python3.6 virtual ...
J X's user avatar
  • 1
-12 votes
1 answer
150 views

I'm dealing with numbers, that may be too large for int as understood by Python-2.x, so my code's been casting them to long. In Python-3.x there is no such thing, and one is simply supposed to use int....
Mikhail T.'s user avatar
  • 4,312
1 vote
1 answer
100 views

I have an ancient Oracle7 database (version 7.3.4.5.0) that I need to extract some data from. I mainly work with Python, so naturally I started looking at oracledb. However, it looks like the oldest ...
Anton Lahti's user avatar
1 vote
0 answers
86 views

a few months ago I was granted permission to download and use the RAD-ChestCT dataset from https://zenodo.org/doi/10.5281/zenodo.6406113 and it was in a numpy compressed 3D numpy array (npz format) ...
Bonaventura RS's user avatar
0 votes
2 answers
97 views

So I run this: import time from multiprocessing import Process def ghello(): print ("hello world g") def fhello(): print("hello world f") if __name__ == "...
SSSOF's user avatar
  • 44
0 votes
1 answer
48 views

So I have successfully installed dlib version 18.17.0 that's compatible with Python 2. Classes such as simple_object_detector could be instantiated and returned and instance of the object. But a ...
Sam's user avatar
  • 591
0 votes
0 answers
55 views

I am new to python and moving one test from one (working) to another physical machine (new). in the process , One of python file has -> from DAL.database import DBC when I do 'pip2 freeze' on both ...
user1873657's user avatar
0 votes
1 answer
506 views

I want to create a virtual environment in VS Code with python version 2.X. If I remember correctly, I was able to create an environment for Python 2 two months ago, but I can't do so anymore. I've ...
Enrique's user avatar
  • 13
0 votes
1 answer
83 views

I am using the following Python 2 method, in which the parameter of the method is a Jython object (task) : def getTaskPosition(task): """Gets the current position of the task in its ...
MANUEL SILVA's user avatar
0 votes
1 answer
51 views

My problem is very similar to a previous issue posted in here : IndexError: index out of bounds I am adapting the code developed for an XL-Release Community plugin. This original comunity "plugin&...
Code Klaudia's user avatar
0 votes
1 answer
283 views

My code needs to be compatible with both Python 2.x and 3.x versions. I am getting both string as input to my function, and I need to do some manipulation on those: if len(str1) > 10: str1 = ...
HitchHiker's user avatar
0 votes
0 answers
29 views

I have a function that needs to support both py2 and py3, unfortunately. Currently, there's a division op: n = a / b a and b are usually whole numbers, but represented as floats, but from what I can ...
24n8's user avatar
  • 2,338
2 votes
0 answers
67 views

class Solution(object): def getPositions(self, s): mapping = {} for i in range(len(s)): if s[i] not in mapping: mapping[s[i]] = [i] elif s[i]...
Chika's user avatar
  • 29
0 votes
0 answers
69 views

In python-2.7, shouldn't the keyword.kwlist be updated after importing print_function from __future__? Python 2.7.18 (default, Feb 1 2021, 00:00:00) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on ...
Amir reza Riahi's user avatar

15 30 50 per page
1
2 3 4 5
193