How to separate information within 1 line of user input? (Python3) [closed]

I want to know how to separate information within 1 line of user input using Python3. For example, the user types

5 1 7 8 12 13 

The 5 represents the number of numbers that follow, and I want to store those numbers (1, 7, 8, 12, 13) in 1 array as integers. I have tried splitting off each number as a String and then casting it as an int, but this doesn’t work well if the input line contains two (or possibly more) digit numbers.

Scrapy python3 Man-in-the-middle

Hello i need help with examples i want to bypass https firewall with scrapy then request the username and password with scrapy Then make a text file the write the info but i want to use wlan0 instead of eth0 is that possable

Import scrapy Import request If scrapy.request == "POST"      print ("password, username") 

Something like this but more advanced i just need examples to get started scrap the web with HEADERS, REQUEST, POST GET info please help me out

dpkg returned an error code (1) while tryint to install python3

I realize that I have created a major blunder somehow but I am unable to install python3 in ubuntu and getting “Sub-process /usr/bin/dpkg returned an error code (1)”. Output of sudo apt-get install pyhton3-all is

Errors were encountered while processing: python3-dbus python3-chardet python3-debian update-notifier-common dh-python python3-commandnotfound ufw gconf2 aisleriot python3-apport apport apport-gtk python3-aptdaemon python3-aptdaemon.gtk3widgets apturl python3-checkbox-support plainbox-provider-resource-generic plainbox-provider-checkbox python3-requests python3-plainbox checkbox-converged checkbox-gui python3-cairo python3-gi-cairo gedit gnome-orca aptdaemon gnome-software hplip-data ibus-table language-selector-gnome nautilus-share onboard python3-blinker python3-bs4 python3-cryptography python3-cupshelpers python3-cycler python3-dateutil python3-decorator python3-feedparser python3-html5lib python3-httplib2 python3-matplotlib python3-oauthlib python3-pandas python3-pexpect python3-pil:amd64 python3-pip python3-pyqt5 python3-reportlab Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1) 

Output of Sudo dpkg –configure -a is Errors were encountered while processing: plainbox-provider-checkbox nautilus-share gconf2 aisleriot update-notifier-common system-config-printer-common system-config-printer-udev system-config-printer-gnome apport-gtk plainbox-provider-resource-generic python3-gi-cairo unity-lens-photos unity-scope-openclipart checkbox-converged update-notifier aptdaemon ubuntu-desktop apport python3-cupshelpers checkbox-gui gnome-software ubuntu-software

Ctrl-Alt-F1 Unavailable after removing python3

I recently removed python3 from my Ubuntu 18.04 system, and the next time I tried to logon I was greeted with a failed to start session error when entering my credentials. Unfortunately, CtrlAltF1 does not open a TTY for me. Trying CtrlAltF2 etc. also does nothing.

I am OK with re-installing Ubuntu, but unsure if this is necessary at this time.

Error using python3 ssl module while openssl is installed

I’m using Ubuntu 19.04.

Have openssl installed

openssl version

OpenSSL 1.1.1b 26 Feb 2019

$ find . | grep libssl



However while running python3 it still gives ssl error

 python3 -c 'import ssl' Traceback (most recent call last):   File "<string>", line 1, in <module>   File "/usr/local/lib/python3.7/", line 98, in <module>     import _ssl             # if we can't import it, let the error propagate ImportError: cannot open shared object file: No such file or directory 

Reset Python3 and remove all the corrupted packages?

I ended up installing different versions of django, virtualenv via apt get and pip3 I found my back-ups which I didn’t properly use. I backed up my archives-which I can’t find. Python3 it’s self is working fine, I ended up using unrecommended installations which corrupted the packages. I’ve got the documents I needed backed-up. So any solution? I know will end losing software. I’ve uninstall PyCharm

 >>> import sys  >>> sys.path  ['', '/usr/lib/', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dy nload', '/home/elizabeth/.local/lib/python3.7/site-packages', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages'] 

Django both installed via python3 and one via apt-get. Can I uninstall apt-get?

After spending a while to solve the PyCharm ImportError It’s the "Couldn't import Django. It’s caused by me both installing django and python with apt-get and python3

Terminal django-admin --version  1.11.20  PyCharm IDE  django-admin --version 2.2.4 

I’m aware the

PYTHONPATH=/path/to/django/parent/dir python >>> import django  

solves the importerror

Do I need to an installation from scratch?

Error while installing package: installed python3 package post-installation script subprocess returned error exit status4 on Ubuntu 18.04 LTS

(Ubuntu 18.04 LTS) Unable to install “Time Table calculator”: Error while installing package: installed python3 package post-installation script subprocess returned error exit status4 ScreenShot of Error Message

Please help me to fix this issue.

¿Porque tengo una columna adicional con Treeview en Tkinter? Python3


Estoy creando una interfaz gráfica para una aplicación de chat (Que funciona por consola actualmente).

El problema que tengo es que al usar la función de treeview y crear 3 columnas, me aparecen 4, y una de ellas vacía (la ultima). Os dejo una captura de pantalla y el código. ¿Como podría eliminar esa “Columna vacia” de mi TreeView?

introducir la descripción de la imagen aquí

Aquí os dejo el código:

def GUI():     root = Tk()     root.title("Chat - RuDaHee")       frame = Frame(root).grid(row=0, column=0, padx=5, pady=5)      chat = ttk.Treeview(frame, height=10, columns=("#0","#1", "#2"), selectmode="extended")     chat.heading('#0', text='Hora', anchor=CENTER)     chat.heading("#1", text="Usuario", anchor=CENTER)     chat.heading("#2", text="Mensaje", anchor=W)     chat.column("#0", stretch=NO, width=80)     chat.column("#1", stretch=NO, width=80)     chat.column("#2", stretch=NO, width=380)      chat.grid(row=0, column=0, columnspan=2, padx=10, pady=10, sticky="nsew")       escribirMensaje = Entry(frame, width=87).grid(row=1, column=0, sticky="w", padx=10, pady=10)     enviarMensaje = Button(frame, text="Enviar").grid(row=1, column=1, sticky="e", padx=10, pady=10)     root.mainloop()   GUI()