import prog
1
Name:
Anonymous
2008-05-18 15:53
import prog
prog.name = 'anonymous'
prog.email = 'sage'
post = '''
Hello, /prog/
This is being posted by a python program.
'''
thread = prog.newthread('Python',post)
thread.post('This is too.\n\n[b]Bold[/b]')
2
Name:
Anonymous
2008-05-18 15:54
Hello, /prog/
This is being posted by a python program.
3
Name:
Anonymous
2008-05-18 15:55
This is too.
Bold
4
Name:
Anonymous
2008-05-18 15:57
no
5
Name:
Anonymous
2008-05-18 16:06
sage for global module variables
6
Name:
Anonymous
2008-05-18 16:21
one word
7
Name:
Anonymous
2008-05-18 16:35
Triple quotes, god-damn.
8
Name:
Anonymous
2008-05-18 17:53
prog.email = 'sage'
Your module is broken.
9
Name:
Anonymous
2008-05-18 18:58
Here's how I would lay out my module interface:
import prog
first = prog.BBCodeDocument()
.para("Hello, /prog/")
.para("This is being posted by a python program.")
second = prog.BBCodeDocument()
.para('This is too.')
.para(bold('Bold'))
poster = prog.Anonymous(email='sage')
thread = poster.post_thread('Python', first)
poster.post_response(thread, second)
10
Name:
sag
2008-05-18 19:13
sag
11
Name:
Anonymous
2008-05-18 19:19
>>9
python doesn't work like this.
12
Name:
Anonymous
2008-05-18 19:31
>>9
That's not python. At all.
13
Name:
Anonymous
2008-05-18 20:01
OP here. V0.2
import prog
import time
subject = 'LoL Python.'
name = 'Anonymous'
email = 'sage'
content = '''
Hello, /prog/
This is being posted by a [i]python[/i] program.
'''
thread = prog.newthread(subject,name,email,content)
print 'Thread Created.'
print 'ID:',thread.id
print 'Content:'
print content
time.sleep(30)
content = '[code]lol dongs'
thread.post(name,email,content)
print 'posted:'
print content
while thread.posts < 1000:
thread.post(thread,name,email,'READ SICP')
print 'posted:'
print content
time.sleep(25)
[/code]
14
Name:
Anonymous
2008-05-18 21:00
>>13
That's some mighty fine bbcode failure you got there.
15
Name:
Anonymous
2008-05-19 19:27
16
Name:
Anonymous
2008-05-19 19:32
17
Name:
Anonymous
2008-05-19 20:55
18
Name:
Anonymous
2008-05-20 8:52
[tt]back to /g/ please[/tt]
19
Name:
Anonymous
2008-06-04 13:43
lol xD
20
Name:
Anonymous
2008-06-04 14:22
21
Name:
Anonymous
2008-06-04 14:27
So random
22
Name:
Anonymous
2008-06-04 14:29
IIOC
23
Name:
七夜志貴
2008-06-04 16:57
THIS BOARD
24
Name:
Anonymous
2008-06-04 17:45
LOLO L XKCD
25
Name:
Anonymous
2008-06-05 0:07
>>19-21
Same person and we have been bumped constantly.
26
Name:
Anonymous
2008-09-20 17:08
27
Name:
Anonymous
2008-09-20 18:06
Can you make a program that posts its sourcecode to /prog/ .
Without using input of course
28
Name:
Anonymous
2008-09-20 18:43
import urllib
s = """import urllib
s = \"\"\"%s\"\"\"
data = urllib.urlencode({'bbs': 'prog',
'id': '1211139921',
'shiichan': 'proper2',
'kotehan': '',
'meiru': '',
'com': s %% s.replace('\"', '\\"'),
'email': ''})
urllib.urlopen('
http://dis.4chan.org/post ', data)"""
data = urllib.urlencode({'bbs': 'prog',
'id': '1211139921',
'shiichan': 'proper2',
'kotehan': '',
'meiru': '',
'com': s % s.replace('"', '\"'),
'email': ''})
urllib.urlopen('
http://dis.4chan.org/post ', data)
29
Name:
Anonymous
2008-09-20 18:49
What's the fastest way to create a list of primes in Haskell? :/
30
Name:
Anonymous
2008-09-20 18:51
>>25
We need to
bring back the motherfucking IDs .
31
Name:
Anonymous
2008-09-20 20:43
>>29
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
32
Name:
Anonymous
2008-09-20 22:01
>>29
Whoa, slow down there buddy. Haskell can't do that yet. Next you'll be asking for assignment statements and while loops, hahaha.
33
Name:
Anonymous
2008-09-20 23:06
34
Name:
Anonymous
2008-09-21 4:27
35
Name:
Anonymous
2008-09-21 5:14
Oh God, this looks like Python code written by a 12yo half-wit.
Oh wait, it likely is.
36
Name:
Anonymous
2008-09-21 7:29
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
1) Implement factorial
2) Implement fib
3) ?????
4) LIST OF PRIMES
37
Name:
Trollbot9000
2009-07-01 8:01
6 format t d ie t he has read SICP Was this the.
38
Name:
Anonymous
2010-11-16 1:01