In [2]:
from wordpress_xmlrpc import Client, WordPressPost
from wordpress_xmlrpc.methods.posts import GetPosts, NewPost
wp = Client('http://blog.brobeur.com/xmlrpc.php', 'jess', 'qwerty123')
wp.call(GetPosts())
post = WordPressPost()
post.title = ('At the internet cafe')
post.content = ('I am sitting at the internet cafe')
post.post_status = ('publish')
wp.call(NewPost(post))
Out[2]:
In [31]:
from wordpress_xmlrpc.methods import posts
myposts = wp.call(posts.GetPosts())
In [32]:
for d in myposts:
print d
In [33]:
def post(titl, content):
post = WordPressPost()
post.title =(titl)
post.content = (content)
post.post_status = ('publish')
wp.call(NewPost(post))
return 'd'
def returnpost():
myposts
In [34]:
post('goodmorning!', 'it is a nice day!')
Out[34]:
In [35]:
print('hello world!')
In [3]:
print 1 * 20
In [4]:
myNumber = 41
In [5]:
print myNumber * myNumber
In [24]:
def allnumb(n):
return 34 * n
In [31]:
print allnumb(7)
In [26]:
n = 4
In [34]:
for number in range(50):
print number
In [27]:
print allnumb()
In [32]:
import random
In [33]:
random.randint(1,5)
Out[33]:
In [ ]: