how to associate files with application
hi, i want to know how to make a specific type of file open in an application i developed in python when the user clicks on the file.(in windows) for eg. a .txt file when clicked opens in notepad, a .doc file when clicked opens in MS-word. In the same way i want to make a .xyz file open in the application i developed when clicked. thanks in advance for any advice. -- http://mail.python.org/mailman/listinfo/python-list
sizers in boa constructors
hi, I am trying to build a small gui program in python using boa constructor. i have a few problems. i would be grateful if anyone can help me in this regard. 1. i have four static text controls positioned one below the other. what i want to do is when i change the content of the upper static text control, the lower ones should reposition themselves, with a constant seperation, say 25px from the upper ones. I am not able to do this. when i change the label of upper static text, the text overlaps on the lower ones. 2. i am not able to implement sizers in general using boa. if anyone can suggest some resources where i can get information, i would be grateful thanks -- http://mail.python.org/mailman/listinfo/python-list
Re: how to associate files with application
Thanks Lasse, that was really helpful -- http://mail.python.org/mailman/listinfo/python-list
python gui using boa
hi, i am trying to develop a small gui app using boa constructor. say this app has one frame which has one static text control. i want the frame to resize itself to the width of the text contrl when i change the label of the text control via SetLabel(). how can i do this in boa constructor? can anybody guide me to a good source for learning the use of sizers in boa? thanks -- http://mail.python.org/mailman/listinfo/python-list
get message form ie
Hi, Is there any way i can get a message form internet explorer into my python script when internet explorer completes loading a page? _ ashok -- http://mail.python.org/mailman/listinfo/python-list
problem in running python on winnt
hello, I have built a standalone gui application using py2exe which works fine in my WinXp SP2 machine and another WinXp machine. When i try to run it in a Win NT SP6 machine, I get the following error. Traceback (most recent call last): File "auto.py", line 4, in ? File "zipextimporter.pyo", line 82, in load_module File "wx\_init_.pyo", line 45, in? File "zipextimporter.pyo", line 82, in load_module File "wx\_init_.pyo", line 4, in? File "zipextimporter.pyo", line 98, in load_module ImportError : MemoryLoadLibrary failed loading wx\_core_.pyd I use python 2.4.2, wxpython 2.8, py2exe 0.6.6 for development can anybody come up with a solution? thanks in advance AGK -- http://mail.python.org/mailman/listinfo/python-list
scaling
hi, IDL language contains a function called BYTSCL to scale all values of Array that lie in the range (Min £ x £ Max) into the range (0 £ x £ Top). Is there a similar function available in python? I need this to scale the pixel values of an image using PIL. thanks in advance for any help AGK -- http://mail.python.org/mailman/listinfo/python-list
override PyBitmapDataObject
hi, I am new to python and am trying my experimenting with python and wxpython. I want to use wx.PyBitmapDataObject to get bitmap data form clipboard. The wx documentation says that 'to be able to provide bitmap data on demand, derive from this class and overload GetBitmap'. How do i overload GetBitmap? Thanks in adavance for any help. _ ashok -- http://mail.python.org/mailman/listinfo/python-list
Unable to import package over NFS in solaris
Hi,
I have sqlalchemy package installed on the server. However I want to
run a script on the client that uses the sqlalchemy package. Hence I
shared the directory containing the sqlalchemy unsing NFS. Then I
added the NFS pathname to the sqlalchemy packege in the client
program. Now when I import sqlalchemy in the client program it throws
the following error.
Traceback (most recent call last):
File "/net/sqlhost/ashok/send.py", line 9, in ?
from sqlalchemy import *
ImportError: No module named sqlalchemy
I have added the NFS path to the PYTHONPATH as folllows in my program.
#!/usr/bin/python
import os,commands,sys
os.environ['PYTHONPATH']='/net/sqlhost/usr/lib/python2.4/site-packages/
SQLAlchemy-0.5.6-py2.4.egg/sqlalchemy'
sys.path.append('/net/sqlhost/usr/lib/python2.4/site-packages/
SQLAlchemy-0.5.6-py2.4.egg/sqlalchemy')
from sqlalchemy import *
Contents of the directory shared under NFS in Solaris.
bash-3.00# ls /usr/lib/python2.4/site-packages/SQLAlchemy-0.5.6-
py2.4.egg/sqlalchemy/
__init__.py engine ext log.py
pool.py queue.pycsql topological.pyc
util.py
__init__.pyc exc.py interfaces.pylog.pyc
pool.pyc schema.pytest types.py
util.pyc
databasesexc.pyc interfaces.pyc orm
queue.py schema.pyc topological.py types.pyc
Please let me know what went wrong?
thx,
~Ashok.
--
http://mail.python.org/mailman/listinfo/python-list
Re: zpifile.py error - no crc 32 attribute
Test this in the interpreter:- import zlib zlib.__file__ It will return the location of zlib module. On 8/22/18, jacob m wrote: > Hi, > " Is there perhaps a different zlib on > your path, hiding the real zlib?" - I'm unsure of that. > > "sudo apt-get install zlib1g-dev > Reading package lists... Done > Building dependency tree > Reading state information... Done > zlib1g-dev is already the newest version. > 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." > Regards > > > On 22 August 2018 at 13:12, jacob m wrote: > >> Hi guys, >> I have a problem with zipfile and zlib module, and hope to get some help. >> >> That's my error: >> "import zipfile >> File "/home/lib/python3.7/lib/python3.7/zipfile.py", line 19, in >> >> crc32 = zlib.crc32 >> AttributeError: module 'zlib' has no attribute 'crc32' " >> >> I have no idea what to do with that :/ I use this version of zipfile: >> https://github.com/python/cpython/blob/3.7/Lib/zipfile.py >> >> Somebody knows how to solve it? >> Regards >> >> > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
OT: World's largest Python caught!:)
Hi Can I please get some information on this python? I saw a brief news clip last year & am very keen to know more. Thanks Ashok Rajasingh 21 Cumberland street New Plymouth New Zealand +646 7575698 (home) 7599592 (work) Attention:The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any system and destroy any copies.Please note that the views or opinions expressed in this message may be those of the individual and not necessarily those of Tegel Foods Ltd. This e-mail message has been scanned and cleared by NetIQ MailMarshal -- http://mail.python.org/mailman/listinfo/python-list
Re: [HELP] SMTPlib not sending my mail
i checked it after your mail..
it is giving the following warning: no entropy for TLS key generation:
disabling TLS support
which was addressed here "
http://www.howtoforge.com/forums/showthread.php?t=781";
after adding the line "tlsmgr unix - - n 1000? 1 tlsmgr" to
/etc/postfix/master.cf it started working.
Thank you.
On 1/29/08, Lars Johansen <[EMAIL PROTECTED]> wrote:
>
> have you checked your mail server logs ?
>
> tir, 29.01.2008 kl. 00.24 -0800, skrev ashok.raavi:
> > Hi,
> >
> > I am also facing the same problem, smtplib used to send mail a while
> > back but it stopped sending mails.
> >
> > when i run this in interpreter
> > >>> import smtplib
> > >>> s = smtplib.SMTP("localhost")
> > >>> s.sendmail(from, to, "message")
> > {}
> > >>>
> >
> > though it is not giving any error, it is not sending mail.
> >
> > Any help is appreciated.
> >
> > ornto wrote:
> > > Hi, I'm trying to create an application which checks a
> > > dynamic web site and on certain events sends an email to me.
> > > My problem though is with the email task. By now I made this
> > > simple test code:
> > >
> > > #prova invio email
> > > smtpserver = smtplib.SMTP(mailserver)
> > > messaggio= "Messaggio di prova"
> > > print mail
> > > print messaggio
> > > smtpresult=smtpserver.sendmail("Watcher",mail,messaggio)
> > > if smtpresult:
> > > print smtpresult
> > > smtpserver.quit()
> > >
> > > "mailserver" and "mail" values are loaded from a ini file
> > > and they're correct.
> > > The call to smtpserver gives back no errors (smtpresult
> > > remains empty).
> > > The running enviroment gives no error.
> > > So, it looks like that the program works alloright, sending
> > > the mail- BUT, I receive no mail! I've tried to change the
> > > smtp server with another one which still works with my isp,
> > > with no luck. If I try a smtp which doesn't give me access,
> > > I correctly receive an error from the program.
> > > What might be the problem?
>
>
--
ashok raavi
--
http://mail.python.org/mailman/listinfo/python-list
read a process output with subprocess.Popen
Hi,
I m trying a read the output of a process which is running
continuously with subprocess.Popen. However the readline() method
hangs for the process to finish. Please let me know if the following
code can be made to work with subprocess.Popen with threads or queues.
I tried a lot of methods but to no avail. It would be great if someone
can make it work.
import subprocess
p1 = subprocess.Popen('tail -f /var/log/
messages',stdout=subprocess.PIPE,shell=True)
p2 = subprocess.Popen('grep
something',stdin=p1.stdout,stdout=subprocess.PIPE,shell=True)
while 1:
line = p2.stdout.readline()
print line
Thanks,
~Ashok.
--
http://mail.python.org/mailman/listinfo/python-list
Repost: Read a running process output
Hi,
I very badly need this to work. I have been googling out for a week
with no significant solution. I open a process p1 which does keeps
running for 4+ hours. It gives some output in stdout now and then. I
open this process with subprocess.Popen and redirect the stdout to
PIPE. However when I read the output with readline it blocks waiting
forever. I need to read from p1.stdout till what it has in the PIPE.
Can someone help me out with the exact code change that can accomplish
the task.
from subprocess import *
p1=Popen('/usr/sunvts/bin/64/vtsk -d',stdout=PIPE,shell=True)
while 1:
line=p1.stdout.readline()
print line
Thanks in advance,
~Ashok.
--
http://mail.python.org/mailman/listinfo/python-list
Re: Repost: Read a running process output
On Feb 5, 5:12 pm, Alain Ketterlin
wrote:
> Ashok Prabhu writes:
> > from subprocess import *
> > p1=Popen('/usr/sunvts/bin/64/vtsk -d',stdout=PIPE,shell=True)
>
> Use Popen(['/usr/...','-d'],stdout=PIPE), i.e., no shell.
>
> -- Alain.
Hi Alain,
Thanks for the response. However it throws an error. Please find
below.
>>> from subprocess import *
>>> p1=Popen('/usr/sunvts/bin/64/vtsk -d',stdout=PIPE)
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.4/subprocess.py", line 543, in __init__
errread, errwrite)
File "/usr/lib/python2.4/subprocess.py", line 975, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Thanks,
~Ashok.
--
http://mail.python.org/mailman/listinfo/python-list
Re: Repost: Read a running process output
On Feb 5, 5:58 pm, Alain Ketterlin
wrote:
> Ashok Prabhu writes:
> >> > p1=Popen('/usr/sunvts/bin/64/vtsk -d',stdout=PIPE,shell=True)
>
> >> Use Popen(['/usr/...','-d'],stdout=PIPE), i.e., no shell.
>
> >> -- Alain.
> > Thanks for the response. However it throws an error. Please find
> > below.
>
> >>>> from subprocess import *
> >>>> p1=Popen('/usr/sunvts/bin/64/vtsk -d',stdout=PIPE)
>
> You forgot to change the monolithic command into a list of words. Since
> you don't use the shell anymore you have to give Popen a pre-parsed
> command line.
>
> -- Alain.
Here is the error again
>>> p1=Popen('/usr/sunvts/bin/64/vtsk','-d',stdout=PIPE)
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.4/subprocess.py", line 494, in __init__
raise TypeError("bufsize must be an integer")
TypeError: bufsize must be an integer
~Ashok.
--
http://mail.python.org/mailman/listinfo/python-list
Re: Repost: Read a running process output
On Feb 5, 6:33 pm, Ashok Prabhu wrote:
> On Feb 5, 5:58 pm, Alain Ketterlin
> wrote:
>
>
>
> > Ashok Prabhu writes:
> > >> > p1=Popen('/usr/sunvts/bin/64/vtsk -d',stdout=PIPE,shell=True)
>
> > >> Use Popen(['/usr/...','-d'],stdout=PIPE), i.e., no shell.
>
> > >> -- Alain.
> > > Thanks for the response. However it throws an error. Please find
> > > below.
>
> > >>>> from subprocess import *
> > >>>> p1=Popen('/usr/sunvts/bin/64/vtsk -d',stdout=PIPE)
>
> > You forgot to change the monolithic command into a list of words. Since
> > you don't use the shell anymore you have to give Popen a pre-parsed
> > command line.
>
> > -- Alain.
>
> Here is the error again
>
> >>> p1=Popen('/usr/sunvts/bin/64/vtsk','-d',stdout=PIPE)
>
> Traceback (most recent call last):
> File "", line 1, in ?
> File "/usr/lib/python2.4/subprocess.py", line 494, in __init__
> raise TypeError("bufsize must be an integer")
> TypeError: bufsize must be an integer
>
> ~Ashok.
Oops i missed the braces. But still no output.
>>> p1=Popen(['/usr/sunvts/bin/64/vtsk','-d'],stdout=PIPE)
>>> while 1:
... a=p1.stdout.readline()
... print a
...
--
http://mail.python.org/mailman/listinfo/python-list
Regular expression issue
Hi, The following is a sample of my problem. I get input from user and store it in variable 'b'. I want to match the user input with the contents of another variable 'a'. However I m not able to get the exact match. Could someone help? >>> print a c c+ >>> b 'c+' >>> re.search(b,a).group() 'c' In the above example I want re to find the string 'c+' instead of 'c'. I want a solution without escaping the '+' symbol with backslash because it is given by the user. Thanks, ~Ashok. -- http://mail.python.org/mailman/listinfo/python-list
