Announcing Mii (My) Chat

2011-11-19 Thread Andrew Evans
Hello I wish to inform the list of a Python Application I am writing
entitled Mii Chat.

What is Mii Chat you ask? It is an IP to IP or IP to Multiple IP
text/voice/video chat client written in Python

Currently the GUI is written in PyQT and could use a complete overhaul (in
progress)

There are a few bugs: Like I couldn't figure out the Threading for the
Video so I am using QTimer.

and the Audio could be improved. But overall it works as expected! I am
happy about it cause I am not the best programmer. I have never been to
school for Comp Science Programming or any university/college for that
matter. I am self taught and consider myself a hobbyist programmer.

It would be great if some one could suggest a library for TCP Nat Traversal.

As  well I am open to any and all suggestions! I appreciate any feedback
*cheers

Andrew Evans

Here is the link

http://code.google.com/p/mii-chat/
-- 
http://mail.python.org/mailman/listinfo/python-list


Cast to a method pointer in ctypes

2011-01-31 Thread Andrew Evans
How can I cast to a method pointer in ctypes. for example this in C

int (*func)();
func = (int (*)()) expl;
(int)(*func)();

How can I do this in ctypes using Python? I couldn't find the info I needed
to be able to do this

*cheers
-- 
http://mail.python.org/mailman/listinfo/python-list


Unsupported Format Character '' (0x26)

2010-08-19 Thread Andrew Evans
I get an error message Unsupported Format Character '' (0x26) I narrowed
it down to these two variables

any idea how to fix it?

  SEARCH_URL_0 = 
http://search.yahoo.com/search;_ylt=A0oGdEf1XGxMJRoAUdml87UF;_ylc=X1MDMjE0MjQ3ODk0OARfcgMyBGZyA3NmcARuX2dwcwMxMARvcmlnaW4Dc3ljBHF1ZXJ5A3Rlc3QEc2FvAzE-?p=%(query)fr=sfpfr2=iscqry=

NEXT_PAGE_0 = 
http://search.yahoo.com/search;_ylt=A0oGdEEMXWxMnBAAiWhXNyoA?p=%(query)fr=sfpxargs=12KPjg1qNyy4-MkfqnfKqLCLLAhlMFta2Epstart=%(start)b=11




Not sure why its doing it the value in parenthesis should work %(query) etc

Any ideas cheeers
-- 
http://mail.python.org/mailman/listinfo/python-list


Python module Code returns empty list any ideas how to fix

2010-08-19 Thread Andrew Evans
Hello I am trying to modify Python xgoogle module to use yahoo

I have hit a road block where I receive no error messages the code I use to
test just returns an empty list.

and I don't know how to trouble shoot it

the module code is here

http://pastebin.com/iTibRs1R

and the code I am using to test is this

import re
from urlparse import urlparse
from xyahoo.search import YahooSearch, SearchError

gs = YahooSearch(quick and dirty)
print gs
gs.results_per_page = 50
results = gs.get_results()
print results
for res in results:
print res.title.encode(utf8)
print res.desc.encode(utf8)
print res.url.encode(utf8)

Any idea how to fix the module *cheers
-- 
http://mail.python.org/mailman/listinfo/python-list


Problem Creating NewLines in PDF

2010-08-18 Thread Andrew Evans
Hello I am generating a PDF in web2py but its ignoring my line breaks.

 randname = random.randrange(1, 10001)
styles = getSampleStyleSheet()
title = My Title
doc = SimpleDocTemplate(primer.pdf)
story = []
story.append(Paragraph(strftime(%a, %d %b %Y %H:%M:%S,
gmtime()),styles[Heading2]))
para = ParagraphStyle(name=output, fontName='Helvetica',
fontSize=12)
story.append(Paragraph(str(result_list), para))
doc.build(story)
response.headers['Content-Type']='application/pdf'
response.headers['Content-Disposition'] =
'attachment;filename='+str(randname)+'-.pdf'
return response.stream(open(primer.pdf, 'rb'))


result_list is a generated list. The pdf ignores line breaks and outputs it
as a list so ['  '] are included also. Any idea how I can create line breaks
and get rid of the ['  ']

*cheers
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Problem Creating NewLines in PDF

2010-08-18 Thread Andrew Evans
Hello yes

This line doesn't seem to want to accept a list for some strange reason


story.append(Paragraph(str(result_list), para))

*cheers
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Problem Creating NewLines in PDF

2010-08-18 Thread Andrew Evans
Hello ty for the fast replies

This is the string I am using for the PDF I was able to create new lines
using the HTML  br tag which is what I wanted a method to create new lines

search_str=Position: (%d) - Keyword: (%s) - Domain (%s) br /br / %
(idx+1, target_keyword, session.target_domain)
result_list.append(search_str)

 however it maintains these characters in the text of the generated PDF

['
', '
 '] with the string in between those

I just want to be able to out put the string with no extra characters I
assume these characters are there because its a list



..
From the documentation it appears that you need to pass a string.

You're just passing the result of str(result_list), which isn't giving
you what you want:
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Unsupported Format Character '' (0x26)

2010-08-18 Thread Andrew Evans
nvm I got it by adding s and d respectively after each value eg %(query)s

thank you all

On Wed, Aug 18, 2010 at 4:35 PM, Andrew Evans randra...@gmail.com wrote:

 I get an error message Unsupported Format Character '' (0x26) I narrowed
 it down to these two variables

 any idea how to fix it?

   SEARCH_URL_0 = 
 http://search.yahoo.com/search;_ylt=A0oGdEf1XGxMJRoAUdml87UF;_ylc=X1MDMjE0MjQ3ODk0OARfcgMyBGZyA3NmcARuX2dwcwMxMARvcmlnaW4Dc3ljBHF1ZXJ5A3Rlc3QEc2FvAzE-?p=%(query)fr=sfpfr2=iscqry=http://search.yahoo.com/search;_ylt=A0oGdEf1XGxMJRoAUdml87UF;_ylc=X1MDMjE0MjQ3ODk0OARfcgMyBGZyA3NmcARuX2dwcwMxMARvcmlnaW4Dc3ljBHF1ZXJ5A3Rlc3QEc2FvAzE-?p=%%28query%29fr=sfpfr2=iscqry=
 
 NEXT_PAGE_0 = 
 http://search.yahoo.com/search;_ylt=A0oGdEEMXWxMnBAAiWhXNyoA?p=%(query)fr=sfpxargs=12KPjg1qNyy4-MkfqnfKqLCLLAhlMFta2Epstart=%(start)b=11http://search.yahoo.com/search;_ylt=A0oGdEEMXWxMnBAAiWhXNyoA?p=%%28query%29fr=sfpxargs=12KPjg1qNyy4-MkfqnfKqLCLLAhlMFta2Epstart=%%28start%29b=11
 



 Not sure why its doing it the value in parenthesis should work %(query) etc

 Any ideas cheeers

-- 
http://mail.python.org/mailman/listinfo/python-list