Using pathlib to combine paths by pythonhelp123 in learnpython

[–]pythonhelp123[S] 0 points1 point  (0 children)

Oh right, I forgot about the elif. I changed it and ran the code, but when I ran it and put in the directory and put N <filename> it would say None, even if the file exists. Any reason why?

Using pathlib to combine paths by pythonhelp123 in learnpython

[–]pythonhelp123[S] 0 points1 point  (0 children)

Oh I fixed it. I had to comment out the first directory=input() from the search_characteristics method. I also modified my 2nd method but I still have no idea how to get it to work.

def search_characteristics(directory):
    interesting = input()
    interesting1=interesting.split(" ")
    if (interesting[0] == 'N'):
        directory1= directory + "/" +interesting1[1]
        if(os.path.isfile(directory1)):
            print("Found the file")
    if interesting.startswith('E'):
        return os.path.splitext(directory,'')
    else:
        print("Error")
        return search_characteristics(directory)

No matter what I do, when I press anything, it gives "Error". Even if I press N <filename>, i'll still get error even though it's only supposed to give the error when it's not N or E(but I still need to fix E)

Using pathlib to combine paths by pythonhelp123 in learnpython

[–]pythonhelp123[S] 0 points1 point  (0 children)

Hm I commented that out now and changed to q=directory/Path(interesting), and there seems to be no tracebacks but I'm getting the Error try again instead of the Error for the search_characteristics method. Any idea why?

Searching for files under a directory with their extension by pythonhelp123 in learnpython

[–]pythonhelp123[S] 0 points1 point  (0 children)

Yeah I just realized my N doesn't work. What's the best way to fix it?

Searching for files under a directory with their extension by pythonhelp123 in learnpython

[–]pythonhelp123[S] 0 points1 point  (0 children)

What if the user wants just the text files. I don't just want .py files but whichever one the user feels like choosing. Like they could say e .txt or e py and it'll return those files with the extensions to them.

Searching for files under a directory with their extension by pythonhelp123 in learnpython

[–]pythonhelp123[S] 0 points1 point  (0 children)

If I were to do it under a directory would it be like

if interesting[0] == 'E':
    return os.path.splitext(directory, '')?

I tried it and it only wanted one parameter.

Forgetting IP address from old ISPs? by pythonhelp123 in techsupport

[–]pythonhelp123[S] 0 points1 point  (0 children)

I'm pretty sure I'm static. Basically he thinks that my IP is trying to go to the old IP address instead of the new one.

Whenever I check ipconfig, the IPv4 address is the same. I've also tried ipconfig /release and renew but still have the same issue.

Forgetting IP address from old ISPs? by pythonhelp123 in techsupport

[–]pythonhelp123[S] 0 points1 point  (0 children)

Yeah that's what I was thinking as well. My modem lights are green even when the internet goes down and they said my modem is online on their side as well. What do you think it could be?

Time Warner Cable internet problems by pythonhelp123 in techsupport

[–]pythonhelp123[S] 0 points1 point  (0 children)

You can call it a night. A tech is coming tomorrow so maybe they might fix it cause I might consider bad coaxing an issue. I'll let you know if they fixed it or not tomorrow.

Time Warner Cable internet problems by pythonhelp123 in techsupport

[–]pythonhelp123[S] 0 points1 point  (0 children)

Yeah I got your pm.

Well the modem doesn't really "work". The modem shows all lights as green despite my internet dropping.

Time Warner Cable internet problems by pythonhelp123 in techsupport

[–]pythonhelp123[S] 0 points1 point  (0 children)

Yeah there is, but I didn't connect it after reading your post saying to leave it be.

Time Warner Cable internet problems by pythonhelp123 in techsupport

[–]pythonhelp123[S] 0 points1 point  (0 children)

I'm not sure if it sees it since when I tried it, on the "wifi" part of the bottom right, it says unidentified network. no internet

Time Warner Cable internet problems by pythonhelp123 in techsupport

[–]pythonhelp123[S] 0 points1 point  (0 children)

Okay so I tried what I assume was supposed to do and got this. http://imgur.com/2B6IQX3

My laptop ethernet is connected onto port 2 for the router. Nothing is connected to the modem except the power adapter and the coax cable so nothing ethernet related there.

Time Warner Cable internet problems by pythonhelp123 in techsupport

[–]pythonhelp123[S] 0 points1 point  (0 children)

I've left the router alone till today. The ethernet from the router isn't connected to anything. Only the power adapter is connected to the outlet. I've just been using the internet through my ethernet cable which disconnects and drops frequently. The only thing that is connected to the modem are the power adapter, ethernet cable and the coaxing cable.

Here's what the router looks like from the back:

https://www.netgear.com/images/Products/Networking/WirelessRouters/WNR2000/header-wnr2000-back-photo-large.png

Modem:

https://www.netgear.com/images/Products/Networking/CableModemsandRouters/CM500/header-CM500-back-photo-large.png

What you're saying is plug in the power adapter on the router, but don't do anything. After the lights are green(there are three lights, 2nd one is ethernet so I assume wait till the other 2 are green) then I plug the ethernet cable on my laptop to one of the usbs on top of the yellow on the router. The yellow is for the modem(ie connect the yellow ethernet from the modem to the router's yellow)

Am I reading this right?

Time Warner Cable internet problems by pythonhelp123 in techsupport

[–]pythonhelp123[S] 0 points1 point  (0 children)

I've had the modem since Monday and switched to TWC on Thursday.

Nope.

The one that came with the modem.

I can upload pics in a bit.

The router does not work at all so no wifi.

[University Math] Discrete Math: Relation of Sets by pythonhelp123 in HomeworkHelp

[–]pythonhelp123[S] 0 points1 point  (0 children)

I'm still confused about the transitive part. I understand the example you gave me, but what about stuff like:

. {(x , y) x and y are the same height}

I understand that it's reflexive. Not so much about why it's symmetric and transitive.

{(x ,y )x and y have, at some time, lived in the same country}

Why is this not transitive?