crosswords helper program

2005-10-12 Thread gg
I plan to write a program in Python in order to help me doing 
crosswords, I was wondering if such a program already existed.

Basically it will get the number of letters of the word (5, 10, 12...) 
then the letters known (B in second letter, E in 5th letter...) and then 
search in a dictionary the words matching this criteria

Regards

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


Re: crosswords helper program

2005-10-12 Thread gg
Chris F.A. Johnson a écrit :
> On 2005-10-12, gg wrote:
> 
>>I plan to write a program in Python in order to help me doing 
>>crosswords, I was wondering if such a program already existed.
>>
>>Basically it will get the number of letters of the word (5, 10, 12...) 
>>then the letters known (B in second letter, E in 5th letter...) and then 
>>search in a dictionary the words matching this criteria
> 
> 
> import os
> pattern = "B...E.."
> wordfile = "/usr/share/dict/words"
> cmd = "grep -i '\<" + pattern + "\>' " + wordfile
> os.system( cmd )
> 
thanks to all, that should do the trick
-- 
http://mail.python.org/mailman/listinfo/python-list


Sending Email using examples From Tutorials

2018-01-27 Thread Gg Galvez
I am having difficulty getting the python script to send an email to work. Here 
is the code I use from among a number of other examples which I used. The only 
changes I made were the email addresses, so I can see the result if it works. 
If you have any suggestions, please email your reply also to 
[email protected].

Python Script used:

import smtplib
server = smtplib.SMTP('localhost')
server.sendmail('[email protected]',
"""To: [email protected]
From: [email protected]

Beware the Ides of March.
""")
server.quit()

when running this I get the following message. Please help:

Traceback (most recent call last):
  File "D:\ProgramDev\PythonDev\sendemail.py", line 3, in 
server = smtplib.SMTP('localhost')
  File 
"C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\smtplib.py", line 
251, in __init__
(code, msg) = self.connect(host, port)
  File 
"C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\smtplib.py", line 
335, in connect
self.sock = self._get_socket(host, port, self.timeout)
  File 
"C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\smtplib.py", line 
306, in _get_socket
self.source_address)
  File 
"C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\socket.py", line 
722, in create_connection
raise err
  File 
"C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\socket.py", line 
713, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because 
the target machine actively refused it
-- 
https://mail.python.org/mailman/listinfo/python-list


Python process communication

2008-08-17 Thread projects . gg . aaron
Hi,
I'd like to write a script that will connect to another already running 
process, pipe some data to it's input and receive data from it's output. I can 
create another process using subprocess module, but how do I connect to 
already running process? Maybe there is a better solution for process 
communication? I've searched in the net and found nothing, so I've decided to 
post my problem here, hopefully someone will help me.

Thanks in advance
Marek Aaron Sapota
--
http://mail.python.org/mailman/listinfo/python-list