Sinisterly
Python search/grep assistance. - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Python (https://sinister.ly/Forum-Python)
+--- Thread: Python search/grep assistance. (/Thread-Python-search-grep-assistance)

Pages: 1 2


Python search/grep assistance. - Vultra - 07-04-2018

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.


RE: Python search/grep assistance. - Vi-Sion - 07-04-2018

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 .


RE: Python search/grep assistance. - Vultra - 07-04-2018

(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.


RE: Python search/grep assistance. - Vultra - 07-05-2018

In the need of advice otherwise, I'll just leave it here.


RE: Python search/grep assistance. - Vi-Sion - 07-05-2018

(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 .


RE: Python search/grep assistance. - Vultra - 07-05-2018

(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.


RE: Python search/grep assistance. - Vi-Sion - 07-05-2018

(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 ?


RE: Python search/grep assistance. - Vultra - 07-06-2018

(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.


RE: Python search/grep assistance. - ProfessorChill - 07-06-2018

(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


RE: Python search/grep assistance. - Vultra - 07-06-2018

(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.