Login Register


Python search/grep assistance. filter_list
Author
Message
Python search/grep assistance. #1
Hello all,

I've been working on a database search coded in python but, everything is working besides the grep itself like, If I want to grep the work "java", it's shows all the results.
I'm honesly missing 2 lines of code to get this working.

I've looked online and, nothing is working.
Here is the code. https://pastebin.com/Kaijfyec
Once I get it working, I'll put it into a tool or and, release separately.
(This post was last modified: 07-04-2018, 12:03 PM by Vultra.)

Reply

RE: Python search/grep assistance. #2
Sorry i'm not familiar with python, hopefully someone else would be able to help you .
I don't know if what i'm saying here helps, from what i understood you should probably search every line in the csv file, if the line has the value you want you print the line .


Everyone should learn how to code, it teaches you how to think.

You don't have to be a Genius to know how to code you just need to be determined.

The computer is incredibly fast, accurate, and stupid; man is unbelievably slow, inaccurate, and brilliant; together they are powerful beyond imagination.

Reply

RE: Python search/grep assistance. #3
(07-04-2018, 03:00 PM)Vi-Sion Wrote: Sorry i'm not familiar with python, hopefully someone else would be able to help you .
I don't know if what i'm saying here helps, from what i understood you should probably search every line in the csv file, if the line has the value you want you print the line .

Even if I add the value "range" which goes into a loop till the end but, I don't think that will be it because, the script should be read the txt file and, if you give it a valid input, it will print that line of text.
Each row has it's own integer which starts from 0 but, I was thinking of making that into a loop to add each line into it's value but, the code will take longer to process i think.

I will try and code this in C once I'm more experienced to run through the text files faster.

[+] 1 user Likes Vultra's post
Reply

RE: Python search/grep assistance. #4
In the need of advice otherwise, I'll just leave it here.

Reply

RE: Python search/grep assistance. #5
(07-05-2018, 01:05 PM)Mimiakira Wrote: In the need of advice otherwise, I'll just leave it here.

The coding forum is kind of dead .


Everyone should learn how to code, it teaches you how to think.

You don't have to be a Genius to know how to code you just need to be determined.

The computer is incredibly fast, accurate, and stupid; man is unbelievably slow, inaccurate, and brilliant; together they are powerful beyond imagination.

[+] 1 user Likes Vi-Sion's post
Reply

RE: Python search/grep assistance. #6
(07-05-2018, 05:00 PM)Vi-Sion Wrote:
(07-05-2018, 01:05 PM)Mimiakira Wrote: In the need of advice otherwise, I'll just leave it here.

The coding forum is kind of dead .

Well, I wish it was active again haha.

Reply

RE: Python search/grep assistance. #7
(07-05-2018, 05:18 PM)Mimiakira Wrote:
(07-05-2018, 05:00 PM)Vi-Sion Wrote:
(07-05-2018, 01:05 PM)Mimiakira Wrote: In the need of advice otherwise, I'll just leave it here.

The coding forum is kind of dead .

Well, I wish it was active again haha.

Did you try to ask your question somewhere else ?


Everyone should learn how to code, it teaches you how to think.

You don't have to be a Genius to know how to code you just need to be determined.

The computer is incredibly fast, accurate, and stupid; man is unbelievably slow, inaccurate, and brilliant; together they are powerful beyond imagination.

Reply

RE: Python search/grep assistance. #8
(07-05-2018, 05:23 PM)Vi-Sion Wrote:
(07-05-2018, 05:18 PM)Mimiakira Wrote:
(07-05-2018, 05:00 PM)Vi-Sion Wrote: The coding forum is kind of dead .

Well, I wish it was active again haha.

Did you try to ask your question somewhere else ?

Well, I've searched google first and only came back to "import re" but, I haven't searched on other forums since, people can be dicks.
(This post was last modified: 07-06-2018, 02:54 AM by Vultra.)

Reply

RE: Python search/grep assistance. #9
(07-06-2018, 02:53 AM)Mimiakira Wrote:
(07-05-2018, 05:23 PM)Vi-Sion Wrote:
(07-05-2018, 05:18 PM)Mimiakira Wrote: Well, I wish it was active again haha.

Did you try to ask your question somewhere else ?

Well, I've searched google first and only came back to "import re" but, I haven't searched on other forums since, people can be dicks.

Like this?
https://i.imgur.com/Sr5jkfZ.png

Reply

RE: Python search/grep assistance. #10
(07-06-2018, 04:14 AM)ProfessorChill Wrote:
(07-06-2018, 02:53 AM)Mimiakira Wrote:
(07-05-2018, 05:23 PM)Vi-Sion Wrote: Did you try to ask your question somewhere else ?

Well, I've searched google first and only came back to "import re" but, I haven't searched on other forums since, people can be dicks.

Like this?
https://i.imgur.com/Sr5jkfZ.png

No... o.o . Look at the picture of the thread and tell me if that relates to what I'm looking for.
When I enter an email, password & etc... It should grep that info that I wanted and, displays in the terminal from the txt files.

Reply







Users browsing this thread: 1 Guest(s)