Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How argv works?
Post: RE: How argv works?

Okay, Understood. (Dec-25-2018, 05:51 PM)Larz60+ Wrote: passing the remainder to mainDoes it pass one by one? I mean, executes for argv[1] then argv[2] like this?
Philia General Coding Help 7 4,849 Dec-25-2018, 05:57 PM
    Thread: Use variable from one function in another without return
Post: RE: Use variable from one function in another with...

Either use global variable or use class.
Philia General Coding Help 3 2,771 Dec-25-2018, 05:07 PM
    Thread: How argv works?
Post: RE: How argv works?

(Dec-25-2018, 03:25 PM)Larz60+ Wrote: This will help, (checks python version, if >= 3.6 uses f-string else format) sys.argv[0] is always script name (__file__) remaining args are what's typed on ...
Philia General Coding Help 7 4,849 Dec-25-2018, 03:44 PM
    Thread: How I can multiply the fourth one from each row in the text file
Post: RE: How I can multiply the fourth one from each ro...

Properly format and indent your code. It's much more readable. Not to mention python code will not work without proper indentation. I formatted and indented your code below. But It's not clear what y...
Philia General Coding Help 2 2,244 Dec-25-2018, 02:07 PM
    Thread: How argv works?
Post: How argv works?

Here argv is a tuple. That inputs name of two persons 'John' and 'Jack' one by one. And prints out "Hi, John" first time and "Hi Jack" second time. This code works. But I am not sure how it works. It...
Philia General Coding Help 7 4,849 Dec-25-2018, 02:01 PM
    Thread: Python, Tkinter, can only view partial GUI when called from another window
Post: Python, Tkinter, can only view partial GUI when ca...

This is the GUI code which is actually run from another file. It calls two other Python files and executes a function from those files. The files are scan.py and webcam.py. The function from scan.py i...
Philia GUI 1 2,979 Jul-17-2018, 05:29 PM
    Thread: Python file parsing, can't catch strings in new line
Post: RE: Python file parsing, can't catch strings in ne...

Okay I tried to search for a string in a file and view the whole record for it. This is what I did: import re def search(): fhand = open('GUTINDEX.ALL') x = input("Search:") for line in...
Philia General Coding Help 5 3,979 Apr-29-2018, 06:32 AM
    Thread: Python file parsing, can't catch strings in new line
Post: RE: Python file parsing, can't catch strings in ne...

Well I solved the code by this: import re def search_by_author(): fhand = open('GUTINDEX.ALL') book_info = '' for line in fhand: line = line.rstrip() if (line.startswit...
Philia General Coding Help 5 3,979 Apr-28-2018, 05:18 PM
    Thread: Python file parsing, can't catch strings in new line
Post: Python file parsing, can't catch strings in new li...

So Parsing a large text file with 56,900 book titles with authors and a etext no. Trying to find the authors. By parsing the file. The file is a like this: Quote:TITLE and AUTHOR ...
Philia General Coding Help 5 3,979 Apr-28-2018, 04:20 AM
    Thread: Take a snapshot with the webcam with python?
Post: RE: Take a snapshot with the webcam with python?

Guys help me out a bit.... I did this much so far: import cv2 import numpy as np cascade1 = cv2.CascadeClassifier('xcascade.xml') cascade2 = cv2.CascadeClassifier('ycascade.xml')...
Philia Data Science 1 3,762 Apr-16-2018, 03:35 PM
    Thread: Take a snapshot with the webcam with python?
Post: Take a snapshot with the webcam with python?

So I am trying a write a program to detect objects using openCV libraries using Python. The code to detect object is somewhat satisfactory. When I run the code, it opens the webcam and when the objec...
Philia Data Science 1 3,762 Apr-16-2018, 06:21 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020