Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #76366

Re: python small task

From Johannes Bauer <dfnsonfsduifb@gmx.de>
Newsgroups comp.lang.python
Subject Re: python small task
Date 2014-08-15 15:07 +0200
Organization albasani.net
Message-ID <lsl0m3$ekj$1@news.albasani.net> (permalink)
References <7888bab6-0f9c-4123-8b7a-853f0bcc66e2@googlegroups.com>

Show all headers | View raw


On 15.08.2014 11:18, ngangsia akumbo wrote:
> i have this piece of code 
> 
> file1 = open('text.txt, w)
> try:
>     text = file1.read()
> finally:
>     file1.close()
> 
> i wish to manage an office task using this small code , how can i implemetn it to function. 

import random
import troll
import socket

t = troll.GenericTroll(maxiq = 75)
try:
	t.connect("comp.lang.python")
	t.spout(random.randdrivel())
except socket.error:
	print("so good try. many wow. fail sad")
finally:
	t.close()

> how can i pars it in a webpage ?

t.pars_in_a_webpage()

Cheers,
Johannes

-- 
>> Wo hattest Du das Beben nochmal GENAU vorhergesagt?
> Zumindest nicht öffentlich!
Ah, der neueste und bis heute genialste Streich unsere großen
Kosmologen: Die Geheim-Vorhersage.
 - Karl Kaos über Rüdiger Thomas in dsa <hidbv3$om2$1@speranza.aioe.org>

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

python small task ngangsia akumbo <ngangsia@gmail.com> - 2014-08-15 02:18 -0700
  Re: python small task Johannes Bauer <dfnsonfsduifb@gmx.de> - 2014-08-15 15:07 +0200
    Re: python small task ngangsia akumbo <ngangsia@gmail.com> - 2014-08-15 07:48 -0700

csiph-web