How to build and upload eggs to pypi?

2011-03-21 Thread morphex
Hi,

I have a couple of project which are on PyPi, and now I'd like to
update some of them.  Is there a good howto somewhere, showing how to
add new versions (instead of updating one that's already there) etc?

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


Web framework for static pages

2019-08-12 Thread morphex
Hi.

After a long break, I'm starting to work with web development again, in my 
company Nidelven IT.

http://www.nidelven-it.no

I've used Zope and Plone since the early days, as well as other web systems / 
frameworks, Python-based, some PHP, Java etc.

However, I would like to add another tool to my toolbox, another weapon to the 
arsenal..

Some customers would want static pages, and that's something I want to offer.

What frameworks are there for generating static web pages in Python? What are 
the features of each?

Thanks,

Morten
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Web framework for static pages

2019-08-12 Thread morphex
Why Google it, when I have an Oracle? 😄

-Morten
-- 
https://mail.python.org/mailman/listinfo/python-list


Sending email in utf-8?

2005-11-07 Thread morphex
Hi,

I have an email that's in the utf-8 encoding, and I'm getting this
error message when I try to send it using smtplib:

* Module smtplib, line 688, in sendmail
* Module smtplib, line 485, in data
* Module smtplib, line 312, in send
* Module socket, line 1, in sendall

UnicodeEncodeError: 'ascii' codec can't encode characters in position
263-264: ordinal not in range(128)

any suggestions on how I can approach this so that the email can be
sent without raising errors?

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


Re: Sending email in utf-8?

2005-11-07 Thread morphex
That works, kinda.  I get strange characters now like this

"""
Date: Mon, 7 Nov 2005 11:38:29 -0700 (MST)
Message-Id: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Subject:  Order confirmation
Content-Type: text/plain; charset="utf-8"
X-Bogosity: No, tests=bogofilter, spamicity=0.00, version=0.92.8

Thank you for your order, it is copied here for your convenience, and
we will process it shortly.

Name:  ø
Phone: ø
Email:  [EMAIL PROTECTED]
Comments:  asdf
"""

but at least it doesn't raise any errors.

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


Re: Sending email in utf-8?

2005-11-09 Thread morphex
By turning everything into unicode objects (unicode(string)) and then
running body.encode('utf-8') and using quoted printable, it works.

Thanks for all the help, it's really appreciated!

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


Example of using pty to control a process?

2005-01-05 Thread morphex
Hi,

I'm trying to get the output from the command top on Linux, using
python.  I'd like to start top, get a page of output, and then send top
the letter 'q' to end the process.

Looking around I've figured that the module pty can be used for this,
however, I can't find any good examples of how to use it.
Any ideas as to where I can look?

Thanks,

Morten

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


Re: Example of using pty to control a process?

2005-01-05 Thread morphex
Oh right.  I knew about the -b option, but not the -n 1 option (which
isn't required on FreeBSD).  Thanks, I'll obviously use that instead!
:)

Regards,

Morten

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


Creating text on images

2005-01-12 Thread morphex
Hi all,

I'm trying to create a script that will superimpose text on an image.
I didn't find any great examples out there on how this can be done (I
presume using PIL is necessary), do you know of any examples?
Thanks,

Morten

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


Re: Creating text on images

2005-01-13 Thread morphex
Yes, something like that.  I was a bit confused when it came to using
truetype fonts, but that was straightforward enough (just pass font
objects to the text method).  :)

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


Code for generating validation codes (in images)

2005-09-04 Thread morphex
Hi,

does anyone of you know of some code I can use to generate validation
code images?

Those images you can see on various login forms used to prevent bots
for performing a brute-force attack..

Thanks,

Morten

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


Re: Code for generating validation codes (in images)

2005-09-04 Thread morphex
Great, thanks to you both.  :-)

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


Platform independent adduser script?

2005-02-18 Thread morphex
Hi there,

does anyone here know of a script that enables adding of users on UNIX
platforms via python?

Thanks,

Morten

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


Why does 1**2**3**4**5 raise a MemoryError?

2013-03-31 Thread morphex
Hi.

I was just doodling around with the python interpreter today, and here is the 
dump from the terminal:

morphex@laptop:~$ python
Python 2.7.3 (default, Sep 26 2012, 21:53:58) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 1**2
1
>>> 1**2**3
1
>>> 1**2**3**4
1L
>>> 1**2**3**4**5
Traceback (most recent call last):
  File "", line 1, in 
MemoryError
>>> 

Does anyone know why this raises a MemoryError?  Doesn't make sense to me.

Happy Easter!

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


Re: Why does 1**2**3**4**5 raise a MemoryError?

2013-03-31 Thread morphex
Aha, OK.  Thought I found a bug but yeah that makes sense ;)

While we're on the subject, wouldn't it be nice to have some cap there so that 
it isn't possible to more or less block the system with large exponentiation?

On Sunday, March 31, 2013 9:33:32 AM UTC+2, Steven D'Aprano wrote:
> On Sat, 30 Mar 2013 23:56:46 -0700, morphex wrote:
> 
> 
> 
> > Hi.
> 
> > 
> 
> > I was just doodling around with the python interpreter today, and here
> 
> > is the dump from the terminal:
> 
> > 
> 
> > morphex@laptop:~$ python
> 
> > Python 2.7.3 (default, Sep 26 2012, 21:53:58) [GCC 4.7.2] on linux2
> 
> > Type "help", "copyright", "credits" or "license" for more information.
> 
> >>>> 1**2
> 
> > 1
> 
> >>>> 1**2**3
> 
> > 1
> 
> >>>> 1**2**3**4
> 
> > 1L
> 
> >>>> 1**2**3**4**5
> 
> > Traceback (most recent call last):
> 
> >   File "", line 1, in 
> 
> > MemoryError
> 
> >>>> 
> 
> >>>> 
> 
> > Does anyone know why this raises a MemoryError?  Doesn't make sense to
> 
> > me.
> 
> 
> 
> Because exponentiation is right-associative, not left.
> 
> 
> 
> 1**2**3**4**5 is calculated like this:
> 
> 
> 
> 1**2**3**4**5
> 
> => 1**2**3**1024
> 
> => 1**2**373...481  #  489-digit number
> 
> => 1**(something absolutely humongous)
> 
> => 1
> 
> 
> 
> except of course you get a MemoryError in calculating the intermediate 
> 
> values.
> 
> 
> 
> In other words, unlike you or me, Python is not smart enough to realise 
> 
> that 1**(...) is automatically 1, it tries to calculate the humongous 
> 
> intermediate result, and that's what fails.
> 
> 
> 
> For what it's worth, that last intermediate result (two to the power of 
> 
> the 489-digit number) has approximately a billion trillion trillion 
> 
> trillion trillion trillion trillion trillion trillion trillion trillion 
> 
> trillion trillion trillion trillion trillion trillion trillion trillion 
> 
> trillion trillion trillion trillion trillion trillion trillion trillion 
> 
> trillion trillion trillion trillion trillion trillion trillion trillion 
> 
> trillion trillion trillion trillion trillion trillion digits.
> 
> 
> 
> (American billion and trillion, 10**9 and 10**12 respectively.)
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> Steven

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


Errors testing m2crypto

2005-12-16 Thread morphex
Hi,

I get the following messages running the testall.py script with
m2crypto 0.13, can anyone tell me what's wrong?

EE
==
ERROR: test_cipher_mismatch (test_ssl.SSLClientTestCase)
--
Traceback (most recent call last):
  File "/root/packages/files/m2crypto-0.13/tests/test_ssl.py", line 89,
in test_cipher_mismatch
ctx = SSL.Context()
  File
"/usr/local/lib/python2.3/site-packages/M2Crypto/SSL/Context.py",
line 41, in __init__
map()[self.ctx] = self
  File
"/usr/local/lib/python2.3/site-packages/M2Crypto/SSL/Context.py",
line 20, in __setitem__
self.map[key] = value
TypeError: unhashable type

==
ERROR: test_cipher_ok (test_ssl.SSLClientTestCase)
--
Traceback (most recent call last):
  File "/root/packages/files/m2crypto-0.13/tests/test_ssl.py", line
115,
in test_cipher_ok
ctx = SSL.Context()
  File
"/usr/local/lib/python2.3/site-packages/M2Crypto/SSL/Context.py",
line 41, in __init__
map()[self.ctx] = self
  File
"/usr/local/lib/python2.3/site-packages/M2Crypto/SSL/Context.py",
line 20, in __setitem__
self.map[key] = value
TypeError: unhashable type

==
ERROR: test_no_such_cipher (test_ssl.SSLClientTestCase)
--
Traceback (most recent call last):
  File "/root/packages/files/m2crypto-0.13/tests/test_ssl.py", line
102,
in test_no_such_cipher
ctx = SSL.Context()
  File
"/usr/local/lib/python2.3/site-packages/M2Crypto/SSL/Context.py",
line 41, in __init__
map()[self.ctx] = self
  File
"/usr/local/lib/python2.3/site-packages/M2Crypto/SSL/Context.py",
line 20, in __setitem__
self.map[key] = value
TypeError: unhashable type

==
ERROR: test_server_simple (test_ssl.SSLClientTestCase)
--
Traceback (most recent call last):
  File "/root/packages/files/m2crypto-0.13/tests/test_ssl.py", line 55,
in test_server_simple
ctx = SSL.Context()
  File
"/usr/local/lib/python2.3/site-packages/M2Crypto/SSL/Context.py",
line 41, in __init__
map()[self.ctx] = self
  File
"/usr/local/lib/python2.3/site-packages/M2Crypto/SSL/Context.py",
line 20, in __setitem__
self.map[key] = value
TypeError: unhashable type

==
ERROR: test_tls1_nok (test_ssl.SSLClientTestCase)
--
Traceback (most recent call last):
  File "/root/packages/files/m2crypto-0.13/tests/test_ssl.py", line 66,
in test_tls1_nok
ctx = SSL.Context('tlsv1')
  File
"/usr/local/lib/python2.3/site-packages/M2Crypto/SSL/Context.py",
line 41, in __init__
map()[self.ctx] = self
  File
"/usr/local/lib/python2.3/site-packages/M2Crypto/SSL/Context.py",
line 20, in __setitem__
self.map[key] = value
TypeError: unhashable type

==
ERROR: test_tls1_ok (test_ssl.SSLClientTestCase)
--
Traceback (most recent call last):
  File "/root/packages/files/m2crypto-0.13/tests/test_ssl.py", line 78,
in test_tls1_ok
ctx = SSL.Context('tlsv1')
  File
"/usr/local/lib/python2.3/site-packages/M2Crypto/SSL/Context.py",
line 41, in __init__
map()[self.ctx] = self
  File
"/usr/local/lib/python2.3/site-packages/M2Crypto/SSL/Context.py",
line 20, in __setitem__
self.map[key] = value
TypeError: unhashable type

--

Thanks,

Morten

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


Recommended SOAP library?

2009-01-22 Thread morphex
Hi,

I have to implement a service which involves some SOAP/WSDL.  So far
I've found

http://pywebsvcs.sourceforge.net/

Is that the recommended library to build some logic which sets/
retrieves some information from a web service?

Thanks,

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


Re: Recommended SOAP library?

2009-01-22 Thread morphex
On 22 Jan, 13:38, GHZ  wrote:
> if you require a SOAP client, then I would recommend 
> SUDShttps://fedorahosted.org/suds/
>
> Other options are not in active development, so is difficult to get
> support.

SUDS looks great, thanks for the tip! :)

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