Questions tagged as 'python-3.x'

1
answer

Python 3.x: ImportError: can not import name 'scandir'

I'm trying to use the scandir module and it gives me the error: ImportError: can not import name 'scandir' . I do not understand, it is assumed that the version I am using, 3.4.4 already has this module implemented. Does anyone have any idea ho...
asked by 06.12.2016 / 13:56
1
answer

Install Python 3.x package without internet

It's not a code question, basically I could not find something similar to this. I did a development in Python that I must run on a desktop computer, but the problem is that that computer does not have an internet connection and I need to have...
asked by 20.08.2017 / 03:23
1
answer

How to show number without commas in python

I have a question I have the following number 33,003,567.564 and I would like to convert this number to a number without commas but if with a decimal point it is: Get something like this: 33003567.564 And that this applies to any amo...
asked by 29.10.2018 / 03:27
1
answer

Difference in concatenating data in Python 3.7

I thank in advance the people who can help me with this query, since I am new to programming. I am taking a python course and I was practicing the conditionals and the following question arose: Why when concatenating with commas do not give m...
asked by 06.12.2018 / 05:09
2
answers

Print abbreviated month in python

I have a problem, how can I print the name of the month abbreviated in python using datetime fecha= datetime.now() print(f"Fecha:{fecha.hour}:{fecha.minute} {fecha.day}/{fecha.month}/{fecha.year}"); input()     
asked by 03.12.2018 / 08:12
2
answers

Open and close a plot within a while

I'm trying to plot a signal with Matplotlib and the plot is within while . What I want is that every time I go through the while a graph is opened and then either immediately or after a time that I can control it will close. I have...
asked by 22.04.2016 / 10:19
1
answer

Cycle an arrangement of a MongoDB object in Python with Django

I'm trying to cycle an array that comes from a node in mongoDB, this is Mongo's object: { "nombre": "Sebastián Yatra", "paises":["México","Argentina","Perú"] } The view controller is this from django.shortcuts import render from pymon...
asked by 03.08.2018 / 22:02
2
answers

Search and print python file path

Dear users of the StackOverflow community ... I'm looking for a function in Python that allows me to find the path of a file. for example I know that I have a program called pycharm64.exe, or simply pycharm but I do not know the route ... I l...
asked by 07.02.2018 / 17:05
2
answers

Run two programs at the same time

Let's imagine that I have two scripts written in a python. The first is called programa_1.py and the second programa_2.py . To be executed, and because it opens some particular files, the programa_1.py needs to run in a...
asked by 28.11.2017 / 18:00
1
answer

open winword.exe from python with the OS module

Good evening I would like to know how I can execute an MS-DOS command from python. I need to open WINWORD.EXE and this is the code I use import os r = os.system("C:/Program Files (x86)/Microsoft Office/root/Office16/") T = r + os.system("/W...
asked by 18.08.2018 / 04:21