python2.7 tag

10 questions


3 answers
112 views
0
(Python) To read, extract, and store the nth letter of the desired row from a regular text file

Hi, how are you?I am a student studying programming.When it comes to data processing, I want to extract n characters from a specific row of a file or m rows after a specific character, store them else...

2 years ago

1 answers
113 views
0
Python 2, 3 site-package path management.

In an OSX environment, you are using python2, python3.I usually use python2, but I often use python3 for tensorflow, jupyter notebook, etcAfter updating with brew, I was able to confirm that the site-...


1 answers
98 views
0
Python function invocation question.

This is a code that receives data through serial communication and sends a notification to a messenger using urlapi when data with a value of 80 or more comes more than 5 times in a row.Alerts are int...

2 years ago

1 answers
128 views
0
Terminal ubuntu python error: [Erno 8] How do I resolve the EXEC format error?

I'm writing Python 2.7, and if you run the function below locally, it will run normally.However, if you connect to the ubuntu server and turn it directly from the terminal, the [Errno 8] Exec format e...

2 years ago

1 answers
124 views
0
Read hwp file minetype from python 2.7

from mimetypes import MimeTypesmime = MimeTypes()mime_type = mime.guess_type('C:\SomePath\hangle.hwp')print mime_typeIf you obtain the mine-type of the Korean document from the code above and print ou...

2 years ago

1 answers
122 views
0
Python socket communication and mysql communication questions

import socketimport jsonimport pymysqlHOST = ''PORT = i = 0list_data =[]s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)s.bind((HOST, PORT))s.listen(1)while True : try : conn,addr = s.accept() ...


1 answers
82 views
0
readlines readline

Save it to a variable called code to open the file '''def searching(name):code.seek(0, 0)lines = code.readlines()for line in lines: item = line.split() if name in item: return lineprint searching ('N...

2 years ago

1 answers
109 views
0
I would like to organize the dictionary list in Python in Excel 2D table.

I'm a beginner who just entered Python.I want to make a program that filters through Pandas by making a dictionary list into a two-dimensional table, how should I organize this?The list I have is in t...

2 years ago

1 answers
88 views
0
CentOS 7.9 Python2 pip Error

I'm using Python 2.7 in centos 7.9, but when I installed pip to yum and upgraded, all the pip-related commands are error below... You have to use Python2, but what's wrong with this?Before the pip upg...

2 years ago

3 answers
100 views
0
Is there a way to count or sum key values such as list-dict type in python (jython 2.7)?

Last time, I asked you how to count the same values in a list-dict type of dataConversely, how do you count multiple values of the same key?For your information, ** does not eat in Jaison 2.7.origin =...

2 years ago

© 2024 OneMinuteCode. All rights reserved.