PyOBEX installation problem

2020-09-22 Thread Johny
I tried to install PyOBEX see the log below C:\Users\expor\Downloads\OBEX>setup.py install running install running bdist_egg running egg_info writing PyOBEX.egg-info\PKG-INFO writing top-level names to PyOBEX.egg-info\top_level.txt writing dependency_links to

I2C protocol

2015-08-18 Thread Johny
Is there any library for I2C protocol so that I can control a device connected to Windows? -- https://mail.python.org/mailman/listinfo/python-list

How to solve this problem

2011-08-09 Thread Johny
I have a client that is a part of a local network.This client has a local address( not public).Is there a way how I can connect to this client from outside world? What software must I install so that I can connect and control that client from outside? Thanks B --

Control webbrowser from Python script

2010-10-09 Thread Johny
Is it possible to control any webbrowser from Python ? For example to issue http POST and GET command Thanks Johny -- http://mail.python.org/mailman/listinfo/python-list

Re: Control webbrowser from Python script

2010-10-09 Thread Johny
On Oct 9, 5:17 pm, Tim Harig user...@ilthio.net wrote: On 2010-10-09, Johny pyt...@hope.cz wrote: Is it possible to control any webbrowser from Python ? For example to issue http POST and GET  command The most reliable way to interact with a webserver is through the urllib and httplib

Smtpd module

2010-04-23 Thread Johny
I would like to use smtpd module to write very simple smtp server but this server must: 1. accept several connections at the same time( like a forking server) 2. have basic authentication that is it must understand AUTH command. Does anyone know if the smtpd module have both? Thanks Ba. --

Does a tiny Python distribution exist?

2010-03-25 Thread Johny
Does anyone know if there is a tiny Python distribution available running in a Linux environment? -- http://mail.python.org/mailman/listinfo/python-list

How to find the best solution ?

2010-03-23 Thread Johny
I have a text and would like to split the text into smaller parts, say into 100 characters each. But if the 100th character is not a blank ( but word) this must be less than 100 character.That means the word itself can not be split. These smaller parts must contains only whole( not split) words.

What is pkg-config for ?

2010-03-19 Thread Johny
Can anyone explain what is pkg-config for?ANd how can I find it in Windows? Thanks -- http://mail.python.org/mailman/listinfo/python-list

pkg-config and Windows

2010-03-17 Thread Johny
I have a program that needs to be installed with setup.py. But there is a problem when I am trying to install the program with setup.py in Windows. When I try to install with python setup.py install it goes like this C:\python setup.py install running install running build running build_py

Python bindings tutorial

2010-03-16 Thread Johny
Is there any tutorial how to write a bindings for a exe ( dos) program? I would like to run it from a Python directly ( using import command and a particular function from the binding) not using os.system command. Thanks L. -- http://mail.python.org/mailman/listinfo/python-list

Import problem

2010-03-06 Thread Johny
I have this directory structure C: \A __init__.py amodule.py \B __init__.py bmodule.py \D __init__.py dmodule.py and I want to import bmodule.py C:\cd \ C:\python Python 2.5 (r25:51908, Sep 19 2006,

Decorators

2009-03-06 Thread Johny
Hi, Can anyone explain to me what are decorators for? What are advantages of using them? Thanks L. -- http://mail.python.org/mailman/listinfo/python-list

Re: ssh problem using paramiko?

2008-10-07 Thread Johny
On Oct 7, 2:40 pm, sa6113 [EMAIL PROTECTED] wrote: I use this code : import paramiko import socket hostname = 192.168.1.4 username = test port = 22 password = ''123456 # now connect try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((hostname, port))

Processes in Linux from Python

2008-09-01 Thread Johny
To get a number of the http processes running on my Linux( Debia box) I use ps -ef | grep [h]ttpd | wc -l But If I want to use to get a number of the http processes from my Python program I must use a popen command e.g. popen2.popen3('ps -ef | grep [h]ttpd | wc -l') that is I must call an

Is there a such Python module ?

2008-07-30 Thread Johny
Is there a Python module that can help with reading SMS message from a mobile phone? Or is there an example how to read SMS message using a program written in Python,C, or any other language? Thank you very much for help L. -- http://mail.python.org/mailman/listinfo/python-list

How to find processes from Python

2008-07-25 Thread Johny
Is there a way how to find out running processes?E.g. how many Appache's processes are running? Thanks for help. BB. -- http://mail.python.org/mailman/listinfo/python-list

Python program as daemon?

2008-07-25 Thread Johny
Is it possible to run a Python program as daemon? Thanks -- http://mail.python.org/mailman/listinfo/python-list

How to find the first space?

2008-06-09 Thread Johny
How can I find the first space using regex? For example I have text Text=' This is a sample ' The last space I can remove by Text=re.sub(r\s(?!\w),'',Text) but I do not know how to remove the first space. Can anyone help? Thanks L. -- http://mail.python.org/mailman/listinfo/python-list

Re: Dbase / foxpro files

2008-05-17 Thread Johny
Thanks for your reply.Is it possible to delete a record by using the module? Thanks L -- http://mail.python.org/mailman/listinfo/python-list

Dbase / foxpro files

2008-05-15 Thread Johny
Is there a module for reading/modifing db files from Python? Thanks for help B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Dbase / foxpro files

2008-05-15 Thread Johny
On May 15, 5:21 pm, John Machin [EMAIL PROTECTED] wrote: Johny wrote: Is there a module for reading/modifing db files from Python? Thanks for help B. I have a module -- which I'm going to get around to releasing one of these days :-) -- which allows to read dBase III, dBase IV and Foxpro

Re: Standalone USB Web Server and Python Interpeter

2007-12-05 Thread Johny
Or you can look at http://www.portablepython.com/ L. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to split string

2007-12-05 Thread Johny
On Dec 5, 11:55 am, Chris [EMAIL PROTECTED] wrote: On Dec 5, 10:55 am, Johny [EMAIL PROTECTED] wrote: I have a string of a variable length and I need to split the string in strings of 6 characters . But if the 6th character is not space then I must split the string at possition

How to split string

2007-12-05 Thread Johny
I have a string of a variable length and I need to split the string in strings of 6 characters . But if the 6th character is not space then I must split the string at possition before the 6th character. For example: if the main string S is S='abcde fghc ijkl mnop' the result should be abcde

Re: How to split string

2007-12-05 Thread Johny
Thank you all who replied particularly Chris and Tim. L. -- http://mail.python.org/mailman/listinfo/python-list

Image treshold

2007-11-10 Thread Johny
Can anyone give me an example how to apply a threshold value to an image? (everything above a certain brightness level becomes white, and everything below the level becomes black.) I was told I should use 256-item mapping table and pass it to the point method. But how should the 256-item

Re: Help for Otsu implementation from C

2007-11-07 Thread Johny
On Sep 22, 6:24 pm, azrael [EMAIL PROTECTED] wrote: Thanks Man, I did it. It works fantastic. Can you please posted the working Python implementation of the Otsu filter . Thanks L. -- http://mail.python.org/mailman/listinfo/python-list

What colour model does the image use in PIL

2007-11-07 Thread Johny
I use PIL and with it im.getpixel((x,y)) to find out the colour of a pixel. But how can I find out in which color model the the return value is? For example for png picture format im.getpixel((20,50)) gives the result 60. What does the value mean? Is it possible to find out the RGB model

Re: What colour model does the image use in PIL

2007-11-07 Thread Johny
On Nov 7, 2:53 pm, Hrvoje Niksic [EMAIL PROTECTED] wrote: Johny [EMAIL PROTECTED] writes: I use PIL and with it im.getpixel((x,y)) to find out the colour of a pixel. But how can I find out in which color model the the return value is? im.mode gives you a string such as 'RGBA' or 'CMYK

Re: Readline and record separator

2007-10-31 Thread Johny
On Oct 30, 8:44 pm, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Johny a écrit : Is it possible to change record separator when using readline? As far as I know readline reads characters until found '\n' and it is the end of record for readline. This is not a record separator

Readline and record separator

2007-10-30 Thread Johny
Is it possible to change record separator when using readline? As far as I know readline reads characters until found '\n' and it is the end of record for readline. My problem is that my record consits several '\n' and when I use readline it does NOT read the whole my record. So If I could change

How to find imported modules

2007-10-16 Thread Johny
My Main program imports several other smaller programs. for example Main.py imports Program1.py Program2.py ... Program50.py Now I need to find out which of Programs imports a particular module - module timesocket.py Is that possible without opening each program? Thanks B. --

Re: Python and SSL

2007-10-04 Thread Johny
Martin and John, Thank you both for your replies Must I have OpenSSL imported in my Python program? So far I have been using only SSL support. Built-in SSL support works OK if I connect from my Python program directly to SSL server ( but not via proxy). L. --

Re: Python and SSL

2007-10-04 Thread Johny
On Oct 5, 3:50 am, John Nagle [EMAIL PROTECTED] wrote: Johny wrote: Martin and John, Thank you both for your replies Must I have OpenSSL imported in my Python program? So far I have been using only SSL support. Built-in SSL support works OK if I connect from my Python program

Re: Python and SSL

2007-10-03 Thread Johny
On Oct 3, 7:51 am, Martin v. Löwis [EMAIL PROTECTED] wrote: a certificate that is signed by OpenSSL's own CA( certification authority), that is not recognized in the program's list of root CAs, causes an exception to be raised. What is the program? What programming language is it written

Re: Python and SSL

2007-10-03 Thread Johny
On Oct 3, 2:17 pm, Martin v. Löwis [EMAIL PROTECTED] wrote: It looks like this MyPythonProgram ---ProxyServer The proxy is written in Java. I want to use that proxy to see what my Python program sends to server. The proxy uses its own certificate and this certificate must be

Re: Python and SSL

2007-10-02 Thread Johny
Thank you all for your replies. I am still a newbie with SSL issues but I found out that: a certificate that is signed by OpenSSL's own CA( certification authority), that is not recognized in the program's list of root CAs, causes an exception to be raised. (That is a different behaviour from the

Re: Python and SSL

2007-10-01 Thread Johny
On Sep 28, 11:13 pm, Heikki Toivonen [EMAIL PROTECTED] wrote: Johny wrote: I need to use Python with SSL comunication betweeen servers. (I use hhtplib but I think urllib2 can also be used ) I think I need to use SSL root certificate and tell a program to trust this certificate. You

Re: Python and SSL

2007-10-01 Thread Johny
On Oct 1, 4:31 pm, Paul Rubin http://[EMAIL PROTECTED] wrote: Johny [EMAIL PROTECTED] writes: By using my Python program I am attempting to trust a certificate signed by a certification authority that Python doesn't trust and that causes the error. No, as Martin points out, Python trusts

How to unload a module after I've imported it.

2007-09-29 Thread Johny
Is it possible to unload a module after I've imported it. I have the main program from which I import several smaller programs. Some of these uses timeoutsocket module. But one of the smaller program can not work with the timeoutsocket module, so I must unload the timeoutsocket module, execute the

Python and SSL

2007-09-28 Thread Johny
I need to use Python with SSL comunication betweeen servers. (I use hhtplib but I think urllib2 can also be used ) I think I need to use SSL root certificate and tell a program to trust this certificate. But how can I tell my Python program to trust my SSL certificate? When I tried before I

HTTPS request

2007-09-25 Thread Johny
If I need to log in to a site using https protocol must I use certification file and key file? The class HTTPSConnection syntax is class HTTPSConnection( host[, port, key_file, cert_file]) and I do not know if it is nescessary or not. Thanks for help. L. --

Re: HTTPS request

2007-09-25 Thread Johny
On Sep 25, 6:17 pm, Larry Bates [EMAIL PROTECTED] wrote: Johny wrote: If I need to log in to a site using https protocol must I use certification file and key file? The class HTTPSConnection syntax is class HTTPSConnection( host[, port, key_file, cert_file]) and I do not know

How to get headers in urllib2 response

2007-09-15 Thread Johny
Can anyone provide an example how to find out the return code and header from an urllib2 request? For example response = urllib2.urlopen('http://www.google.com').read().strip() provides data but I do not know if the return code was 200 or different. Thanks --

Https conversation - debug?

2007-09-14 Thread Johny
Is there any good sniffer for https protocol? How can be watched https conversation? Thanks for reply L. -- http://mail.python.org/mailman/listinfo/python-list

How to create a file with read access rights

2007-06-21 Thread Johny
Is it possible to create a file on Linux with access rights? For example owner can read and write into the file others can only read from the file Thanks for replies L. -- http://mail.python.org/mailman/listinfo/python-list

WebThumb

2007-06-15 Thread Johny
How can I get a website thumbnail? I would like to allow visitors to add their URLs to our pages with the thumbnail of their website. Can anyone suggest a solution for web thumbnails? Thanks L. -- http://mail.python.org/mailman/listinfo/python-list

Re: httpd: Syntax error on line 54

2007-05-23 Thread Johny
On May 22, 8:57 am, deepak [EMAIL PROTECTED] wrote: I installed apache 2.2.4 and modPython 3.3.1 on Fc6 while starting the apache server the following error occurs: httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_python.so into

How to replace the last (and only last) character in a string?

2007-05-03 Thread Johny
Let's suppose s='12345 4343 454' How can I replace the last '4' character? I tried string.replace(s,s[len(s)-1],'r') where 'r' should replace the last '4'. But it doesn't work. Can anyone explain why? Thanks L. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to replace the last (and only last) character in a string?

2007-05-03 Thread Johny
On May 3, 4:37 pm, [EMAIL PROTECTED] wrote: On May 3, 9:27 am, Johny [EMAIL PROTECTED] wrote: Let's suppose s='12345 4343 454' How can I replace the last '4' character? I tried string.replace(s,s[len(s)-1],'r') where 'r' should replace the last '4'. But it doesn't work. Can

How to find complementary colour for pixel

2007-04-26 Thread Johny
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the position where I write the text, is also different. Is there a way how to set the font colour so that it

How to set font colour in PIL

2007-04-25 Thread Johny
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the position where I write the text, is also different. Is there a way how to set the font colour so that it

PIL and font colour

2007-04-24 Thread Johny
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the position where I write the text, is also different. Is there a way how to set the font colour so that it will

PIL and font colour

2007-04-24 Thread Johny
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the position where I write the text, is also different. Is there a way how to set the font colour so that it

PIL and font colours.

2007-04-24 Thread Johny
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the position where I write the text, is also different. Is there a way how to set the font colour so that it

PIL and font colours.

2007-04-24 Thread Johny
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the position where I write the text, is also different. Is there a way how to set the font colour so that it

Picture resolution and PIL

2007-04-06 Thread Johny
Is it possible to find out a picture resolution by using PIL package? Thanks for help L. -- http://mail.python.org/mailman/listinfo/python-list

Regexp problem with `('

2007-03-22 Thread Johny
I have the following text titleGoods Item 146 (174459989) - OurWebSite/title from which I need to extract `Goods Item 146 ' Can anyone help with regexp? Thank you for help L. -- http://mail.python.org/mailman/listinfo/python-list

Webserver balance load

2007-03-05 Thread Johny
Can anyone suggest a way how to balance load on Apache server where I have Python scripts running? For example I have 3 webservers( Apache servers) and I would like to sent user's request to one of the three server depending on a load on the server. Thank you . L. --

HTTP_REFERER value

2007-02-17 Thread Johny
Is HTTP_REFERER value transfered between different domains? For example if I come to a website , say, www.python.org, from website www.microsoft.com will www.python.org finds that I came there from www.microsoft.com? Thank you for help L. -- http://mail.python.org/mailman/listinfo/python-list

Re: HTTP_REFERER value

2007-02-17 Thread Johny
On Feb 17, 10:21 am, Roel Schroeven [EMAIL PROTECTED] wrote: Johny schreef: Is HTTP_REFERER value transfered between different domains? For example if I come to a website , say,www.python.org, from website www.microsoft.com willwww.python.orgfinds that I came there fromwww.microsoft.com

Regex - where do I make a mistake?

2007-02-16 Thread Johny
I have string=span class=test45655/span. tdspan class=test123128/span span class=test789170/span where I need to replace span class=test45655/span. span class=test789170/span by space. So I tried # import re string=tdspan class=test45655/span.span class=test123128/spanspan

Re: Regex - where do I make a mistake?

2007-02-16 Thread Johny
On Feb 16, 2:14 pm, Peter Otten [EMAIL PROTECTED] wrote: Johny wrote: I have string=span class=test45655/span. tdspan class=test123128/span span class=test789170/span where I need to replace span class=test45655/span. span class=test789170/span by space. So I tried

Urllib2 and timeouts

2007-02-14 Thread Johny
In my script I started using urllib2 to connect to a list of servers.It works well but only until a server from the list is not available.Then if it is down , there is a timeout and my script ends with the error. So, if I have a list of 10 servers, and the second from the list is not available ,

How to find all the same words in a text?

2007-02-10 Thread Johny
I need to find all the same words in a text . What would be the best idea to do that? I used string.find but it does not work properly for the words. Let suppose I want to find a number 324 in the text '45 324 45324' there is only one occurrence of 324 word but string.find() finds 2

Re: How to find all the same words in a text?

2007-02-10 Thread Johny
On Feb 10, 2:42 pm, Marco Giusti [EMAIL PROTECTED] wrote: On Sat, Feb 10, 2007 at 05:29:23AM -0800, Johny wrote: I need to find all the same words in a text . What would be the best idea to do that? I used string.find but it does not work properly for the words. Let suppose I want to find

Re: Strings in Python

2007-02-09 Thread Johny
Thanks ALL for help and ideas L -- http://mail.python.org/mailman/listinfo/python-list

Strings in Python

2007-02-08 Thread Johny
Playing a little more with strings, I found out that string.find function provides the position of the first occurance of the substring in the string. Is there a way how to find out all substring's position ? To explain more, let's suppose mystring='12341' import string string.find(mystring

string.find for case insensitive search

2007-02-07 Thread Johny
Is there a good way how to use string.find function to find a substring if I need to you case insensitive substring? Thanks for reply LL -- http://mail.python.org/mailman/listinfo/python-list

Repr or Str ?

2007-02-06 Thread Johny
Where and when is good/nescessary to use `repr` instead of `str` ? Can you please explain the differences Thanks LL -- http://mail.python.org/mailman/listinfo/python-list

IP address of webserver

2007-01-27 Thread Johny
How can I find server's IP address? From console I can use ping, for example: C:\RobotP\cgi-binping www.google.com Pinging www.google.com [209.85.129.147] with 32 bytes of data: Reply from 209.85.129.147: bytes=32 time=30ms TTL=244 Reply from 209.85.129.147: bytes=32 time=30ms TTL=244 .. .. So

Regex for URL extracting

2007-01-24 Thread Johny
Does anyone know about a good regular expression for URL extracting? J. -- http://mail.python.org/mailman/listinfo/python-list