Re: I need some help interpreting this error

2021-02-17 Thread Terry Reedy
On 2/17/2021 10:40 AM, Chris Green wrote: I'm running this using Python 3.7 on a Linux system. Most of the time (i.e. for a couple of days now) the program has been satifactorily delivering mail messages, hundreds of them. However one mail message has provoked the following error:-

Re: I need some help interpreting this error

2021-02-17 Thread 2QdxY4RzWzUUiLuE
On 2021-02-17 at 17:36:48 +, Chris Green wrote: > Stefan Ram wrote: > > Chris Green writes: > > >chris@cheddar$ tail mail.err > > >Traceback (most recent call last): > > > File "/home/chris/.mutt/bin/filter.py", line 95, in > > >if sbstrip in msghdr["subject"]: > > >

Re: I need some help interpreting this error

2021-02-17 Thread 2QdxY4RzWzUUiLuE
On 2021-02-17 at 16:52:55 +, Chris Green wrote: > Stefan Ram wrote: > > Chris Green writes: > > >But msghdr["subject"] is surely just a string isn't it? Why is it > > >complaining about something of type 'Header'? > > > > What would you do to debug-print the type of an object? > > >

Re: I need some help interpreting this error

2021-02-17 Thread Chris Green
Stestagg wrote: > I don't particularly like to encourage this shotgun help request because, > as previous commenter suggests, debugging this yourself is best. > > Sometimes debugging is super hard, and especially so when uncommon > situations occur, but it's always far easier to debug things

Re: I need some help interpreting this error

2021-02-17 Thread Stestagg
Some sources, in case they help: Message.get() calls policy.header_fetch_parse ( https://github.com/python/cpython/blob/cd80f430daa7dfe7feeb431ed34f88db5f64aa30/Lib/email/message.py#L471 ) Compat32.header_fetch_parse calls self._sanitize_header (

Re: I need some help interpreting this error

2021-02-17 Thread Chris Green
Stefan Ram wrote: > Chris Green writes: > >chris@cheddar$ tail mail.err > >Traceback (most recent call last): > > File "/home/chris/.mutt/bin/filter.py", line 95, in > >if sbstrip in msghdr["subject"]: > >TypeError: argument of type 'Header' is not iterable > >But

Re: I need some help interpreting this error

2021-02-17 Thread Stestagg
I don't particularly like to encourage this shotgun help request because, as previous commenter suggests, debugging this yourself is best. Sometimes debugging is super hard, and especially so when uncommon situations occur, but it's always far easier to debug things when you have visibility into

Re: I need some help interpreting this error

2021-02-17 Thread Chris Green
2qdxy4rzwzuui...@potatochowder.com wrote: > On 2021-02-17 at 16:42:03 +, > Chris Green wrote: > > > 2qdxy4rzwzuui...@potatochowder.com wrote: > > > On 2021-02-17 at 15:40:27 +, > > > Chris Green wrote: > > > > > > > I'm running this using Python 3.7 on a Linux system. > > > > > > > >

Re: I need some help interpreting this error

2021-02-17 Thread Chris Green
Stefan Ram wrote: > Chris Green writes: > >But msghdr["subject"] is surely just a string isn't it? Why is it > >complaining about something of type 'Header'? > > What would you do to debug-print the type of an object? > I don't know, what would I do? :-) Without knowing what provokes the

Re: I need some help interpreting this error

2021-02-17 Thread 2QdxY4RzWzUUiLuE
On 2021-02-17 at 16:42:03 +, Chris Green wrote: > 2qdxy4rzwzuui...@potatochowder.com wrote: > > On 2021-02-17 at 15:40:27 +, > > Chris Green wrote: > > > > > I'm running this using Python 3.7 on a Linux system. > > > > > > Most of the time (i.e. for a couple of days now) the program

Re: I need some help interpreting this error

2021-02-17 Thread Chris Green
2qdxy4rzwzuui...@potatochowder.com wrote: > On 2021-02-17 at 15:40:27 +, > Chris Green wrote: > > > I'm running this using Python 3.7 on a Linux system. > > > > Most of the time (i.e. for a couple of days now) the program has been > > satifactorily delivering mail messages, hundreds of

Re: I need some help interpreting this error

2021-02-17 Thread 2QdxY4RzWzUUiLuE
On 2021-02-17 at 15:40:27 +, Chris Green wrote: > I'm running this using Python 3.7 on a Linux system. > > Most of the time (i.e. for a couple of days now) the program has been > satifactorily delivering mail messages, hundreds of them. However one > mail message has provoked the following

I need some help interpreting this error

2021-02-17 Thread Chris Green
I'm running this using Python 3.7 on a Linux system. Most of the time (i.e. for a couple of days now) the program has been satifactorily delivering mail messages, hundreds of them. However one mail message has provoked the following error:- chris@cheddar$ tail mail.err Traceback (most

reStrcuturedText WYSIWYG online editor (was: Need some help with Python Job Board)

2017-11-13 Thread Ben Finney
Skip Montanaro writes: > Thanks, Justin. I imagine editors probably exist which can switch between > WYSIWYG and markup. The ‘rsted’ app is a reStructuredText WYSIWYG editor written in the Flask framework. -- \ “Remember:

Re: [Jobs] Need some help with Python Job Board

2017-11-13 Thread justin walters
On Mon, Nov 13, 2017 at 1:16 AM, M.-A. Lemburg wrote: > Hi Justin, > > the default markup is currently set to restructuredtext: > > https://github.com/python/pythondotorg/blob/master/jobs/models.py > > but this can be changed to any of these supported ones: > >

Re: [Jobs] Need some help with Python Job Board

2017-11-13 Thread M.-A. Lemburg
Hi Justin, the default markup is currently set to restructuredtext: https://github.com/python/pythondotorg/blob/master/jobs/models.py but this can be changed to any of these supported ones: https://github.com/jamesturk/django-markupfield as long as we make sure that all existing records

Re: Need some help with Python Job Board

2017-11-12 Thread Skip Montanaro
Thanks, Justin. I imagine editors probably exist which can switch between WYSIWYG and markup. Whether that markup can be Markdown or not, I don't know. Marc-André Lemburg listed a few possible editors in the ticket he opened, but I've not dug into their properties. Skip On Sun, Nov 12, 2017 at

Re: Need some help with Python Job Board

2017-11-12 Thread justin walters
On Sat, Nov 11, 2017 at 3:27 PM, Skip Montanaro wrote: > The Python Job Board could use a little help in a couple areas. One, we can > always use help reviewing and approving (or rejecting) submissions. The > backlog keeps growing, and the existing volunteers who help

Need some help with Python Job Board

2017-11-11 Thread Skip Montanaro
The Python Job Board could use a little help in a couple areas. One, we can always use help reviewing and approving (or rejecting) submissions. The backlog keeps growing, and the existing volunteers who help can't always keep up. (This is a good problem to have, reflecting on Python's broad

Re: Need some help with argparse

2017-10-03 Thread Ben Finney
Kryptxy via Python-list writes: > I have a group of arguments, say: (-a, -b, -c, -d, -e) [lets call it group1] > I have another group, say: (-z, -y, -x, -w) [lets call it group2] Argument groups are a feature to control the help output from the parser: When an

Need some help with argparse

2017-10-03 Thread Kryptxy via Python-list
Hi, I am trying to figure out something with argparse. Here is a scenario: I have a group of arguments, say: (-a, -b, -c, -d, -e) [lets call it group1] I have another group, say: (-z, -y, -x, -w) [lets call it group2] Code: import argparse parser = argparse.ArgumentParser(description="Test this

Re: Need some help managing project and making it a little simple (pretty messed up code)

2017-08-17 Thread dieter
Kryptxy via Python-list writes: > ... > I am new to python. While learning python, I began a side project. Its a > command-line search program. > ... > But, I am unable to understand how I should begin structuring the project > (updating code according to OOP). If

Need some help managing project and making it a little simple (pretty messed up code)

2017-08-16 Thread Kryptxy via Python-list
Hello, I am new to python. While learning python, I began a side project. Its a command-line search program. Here: https://github.com/kryptxy/torrench The project is becoming a little difficult to manage, and before it becomes more complex, I'd like to sort it out a little and make it more

Re: Hi! i need some help with a program in python on Raspberry pi3.

2017-04-17 Thread breamoreboy
On Friday, April 14, 2017 at 3:27:29 PM UTC+1, Kasper wrote: > every time i run the program i get this messeage: > > Traceback (most recent call last): > File "smartmirror.py", line 159, in get_weather > temprature2 = "%S%S" % (str(int(weather_obj['currently']['temperature'])), >

Re: Hi! i need some help with a program in python on Raspberry pi3.

2017-04-14 Thread Terry Reedy
On 4/14/2017 10:27 AM, Kasper wrote: every time i run the program i get this messeage: Traceback (most recent call last): File "smartmirror.py", line 159, in get_weather temprature2 = "%S%S" % (str(int(weather_obj['currently']['temperature'])), degree_sign) KeyError: 'currently' Error:

Re: Hi! i need some help with a program in python on Raspberry pi3.

2017-04-14 Thread Peter Otten
Kasper wrote: > every time i run the program i get this messeage: > > Traceback (most recent call last): > File "smartmirror.py", line 159, in get_weather > temprature2 = "%S%S" % (str(int(weather_obj['currently'] ['temperature'])), > degree_sign) > KeyError: 'currently' > Error:

Re: Hi! i need some help with a program in python on Raspberry pi3.

2017-04-14 Thread Steve D'Aprano
On Sat, 15 Apr 2017 12:27 am, Kasper wrote: > every time i run the program i get this messeage: > > Traceback (most recent call last): > File "smartmirror.py", line 159, in get_weather > temprature2 = "%S%S" % > (str(int(weather_obj['currently']['temperature'])), > degree_sign) >

Hi! i need some help with a program in python on Raspberry pi3.

2017-04-14 Thread Kasper
every time i run the program i get this messeage: Traceback (most recent call last): File "smartmirror.py", line 159, in get_weather temprature2 = "%S%S" % (str(int(weather_obj['currently']['temperature'])), degree_sign) KeyError: 'currently' Error: 'currently'. Cannot get weather. How do

Re: Need some help with NetGroupAddUser

2014-11-11 Thread Jaimin Ajmeri
kcollins15 at cfl.rr.com writes: New B question -- Need help with win32net.NetGroupAddUser. I used Mark Hammond sample code to create a new user from his book Python Programming on Win32. I then added one line to add the newuser to a group. def CreateUserAndShare(userName, fullName):

Re: Need some help with NetGroupAddUser

2014-11-11 Thread MRAB
On 2014-11-11 04:30, Jaimin Ajmeri wrote: kcollins15 at cfl.rr.com writes: New B question -- Need help with win32net.NetGroupAddUser. I used Mark Hammond sample code to create a new user from his book Python Programming on Win32. I then added one line to add the newuser to a group. def

Re: Need some help confirming transactions using sha256

2013-02-01 Thread Christian Heimes
Am 31.01.2013 18:55, schrieb Peter Pearson: txid = 'r7A7clvs9waizF+6QEiI0tgAq1ar48JItK3kg9kaeAFXz2vsMsHmOd9r9fhkmtxTz3CQnGAPMaDeKLvgb1A2VA' secret = '10812806653842663997bf5971637f86f26c71a4716276d7fa8f323a83588d91:1' hashlib.sha256(txid+:+secret).hexdigest()

Need some help confirming transactions using sha256

2013-01-31 Thread kryptox . exchange
I'm wondering if anyone can help me as I can't seem to get this to work. There is an online dice game that is provably fair by calculating the 'dice roll' using using a sha256 hash calculated against my transaction ID generated by me. The secret used to make the calculation is revealed at the

Re: Need some help confirming transactions using sha256

2013-01-31 Thread kryptox . exchange
Ok, I'm still stuck! :( I do however now think that I'm not supposed to use hmac here. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need some help confirming transactions using sha256

2013-01-31 Thread Peter Pearson
On Thu, 31 Jan 2013 08:43:03 -0800 (PST), kryptox.excha...@gmail.com wrote: I'm wondering if anyone can help me as I can't seem to get this to work. There is an online dice game that is provably fair by calculating the 'dice roll' using using a sha256 hash calculated against my transaction ID

Re: Need some help confirming transactions using sha256

2013-01-31 Thread kryptox . exchange
On Thursday, January 31, 2013 6:55:05 PM UTC+1, Peter Pearson wrote: On Thu, 31 Jan 2013 08:43:03 -0800 (PST), kryptox.excha...@gmail.com wrote: I'm wondering if anyone can help me as I can't seem to get this to work. There is an online dice game that is provably fair by

need some help with unexpected signal exception when using input from a thread (Pypy 1.9.0 on osx/linux)

2012-12-15 Thread Irmen de Jong
Hi. Using Pypy 1.9.0. Importing readline. Using a background thread to get input() from stdin. It then crashes with: File /usr/local/Cellar/pypy/1.9/lib_pypy/pyrepl/unix_console.py, line 400, in restore signal.signal(signal.SIGWINCH, self.old_sigwinch) ValueError: signal() must be called

Re: need some help with unexpected signal exception when using input from a thread (Pypy 1.9.0 on osx/linux)

2012-12-15 Thread Dieter Maurer
Irmen de Jong irmen.nos...@xs4all.nl writes: Using Pypy 1.9.0. Importing readline. Using a background thread to get input() from stdin. It then crashes with: File /usr/local/Cellar/pypy/1.9/lib_pypy/pyrepl/unix_console.py, line 400, in restore signal.signal(signal.SIGWINCH,

Re: First script. Need some help

2010-05-28 Thread ledpepper
Thanks Everyone. I followed your instructions and my script is successfully copying the result to the clipboard. Now for the fun. To work out the rest of the script :) I use the IDLE IDE and not codepad.org. I just thought that was the standard for pasting scripts here in this group. Thanks all.

First script. Need some help

2010-05-27 Thread ledpepper
#Enter in firstname.lastname (bob.smith) #Count the amount of letters(x) and vowels(y) #Then work out if bob is but not equal to 6 letters #If firstname is less than 6 print firstnamesurnamexy #If firstname is equal to or greater than 6 print firstnamexy #Copy result to clipboard

Re: First script. Need some help

2010-05-27 Thread MRAB
ledpepper wrote: #Enter in firstname.lastname (bob.smith) #Count the amount of letters(x) and vowels(y) #Then work out if bob is but not equal to 6 letters #If firstname is less than 6 print firstnamesurnamexy #If firstname is equal to or greater than 6 print firstnamexy #Copy result to

Re: First script. Need some help

2010-05-27 Thread Mark Lawrence
On 27/05/2010 19:41, ledpepper wrote: #Enter in firstname.lastname (bob.smith) #Count the amount of letters(x) and vowels(y) #Then work out if bob is but not equal to 6 letters #If firstname is less than 6 print firstnamesurnamexy #If firstname is equal to or greater than 6 print firstnamexy

Re: First script. Need some help

2010-05-27 Thread Dave Angel
ledpepper wrote: #Enter in firstname.lastname (bob.smith) #Count the amount of letters(x) and vowels(y) #Then work out if bob is but not equal to 6 letters #If firstname is less than 6 print firstnamesurnamexy #If firstname is equal to or greater than 6 print firstnamexy #Copy result to

Re: Need some help speeding up this loop

2008-10-30 Thread Marc 'BlackJack' Rintsch
On Wed, 29 Oct 2008 19:24:32 -0700, erikcw wrote: I'm trying to write a loop that will build a list of template strings. My current implementation is *really slow*. It took 15 minutes to finish. (final len(list) was about 16k entries.) What is `list` here? Do you mean ``len(templates)``?

Re: Need some help speeding up this loop

2008-10-30 Thread Arnaud Delobelle
On Oct 30, 2:24 am, erikcw [EMAIL PROTECTED] wrote: Hi all, I'm trying to write a loop that will build a list of template strings. My current implementation is *really slow*.  It took 15 minutes to finish. (final len(list) was about 16k entries.) #combinations = 12 small template strings

Need some help speeding up this loop

2008-10-29 Thread erikcw
Hi all, I'm trying to write a loop that will build a list of template strings. My current implementation is *really slow*. It took 15 minutes to finish. (final len(list) was about 16k entries.) #combinations = 12 small template strings ie {{ city }}, {{ state }}... #states = either a django

Re: need some help in serving static files inside a wsgi apps

2008-05-25 Thread Martin v. Löwis
I guess, Apache does some kind of memory caching for files, which are often requested and small enough to fit into the system memory. Are you sure about this? I could not find anything in the documentation (other than mod_cache and friends, which is an unrelated functionality). Also, I don't

Re: need some help in serving static files inside a wsgi apps

2008-05-25 Thread Sebastian 'lunar' Wiesner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [ Martin v. Löwis [EMAIL PROTECTED] ] I guess, Apache does some kind of memory caching for files, which are often requested and small enough to fit into the system memory. Are you sure about this? No, I'm not. That's why I said I guess ;)

Re: need some help in serving static files inside a wsgi apps

2008-05-25 Thread Diez B. Roggisch
Sebastian 'lunar' Wiesner schrieb: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [ Diez B. Roggisch [EMAIL PROTECTED] ] I finally managed to work with static files with a little hack, but it's ugly because I'm reading each static file per request. How else should that work? Apache does that

Re: need some help in serving static files inside a wsgi apps

2008-05-25 Thread Matthew Woodcraft
Diez B. Roggisch [EMAIL PROTECTED] wrote: Sebastian 'lunar' Wiesner schrieb: I guess, Apache does some kind of memory caching for files, which are often requested and small enough to fit into the system memory. May be, that's what the OP is referring to ... I'm not aware of that, and I even

Re: need some help in serving static files inside a wsgi apps

2008-05-25 Thread Diez B. Roggisch
Matthew Woodcraft schrieb: Diez B. Roggisch [EMAIL PROTECTED] wrote: Sebastian 'lunar' Wiesner schrieb: I guess, Apache does some kind of memory caching for files, which are often requested and small enough to fit into the system memory. May be, that's what the OP is referring to ... I'm

Re: need some help in serving static files inside a wsgi apps

2008-05-25 Thread Martin v. Löwis
I guess, Apache does some kind of memory caching for files, which are often requested and small enough to fit into the system memory. May be, that's what the OP is referring to ... I'm not aware of that, and I even more seriously doubt it. Because caching is a complicated,

need some help in serving static files inside a wsgi apps

2008-05-24 Thread Tool69
Hi, Until now, I was running my own static site with Python, but I'm in need of dynamism. After reading some cgi tutorials, I saw Joe Gregorio's old article Why so many Python web frameworks? about wsgi apps [http:// bitworking.org/news/Why_so_many_Python_web_frameworks] and have a question

Re: need some help in serving static files inside a wsgi apps

2008-05-24 Thread Diez B. Roggisch
Tool69 schrieb: Hi, Until now, I was running my own static site with Python, but I'm in need of dynamism. After reading some cgi tutorials, I saw Joe Gregorio's old article Why so many Python web frameworks? about wsgi apps [http:// bitworking.org/news/Why_so_many_Python_web_frameworks] and

Re: need some help in serving static files inside a wsgi apps

2008-05-24 Thread kib
Diez B. Roggisch a écrit : Tool69 schrieb: Hi, Until now, I was running my own static site with Python, but I'm in need of dynamism. After reading some cgi tutorials, I saw Joe Gregorio's old article Why so many Python web frameworks? about wsgi apps [http://

Re: need some help in serving static files inside a wsgi apps

2008-05-24 Thread Diez B. Roggisch
kib schrieb: Diez B. Roggisch a écrit : Tool69 schrieb: Hi, Until now, I was running my own static site with Python, but I'm in need of dynamism. After reading some cgi tutorials, I saw Joe Gregorio's old article Why so many Python web frameworks? about wsgi apps [http://

Re: need some help in serving static files inside a wsgi apps

2008-05-24 Thread Sebastian 'lunar' Wiesner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [ Diez B. Roggisch [EMAIL PROTECTED] ] I finally managed to work with static files with a little hack, but it's ugly because I'm reading each static file per request. How else should that work? Apache does that the same way. I guess, Apache does

Anyone into Paimei?? Need some help.

2008-01-22 Thread over
Hi. I have been trying to get Paimei running on Windoze but find it very inconsistent. It works on certain apps really well, like Notepad, but fails on other apps, especially those written in languages like Delphi. There isn't a lot out there on Paimei and the author's site is very terse on the

Re: Need some help with 'with'

2007-11-29 Thread Aahz
In article [EMAIL PROTECTED], Mike Kent [EMAIL PROTECTED] wrote: I figure that if instead of returning the buffer from the context directly, I instead returned the buffer in a list, I could then change the buffer, put it in the returned list, then I'd have access to it back inside the context,

Need some help with 'with'

2007-11-27 Thread Mike Kent
I recently found myself needing to do this a lot: lock a record in a file read the record into a buffer alter the buffer write the buffer back to the record unlock the record I'd love to be able to create a context for this to use with the 'with' statement, something like: from __future__

Re: Need some help...

2007-11-02 Thread Boris Borcic
Ricardo Aráoz wrote: Boris Borcic wrote: Ricardo Aráoz wrote: Boris Borcic wrote: [EMAIL PROTECTED] wrote: I want to create a program that I type in a word. for example... chaos each letter equals a number A=1 B=20 and so on. So Chaos would be C=13 H=4

Re: Need some help...

2007-11-02 Thread Ricardo Aráoz
Gabriel Genellina wrote: En Thu, 01 Nov 2007 20:12:52 -0300, Ricardo Aráoz [EMAIL PROTECTED] escribió: def sumToOneDigit(num) : if num 10 : return num else : return sumToOneDigit(sum(int(i) for i in str(num))) def sumToOneDigit(num): return num % 9

Re: Need some help...

2007-11-01 Thread Boris Borcic
Ricardo Aráoz wrote: Boris Borcic wrote: [EMAIL PROTECTED] wrote: I want to create a program that I type in a word. for example... chaos each letter equals a number A=1 B=20 and so on. So Chaos would be C=13 H=4 A=1 O=7 S=5 I want to then have those numbers 13+4+1+7+5

Re: Need some help...

2007-11-01 Thread Ricardo Aráoz
Boris Borcic wrote: Ricardo Aráoz wrote: Boris Borcic wrote: [EMAIL PROTECTED] wrote: I want to create a program that I type in a word. for example... chaos each letter equals a number A=1 B=20 and so on. So Chaos would be C=13 H=4 A=1 O=7 S=5 I want to then have those

Re: Need some help...

2007-11-01 Thread Gabriel Genellina
En Thu, 01 Nov 2007 20:12:52 -0300, Ricardo Aráoz [EMAIL PROTECTED] escribió: def sumToOneDigit(num) : if num 10 : return num else : return sumToOneDigit(sum(int(i) for i in str(num))) def sumToOneDigit(num): return num % 9 or 9 Valid when num=1,

Re: Need some help...

2007-10-31 Thread Ricardo Aráoz
Boris Borcic wrote: [EMAIL PROTECTED] wrote: I want to create a program that I type in a word. for example... chaos each letter equals a number A=1 B=20 and so on. So Chaos would be C=13 H=4 A=1 O=7 S=5 I want to then have those numbers 13+4+1+7+5 added together to be 30.

Re: Need some help...

2007-10-30 Thread Boris Borcic
[EMAIL PROTECTED] wrote: I want to create a program that I type in a word. for example... chaos each letter equals a number A=1 B=20 and so on. So Chaos would be C=13 H=4 A=1 O=7 S=5 I want to then have those numbers 13+4+1+7+5 added together to be 30. How can I

Re: Need some help...

2007-10-29 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : I want to create a program that I type in a word. for example... chaos each letter equals a number A=1 B=20 and so on. So Chaos would be C=13 H=4 A=1 O=7 S=5 I want to then have those numbers 13+4+1+7+5 added together to be 30. How can

Need some help...

2007-10-28 Thread hyozan . ux3
I want to create a program that I type in a word. for example... chaos each letter equals a number A=1 B=20 and so on. So Chaos would be C=13 H=4 A=1 O=7 S=5 I want to then have those numbers 13+4+1+7+5 added together to be 30. How can I do that? Also, just curious, but, how could I

Re: Need some help...

2007-10-28 Thread bearophileHUGS
I want to create a program that I type in a word. You can see that Python has a command to input strings from the command line. chaos each letter equals a number A=1 B=20 and so on. So Chaos would be C=13 H=4 A=1 O=7 S=5 I want to then have those numbers 13+4+1+7+5 added together

Re: Need some help...

2007-10-28 Thread martyw
[EMAIL PROTECTED] wrote: I want to create a program that I type in a word. You can see that Python has a command to input strings from the command line. chaos each letter equals a number A=1 B=20 and so on. So Chaos would be C=13 H=4 A=1 O=7 S=5 I want to then have those

Re: Need some help...

2007-10-28 Thread Peter Decker
On 10/28/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I want to then have those numbers 13+4+1+7+5 added together to be 30. How can I do that? Also, just curious, but, how could I then have the 3 and 0 added together to be 3? Please help me out. Will you put our names on your homework

Re: Need some help with my first Twisted program

2007-10-20 Thread Bjoern Schliessmann
McCann, Brian wrote: I posted this to the Twisted list...figured I'd try here too. Didn't you get an answer? The cracks for special topics are usually there. to work right. Looking through the API docs I found connectionLost(), which I put in my protocol class (EchoProtocol in the

Need some help with my first Twisted program

2007-10-19 Thread McCann, Brian
I posted this to the Twisted list...figured I'd try here too. I'm looking for what is probably an simple solution I can't figure out on my own. I'm writing an SSH server based on the example on the web (using conch). I'm trying to figure out how to detect when the client exists (for example,

Re: I need some help with a regexp please

2006-09-26 Thread Frederic Rentsch
Dennis Lee Bieber wrote: On 25 Sep 2006 10:25:01 -0700, codefire [EMAIL PROTECTED] declaimed the following in comp.lang.python: Yes, I didn't make it clear in my original post - the purpose of the code was to learn something about regexps (I only started coding Python last week). In

Re: I need some help with a regexp please

2006-09-26 Thread Fredrik Lundh
Frederic Rentsch wrote: If I may add another thought along the same line: regular expressions seem to tend towards an art form, or an intellectual game. Many discussions revolving around regular expressions convey the impression that the challenge being pursued is finding a magic formula

Re: I need some help with a regexp please

2006-09-26 Thread codefire
for dense guys like myself, regular expressions work best if you use them as simple tokenizers, and they suck pretty badly if you're trying to use them as parsers. :) Well, I'm with you on that one Fredrik! :) -- http://mail.python.org/mailman/listinfo/python-list

Re: I need some help with a regexp please

2006-09-26 Thread codefire
I still don't touch regular expressions... They may be fast, but to me they are just as much line noise as PERL... I can usually code a partial parser faster than try to figure out an RE. Yes, it seems to me that REs are a bit hit and miss - the only way to tell if you've got a RE right is by

Re: I need some help with a regexp please

2006-09-25 Thread codefire
Yes, I didn't make it clear in my original post - the purpose of the code was to learn something about regexps (I only started coding Python last week). In terms of learning a little more the example was successful. However, creating a full email validator is way beyond me - the rules are far too

Re: I need some help with a regexp please

2006-09-22 Thread Ant
John Machin wrote: ... A little more is unfortunately not enough. The best advice you got was to use an existing e-mail address validator. We got bitten by this at the last place I worked - we were using a regex email validator (from Microsoft IIRC), and we kept having problems with specific

Re: Don't use regular expressions to validate email addresses (was: I need some help with a regexp please)

2006-09-22 Thread Ant
Ben Finney wrote: ... The best advice I've seen when people ask How do I validate whether an email address is valid? was Try sending mail to it. There are advantages to the regex method. It is faster than sending an email and getting a positive or negative return code. The delay may not be

Re: I need some help with a regexp please

2006-09-22 Thread John Machin
Ant wrote: John Machin wrote: ... A little more is unfortunately not enough. The best advice you got was to use an existing e-mail address validator. We got bitten by this at the last place I worked - we were using a regex email validator (from Microsoft IIRC), and we kept having

Re: I need some help with a regexp please

2006-09-22 Thread Ant
John Machin wrote: Ant wrote: John Machin wrote: ... A little more is unfortunately not enough. The best advice you got was to use an existing e-mail address validator. We got bitten by this at the last place I worked - we were using a regex email validator (from Microsoft IIRC)

I need some help with a regexp please

2006-09-22 Thread Sorin Schwimmer
Hi,My $0.02:re.compile('^\w+([\.-]?\w+)[EMAIL PROTECTED]([\.-]?\w+)*\.(\w{2}|(com|net|org|edu|intl|mil|gov|arpa|biz|aero|name|coop|info|pro|museum))$')I picked it up from the Net, and while it may be not perfect (you've got lots of reply's telling you why),it's good enough for me.Good luck,Sorin--

Re: Need some help here

2006-09-22 Thread ian
Frank Drackman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] : : Kareem840 [EMAIL PROTECTED] wrote in message : news:[EMAIL PROTECTED] : Hello. Unfortunately, I am in need of money to pay my credit card : bills. If you could spare just $1, I would be grateful. I have a Paypal :

I need some help with a regexp please

2006-09-21 Thread codefire
Hi, I am trying to get a regexp to validate email addresses but can't get it quite right. The problem is I can't quite find the regexp to deal with ignoring the case [EMAIL PROTECTED], which is not valid. Here's my attempt, neither of my regexps work quite how I want: [code] import os import re

Re: I need some help with a regexp please

2006-09-21 Thread [EMAIL PROTECTED]
codefire wrote: Hi, I am trying to get a regexp to validate email addresses but can't get it quite right. The problem is I can't quite find the regexp to deal with ignoring the case [EMAIL PROTECTED], which is not valid. Here's my attempt, neither of my regexps work quite how I want:

Re: I need some help with a regexp please

2006-09-21 Thread Neil Cerutti
On 2006-09-21, codefire [EMAIL PROTECTED] wrote: I am trying to get a regexp to validate email addresses but can't get it quite right. The problem is I can't quite find the regexp to deal with ignoring the case [EMAIL PROTECTED], which is not valid. Here's my attempt, neither of my regexps

Re: I need some help with a regexp please

2006-09-21 Thread Steve Holden
codefire wrote: Hi, I am trying to get a regexp to validate email addresses but can't get it quite right. The problem is I can't quite find the regexp to deal with ignoring the case [EMAIL PROTECTED], which is not valid. Here's my attempt, neither of my regexps work quite how I want:

Re: I need some help with a regexp please

2006-09-21 Thread codefire
Hi, thanks for the advice guys. Well took the kids swimming, watched some TV, read your hints and within a few minutes had this: r = re.compile(r'[EMAIL PROTECTED]@\s]+\.\w+') This works for me. That is if you have an invalid email such as tony..bATblah.com it will reject it (note the double

Re: I need some help with a regexp please

2006-09-21 Thread John Machin
codefire wrote: Hi, thanks for the advice guys. Well took the kids swimming, watched some TV, read your hints and within a few minutes had this: r = re.compile(r'[EMAIL PROTECTED]@\s]+\.\w+') This works for me. That is if you have an invalid email such as tony..bATblah.com it will

Don't use regular expressions to validate email addresses (was: I need some help with a regexp please)

2006-09-21 Thread Ben Finney
John Machin [EMAIL PROTECTED] writes: A little more is unfortunately not enough. The best advice you got was to use an existing e-mail address validator. The definition of a valid e-mail address is complicated. You may care to check out Mastering Regular Expressions by Jeffery Friedl. In the

Need some help here

2006-09-20 Thread Kareem840
Hello. Unfortunately, I am in need of money to pay my credit card bills. If you could spare just $1, I would be grateful. I have a Paypal account. [EMAIL PROTECTED] I swear this will go to my card balances. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need some help here

2006-09-20 Thread Colin B.
In comp.unix.solaris Kareem840 [EMAIL PROTECTED] wrote: Hello. Unfortunately, I am in need of money to pay my credit card bills. If you could spare just $1, I would be grateful. I have a Paypal account. [EMAIL PROTECTED] I swear this will go to my card balances. Thank you. Better idea. Sell

Re: Need some help here

2006-09-20 Thread Todd H.
Kareem840 [EMAIL PROTECTED] writes: Hello. Unfortunately, I am in need of money to pay my credit card bills. If you could spare just $1, I would be grateful. I have a Paypal account. [EMAIL PROTECTED] I swear this will go to my card balances. Thank you. If you have a story of unusual

Re: Need some help here

2006-09-20 Thread Dave
The money's on the way! Kareem840 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello. Unfortunately, I am in need of money to pay my credit card bills. If you could spare just $1, I would be grateful. I have a Paypal account. [EMAIL PROTECTED] I swear this will go to my card

Re: Need some help here

2006-09-20 Thread Frank Drackman
Kareem840 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello. Unfortunately, I am in need of money to pay my credit card bills. If you could spare just $1, I would be grateful. I have a Paypal account. [EMAIL PROTECTED] I swear this will go to my card balances. Thank you. Sell

Re: Need some help here

2006-09-20 Thread John McWilliams
Frank Drackman wrote: Kareem840 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello. Unfortunately, I am in need of money to pay my credit card bills. If you could spare just $1, I would be grateful. I have a Paypal account. [EMAIL PROTECTED] I swear this will go to my card

Re: Need some help here

2006-09-20 Thread di
Kareem840 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello. Unfortunately, I am in need of money to pay my credit card bills. If you could spare just $1, I would be grateful. I have a Paypal account. [EMAIL PROTECTED] I swear this will go to my card balances. Thank you.

Re: Need some help here

2006-09-20 Thread Wildemar Wildenburger
Kareem840 wrote: Hello. Unfortunately, I am in need of money to pay my credit card bills. If you could spare just $1, I would be grateful. I have a Paypal account. [EMAIL PROTECTED] I swear this will go to my card balances. Thank you. And I need to get a bus. I mean literally. It's the best.

Re: Need some help here

2006-09-20 Thread gre
di wrote: Kareem840 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello. Unfortunately, I am in need of money to pay my credit card bills. If you could spare just $1, I would be grateful. I have a Paypal account. [EMAIL PROTECTED] I swear this will go to my card balances. Thank

  1   2   >