Python Forum
reading a table which is of type string
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
reading a table which is of type string
#1
 Date Count persons ------------------- ---------- ------- 2022/11/01-12:48:06 51 girls 2022/11/01-12:48:11 104 boys 2022/11/01-12:48:12 155 Total successful Date Count persons ------------------- ---------- ------- 2022/11/02-12:48:06 30 girls 2022/11/02-12:48:11 10 boys 2022/11/02-12:48:12 40 Total successful
I have this above data extracted which is of type string.Now how do i read the tables data.Like suppose i want to read the Total(Which is 155 and 40 above) and store it in a variable
Reply
#2
please show tour code.
Reply
#3
ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(host, username=username, password=password) print("Connected") stdin, stdout, stderr = ssh.exec_command(mycommands to extract data from host) # This prints the table and i need to extract data from this print(stdout.read().decode()) # print errors if there are any err = stderr.read().decode() if err: print(err) ssh.close()
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  trouble reading string/module from excel as a list popular_dog 0 1,533 Oct-04-2023, 01:07 PM
Last Post: popular_dog
  Find a string from a column of one table in another table visedwings049 8 3,840 Sep-07-2023, 03:22 PM
Last Post: deanhystad
  How to perform DESC table sort on dates stored as TEXT type. hammer 7 5,224 Mar-15-2022, 01:10 PM
Last Post: hammer
  TypeError: __str__ returned non-string (type tuple) Anldra12 1 9,558 Apr-13-2021, 07:50 AM
Last Post: Anldra12
  reading lines from a string [Solved] ebolisa 14 11,705 Mar-28-2021, 08:16 PM
Last Post: perfringo
  TypeError: __repr__ returned non-string (type dict) shockwave 0 4,334 May-17-2020, 05:56 PM
Last Post: shockwave
  TypeError: size; expecting a recognized type filling string dict a11_m11 0 3,800 Feb-10-2020, 08:26 AM
Last Post: a11_m11
  Type hinting - return type based on parameter micseydel 2 3,777 Jan-14-2020, 01:20 AM
Last Post: micseydel
  Need help with For Loop logic for reading docx Table column data vintysaw 2 6,631 Jan-10-2020, 06:36 AM
Last Post: vintysaw
  Failed to insert record into MySQL table.Python type tuple cannot be converted farah97 3 26,669 Dec-26-2019, 02:01 PM
Last Post: buran

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.