Check-in [ea34849e2d]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Second commit.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ea34849e2dde73721944510e4c7d033bd7e9c486
User & Date: DarkLinkXXXX 2013-09-25 00:04:44
Context
2013-09-28
02:51
Create new branch named "tkinter" Leaf check-in: f9d9a97339 user: DarkLinkXXXX tags: tkinter
2013-09-27
02:30
FIle location is invalid now. Leaf check-in: 8d4a182880 user: DarkLinkXXXX tags: popen
2013-09-25
00:04
Second commit. Leaf check-in: ea34849e2d user: DarkLinkXXXX tags: trunk
2013-09-24
03:46
First commit. Depends on path to vlc to be set in file. check-in: b070f5b166 user: DarkLinkXXXX tags: trunk
Changes

Changes to repl.py.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
31
32
33
34
35
36
37

38
39
40
41
42

43
44
45
46

47
48

49
50



51
52
53
54
55
56
57
import subprocess
import shlex

##########################
#Configuration Parameters#
##########################

debug = True
vlc = "c:/Program\ Files/VideoLAN/VLC/vlc.exe"




PROMPT = '> '

................................................................................
Alex Stubbins Anti-Copyright 2013
""")
    


def handspeak(word):
    import urllib.request as req

    domain = "www.handspeak.com"
    con = http.client.HTTPConnection(domain)
    url = "/word/" + word[0] + "/" + word + ".mp4"
    con.request("GET", url)
    stat = con.getresponse().status

    print(stat)
    if stat == 200:
        file = req.urlretrieve("http://" + domain + url)[0]
        file = shutil.copyfile(file, file + ".mp4")

        print("File saved at " + file)
        lcmd = shlex.split(vlc + " -vvv ")

        print(lcmd + [file])
        subprocess.call(lcmd + [file])




        

commands  = {'i': info, 'hs': handspeak}


def interrupt():







|







 







>





>
|



>
|

>
|

>
>
>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import subprocess
import shlex

##########################
#Configuration Parameters#
##########################

debug = False
vlc = "c:/Program\ Files/VideoLAN/VLC/vlc.exe"




PROMPT = '> '

................................................................................
Alex Stubbins Anti-Copyright 2013
""")
    


def handspeak(word):
    import urllib.request as req
    word = word.replace(' ', '-')
    domain = "www.handspeak.com"
    con = http.client.HTTPConnection(domain)
    url = "/word/" + word[0] + "/" + word + ".mp4"
    con.request("GET", url)
    stat = con.getresponse().status
    if debug == True:
        print(stat)
    if stat == 200:
        file = req.urlretrieve("http://" + domain + url)[0]
        file = shutil.copyfile(file, file + ".mp4")
        if debug == True:
            print("File saved at " + file)
        lcmd = shlex.split(vlc + " -vvv ")
        if debug == True:
            print(lcmd + [file])
        subprocess.call(lcmd + [file])
        os.remove(file)
    else:
        print("Not in dictionary.")

        

commands  = {'i': info, 'hs': handspeak}


def interrupt():