Re: Parsing Email 'References' header.

2008-05-08 Thread David
On Thu, May 8, 2008 at 2:53 PM, Aspersieman <[EMAIL PROTECTED]> wrote: > Hi > > I have a python script that parses email headers to extract information > from them. I need to get the _last_ messageid in the 'References' field > (http://cr.yp.to/immhf/thread.html) to create a threaded view of these

Re: Parsing Email 'References' header.

2008-05-08 Thread David
> > "<.*>(<.*?>)" > Doesn't work if there is only one e-mail address: Here's another one: "<[^<]+>$" -- http://mail.python.org/mailman/listinfo/python-list

Re: "prove"

2008-05-08 Thread David
-in-funcs.html David. -- http://mail.python.org/mailman/listinfo/python-list

Re: Find more than one error at once

2008-05-10 Thread David
On Sat, May 10, 2008 at 8:38 AM, Joseph Turian <[EMAIL PROTECTED]> wrote: > Is it possible to coax python to find more than one error at once? > > Thanks, > Joseph > -- > http://mail.python.org/mailman/listinfo/python-list > Sounds like you want to catch and log exceptions. -- http://mail.python.

Pythonicity of some algorithms

2008-05-10 Thread David
hread-safe queue class, with an 'interrupt_get' method. When your app calls queue.interrupt_get(), all threads currently locking on a queue.get() will continue, but with a GetInterrupted exception thrown. Perhaps there is some other Python threading idiom I should be using in this case.

Re: win32service and Python

2008-08-14 Thread David
thon.windows group (I > know > Mark hangs out over there more than here ;-). Thank for the tip! I don't have any specific problem, I'm just writing a guide more extensive than those basic examples, so I need some details and clarifications. David. -- http://mail.python.org/mailman/listinfo/python-list

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-24 Thread David
What modules do I need to use pylab? I've installed scipy and numpy. http://matplotlib.sourceforge.net/ -- Have Fun, David A. Powered by Gentoo GNU/LINUX http://www.linuxcrazy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Make Games

2008-09-05 Thread David
http://books.google.com/books?id=DH3TcrHM8s4C -- Have Fun, David A. Powered by Gentoo GNU/LINUX http://www.linuxcrazy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: decent interactive python shell on MS Windows?

2008-10-01 Thread David
Il Wed, 1 Oct 2008 09:53:48 -0700 (PDT), [EMAIL PROTECTED] ha scritto: > Is there an interactive Python shell on Windows that supports: > > - easy copy-pasting to/from an editor? (as opposed to the cumbersome > "mark", "copy" and then "paste" sequence that any terminal on Windows > seems forced t

[wxPy] Why I can not change a ListItem property?

2009-12-24 Thread David
property. TIA David. -- http://mail.python.org/mailman/listinfo/python-list

Re: [wxPy] Why I can not change a ListItem property?

2009-12-27 Thread David
al cells within a row. > > You need an owner-draw control. See the ListCtrl_virtual.py example, for > instance. Thank you for explanation. I am looking at the UltimateListCtrl class by Andrea Gavana that allow finer control over the single cell attributes. David. -- http://mail.python.org/mailman/listinfo/python-list

The infamous "distutils has already been patched by" error

2009-12-29 Thread David
e to Python 2.5! This is the help> modules B) Patch the run() method of pydoc module at line 1862: for importer, modname, ispkg in pkgutil.walk_packages(onerror=lambda s:None): Hope this helps David. -- http://mail.python.org/mailman/listinfo/python-list

sftp login without password

2009-10-05 Thread David
29... sftp> I get a successful login. How can I get an sftp login without using a password in python? I am using Ubuntu 9.04, python 2.6.2 and paramiko 1.7.5 Thanks in advance. David. -- http://mail.python.org/mailman/listinfo/python-list

Re: sftp login without password

2009-10-08 Thread David
Il Tue, 06 Oct 2009 12:26:34 -0800, Joshua Kugler ha scritto: > David wrote: >> transport.connect(username = username, pkey = mykey) >> >> I get a "AuthenticationException: Authentication failed." exception. >> >> >> My ~/.ssh/id_rsa is c

Re: How to check the exists of a name?

2009-10-17 Thread David
Il Sat, 17 Oct 2009 23:30:02 -0700 (PDT), StarWing ha scritto: > Sometimes I want to make a simple flags. and i need to check there is > a name in current scope or not (that is, we can visit this name, no > matter where is it). and how to do that in python? Just use it in a try..except block. tr

Re: How to check the exists of a name?

2009-10-17 Thread David
Il Sat, 17 Oct 2009 23:43:36 -0700 (PDT), StarWing ha scritto: > I got a idea, use a try...except statement. there are another way to > do it ? > > (I just curious now, because I solve my problem in another way :-) locals().has_key(myname) globals().has_key(myname) D. -- http://mail.python.or

Re: Pause a script before termination

2009-11-11 Thread David
Il Wed, 11 Nov 2009 08:43:29 -0800 (PST), noydb ha scritto: > Hi All, > > I want to pause my script before it terminates, just so a user can > have a moment to read some print statements I include at the end. How > can this be accomplished? http://stackoverflow.com/questions/510357/python-read-

Re: Your impression of for-novice writings on assertions

2010-02-07 Thread David
ink. As it stands you are not to the point, and frankly, as a beginner I have enough stuff troubling my head so that I do not need superfluous information as to the evolution of the things you are talking about. Just the facts, please. My 2 cents, David On 03/02/10 04:54, Alf P. Steinbach wr

Get __doc__ from main module in imported module.

2010-02-10 Thread David
I have a module toolkit.py with some functions I use often. One of these functions displays a usage message (__doc__). def usage(messages=[], exit=-1): """Print the doc string as wells as any useful messages.""" print(__doc__) for message in messages: print("\033[91m{}\033[0m"

Re: Get __doc__ from main module in imported module.

2010-02-10 Thread David
> > How can I access the top level module's doc string from toolkit? > > Like > >      import __main__ >      print_usage( __main__ ) > > with suitable definition of 'usage'. > > Cheers & hth., > > - Alf Problem solved! Thanks for the other tips too. -- http://mail.python.org/mailman/listinfo/pyt

Convert arbitrary function inputs to string

2011-01-06 Thread David
Hi, I'd like to have a function that takes arbitrary inputs and returns them as a single string, with proper escapes for special characters I can define. For example: fun( ( + 1 2 ) ) => "( + 1 2)" or fun( (define (myhello str) (begin (print (string-append "Hello " str)) (newline) )) ) => "(

Re: Unit testing multiprocessing code on Windows

2011-02-18 Thread David
Il Thu, 17 Feb 2011 18:31:59 -0500, Matt Chaput ha scritto: > > The problem is that with both "python setup.py tests" and "nosetests", > Maybe multiprocessing is starting new Windows processes by copying the > command line of the current process? But if the command line is > "nosetests", it's

High Performance solutions are needed to do things like urlretrieve

2010-07-14 Thread David
it fails, never any problem with smaller folders. Any solution for this? Regards. David -- http://mail.python.org/mailman/listinfo/python-list

HCL Jobs database

2010-07-31 Thread David
If you are looking for Jobs at HCL America Inc. ("HCL Jobs") check out http://2ajobguide.com/hcl_jobs.aspx You´ll get free access to a comprehensive database of HCL jobs and you can apply directly online without intermediates. -- http://mail.python.org/mailman/listinfo/python-list

urllib2.urlopen issue

2009-06-24 Thread David
hello, I have a url that is "http://query.directrdr.com/ptrack? pid=225&v_url=http:// www.plentyoffish.com&keyword=flowers&feed=1&ip=12.2.2.2&said=$said". If I open it on a browser, I can get its contents without any problem. However, if I use following code, import urllib2 url = 'http://query

Re: urllib2.urlopen issue

2009-06-24 Thread David
On Jun 24, 11:27 am, Chris Rebert wrote: > On Wed, Jun 24, 2009 at 10:50 AM, David wrote: > > hello, > > > I have a url that is "http://query.directrdr.com/ptrack? > > pid=225&v_url=http:// > >www.plentyoffish.com&keyword=flowers&feed=1&ip=12.

Re: Why is my code faster with append() in a loop than with a large list?

2009-07-05 Thread David
Xavier Ho wrote: (Here's a short version of the long version below if you don't want to read:) Why is version B of the code faster than version A? (Only three lines different) Version A: http://pastebin.com/f14561243 Version B: http://pastebin.com/f1f657afc I don't know but here is the diff

regex help

2009-07-08 Thread David
want to extract the open, mkt cap and P/E values - but apart from doing loads of indivdual REs which I think would look messy, I can't think of a better and neater looking way. Any ideas? Cheers David -- http://mail.python.org/mailman/listinfo/python-list

Re: Webcam + GStreamer

2009-07-12 Thread David
Sparky wrote: On Jul 12, 3:50 pm, Sparky wrote: Hello! I need to stream from a webcam in Linux and I need to be able to analyze the video feed frame by frame with PIL. Currently my web- cam (Quickcam Chat) only seems to work with GStreamer so a solution using pygst would be preferred. Thanks f

Re: Webcam + GStreamer

2009-07-12 Thread David
Sparky wrote: On Jul 12, 4:30 pm, David wrote: Sparky wrote: On Jul 12, 3:50 pm, Sparky wrote: Hello! I need to stream from a webcam in Linux and I need to be able to analyze the video feed frame by frame with PIL. Currently my web- cam (Quickcam Chat) only seems to work with GStreamer so a

Gracefully exiting CLI application

2009-07-27 Thread David
Greetings, I am writing a command line application, and I need to perform some cleaning on exit even if the process is killed. How can I do that with python? Thank you. David. -- http://mail.python.org/mailman/listinfo/python-list

Re: Gracefully exiting CLI application

2009-07-28 Thread David
eCtrlHandler that installs a event handler which traps all windows events, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, and CTRL_SHUTDOWN_EVENT included. David. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython question

2009-08-10 Thread David
od of the container sizer. http://docs.wxwidgets.org/stable/wx_wxsizer.html#wxsizershow David -- http://mail.python.org/mailman/listinfo/python-list

How to launch a function at regular time intervals ?

2009-08-12 Thread David
Hi all, I'm trying to launch a function at regular time intervals but cannot find the way to do it. Here is the code I wrote (time_interval is a user defined variable in seconds): while(1) timestamp=datetime.now() timestamp_seconds=timestamp.hour*3600+timestamp.minute*60+timestamp.second if

Re: How to launch a function at regular time intervals ?

2009-08-13 Thread David
Thanks all for your answers. As suggested by Dave and Frank, I am indeed looking for the main program to continue running in the background (I have several functions I want to launch, each at a predefined time interval). I like Frank's solution, on the paper it seems it would do what I am looking f

Re: How to launch a function at regular time intervals ?

2009-08-13 Thread David
On 13 août, 21:28, Dave Angel wrote: > David wrote: > > Thanks all for your answers. As suggested by Dave and Frank, I am > > indeed looking for the main program to continue running in the > > background (I have several functions I want to launch, each at a > > predef

Re: How to launch a function at regular time intervals ?

2009-08-14 Thread David
ll running threads at end func_store_data.stop() func_store_data.join() func_transfer_data.stop() func_transfer_data.join() Again thanks a lot to all of you for your precious help. David -- http://mail.python.org/mailman/listinfo/python-list

Re: How to launch a function at regular time intervals ?

2009-08-14 Thread David
ll running threads at end func_store_data.stop() func_store_data.join() func_transfer_data.stop() func_transfer_data.join() Again thanks a lot to all of you for your precious help. David -- http://mail.python.org/mailman/listinfo/python-list

Re: How to launch a function at regular time intervals ?

2009-08-14 Thread David
ll running threads at end func_store_data.stop() func_store_data.join() func_transfer_data.stop() func_transfer_data.join() Again thanks a lot to all of you for your precious help. David -- http://mail.python.org/mailman/listinfo/python-list

Re: Using a Callback Function - ftplib

2009-08-17 Thread David
rt ftplib > > ftp = ftplib.FTP(server) > ftp.login(user, pass) > ftp.cwd(conf['testdir']) Why bother with retrlines? Use the provided higer level fuctions: remotefiles = [] ftp.dir(remotefiles.append) or, if you prefer nlst remotefiles = ftp.nlst() regards david -- http://mail.python.org/mailman/listinfo/python-list

Scope and classes

2009-08-18 Thread David
Hi all, I'm trying to understand how scopes work within a class definition. I'll quickly illustrate with an example. Say I had the following class definition: class Abc: message = 'Hello World' def print_message(self): print message >>> instance = Abc() >>> instance.print_messag

Re: Scope and classes

2009-08-18 Thread David
On Aug 19, 12:16 am, Chris Rebert wrote: > On Tue, Aug 18, 2009 at 3:47 PM, David wrote: > > Hi all, > > > I'm trying to understand how scopes work within a class definition. > > I'll quickly illustrate with an example. Say I had the following class > > def

Re: Scope and classes

2009-08-18 Thread David
On Aug 19, 1:17 am, "Jan Kaliszewski" wrote: > 19-08-2009 o 02:10:58 Jan Kaliszewski wrote: > > > The only ways to reach Abc's attribute 'message' from that method are: > > * 'Abc.message' > > * 'self.__class__.message' > > * 'self.message' (unless there is an instance attribute 'message' which >

Annoying octal notation

2009-08-20 Thread David
Hi all, Is there some magic to make the 2.x CPython interpreter to ignore the annoying octal notation? I'd really like 012 to be "12" and not "10". If I want an octal I'll use oct()! "Explicit is better than implicit..." TIA David -- http://mail.python.org/mailman/listinfo/python-list

Re: Annoying octal notation

2009-08-21 Thread David
Il Thu, 20 Aug 2009 22:24:24 +0200, Johannes Bauer ha scritto: > David schrieb: > >> If I want an octal I'll use oct()! >> >> "Explicit is better than implicit..." > > A leading "0" *is* explicit. It isn't explicit enough, at l

Re: Annoying octal notation

2009-08-21 Thread David
t; string without using int()? Passing it to functions that allow > string representations of numbers?) Obviously it's not a progamming issue, just a hassle using the interpreter on command line. David -- http://mail.python.org/mailman/listinfo/python-list

Re: Annoying octal notation

2009-08-22 Thread David
Il Fri, 21 Aug 2009 16:52:29 -0700 (PDT), James Harris ha scritto: > > 0xff & 0x0e | 0b1101 > 16rff & 16r0e | 2r1101 > > Hmm. Maybe a symbol would be better than a letter. What about 2_1011, 8_7621, 16_c26h or 2;1011, 8;7621, 16;c26h ? David -- http://mail.pyth

Re: Annoying octal notation

2009-08-22 Thread David
nd promoted to errors. 4) I still don't like the '0o..' notation because 0 (zero) and o (lowercase O) glyphs appear very similar in many character sets. I'd prefer something like '0c..' so it resembles the word 'oc' for 'octal'. David -- http://mail.python.org/mailman/listinfo/python-list

Re: Annoying octal notation

2009-08-22 Thread David
Il Thu, 20 Aug 2009 16:59:14 -0700 (PDT), James Harris ha scritto: > > It maybe made sense once but this relic of the past should have been > consigned to the waste bin of history long ago. I perfectly agree with you! David. -- http://mail.python.org/mailman/listinfo/python-list

Re: conditional for-statement

2009-08-23 Thread David
Il Sun, 23 Aug 2009 01:09:04 -0700 (PDT), seb ha scritto: > Hi, > > i was wondering if there is a syntax alike: > > for i in range(10) if i > 5: > print i You can write for i in filter(lambda i: i > 5, range(10)): print i but for i in range(10): if i > 5: print i it' be

Re: your favorite debugging tool?

2009-08-23 Thread David
ever as more advanced (and expensive, winpdb is free) debuggers but there is all yuo need for deep-source debugging. It is especially suited for multi threaded programs and GUI debugging, where command line debugging is a pain. It supports remote debugging over encrypted connection also. regards Da

mod_python: Permission denied

2009-08-25 Thread David
Hello, I googled online however I did not find a clue my question. So I post it here. I created a mod_python CGI to upload a file and saves it in folder "/ var/www/keyword-query/files/". My code runs in root. fileitem = req.form['file'] # Test if the file was uploaded if fileitem.fi

Re: mod_python: Permission denied

2009-08-25 Thread David
A little more info: "Defrosting.rtf" is a file that I wanted to upload. This file was supposed to upload to folder '/var/www/keyword- query/files/'. My code runs in root. -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python: Permission denied

2009-08-25 Thread David
disclaimer: i did not write this code. i copied it and inserted into my cgi code. it is from http://webpython.codepoint.net/mod_python_publisher_big_file_upload. -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python: Permission denied

2009-08-25 Thread David
On Aug 25, 4:00 pm, David wrote: > Thanks Graham. Let me contact Admin. Hi Graham: you are right. it's fixed now. Thanks again. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does this group have so much spam?

2009-08-30 Thread David
is spam) and the reduced risk of virus infections. David -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python: Permission denied

2009-08-30 Thread David
Thanks Graham. Let me contact Admin. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does this group have so much spam?

2009-09-01 Thread David
Il Sun, 30 Aug 2009 19:13:38 +0100, Nobody ha scritto: > Apart from the impossibility of implementing such a tax, it isn't going to > discourage spammers when the tax will be paid by the owner of the > compromised PC from which they're sending their spam. I don't agree. Each computer connected to

Re: Why does this group have so much spam?

2009-09-01 Thread David
he solution. You are saying that if your neighbour makes loud >> noises you can not call police to impose him to cease but you can only make >> your home soundproof. > > or you could go over and punch him in the nose, works every time for > me ;-) In italy we say: "preventing is better than treating" (a disease). Regards David -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does this group have so much spam?

2009-09-01 Thread David
Il Mon, 31 Aug 2009 21:04:27 +0200, David ha scritto: > Obviously the owner can not be charged I mean: can not be jailed for crimes made by the thief using his car. D. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does this group have so much spam?

2009-09-01 Thread David
Il Tue, 1 Sep 2009 11:50:14 +0200, Andre Engels ha scritto: > What about mailing lists? There exist well-functioning mailing lists > with thousands of subscribers. Being a posting member of those will > significantly increase your internet bill under your proposal. It's an implementation issue,

Re: Why does this group have so much spam?

2009-09-01 Thread David
hout* using armies of cybercops patrolling all over the net. If we let the situation get worse, goverments will respond in the only way they know: by restricting freedom. At the opposite, if they realize that the problem is under control and even they get a little revenue, they'll be happy to let us live in peace. (I hope my english is correct enough to expose this concept...) regards David -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does this group have so much spam?

2009-09-02 Thread David
Il Wed, 02 Sep 2009 10:22:50 +0100, MRAB ha scritto: > The preferred option these days is to slow down net access of the > offenders, not cut them off completely. I'm not sure how many ISPs > actually do that yet. If they do, it doesn't look like it's working that much. D. -- http://mail.python

Re: Why does this group have so much spam?

2009-09-02 Thread David
wner takes no countermisures and doesn't pay the tax: well, It's up to you to choose the action to take towards him. [...] > Yes, I'd like to see the criminals, the malware authors and the spammers > punished, but I'd be satisfied to see them put out of business. Th

Re: How to define a function with an empty body?

2009-09-13 Thread David
Il Sat, 12 Sep 2009 22:37:01 -0500, Peng Yu ha scritto: > Hi, > > I want to define a function without anything in it body. [...] I usually define void functions as: def myfunction(): raise NotImplementedError("You forgot to implement me!") so I keep safe from leaving orphaned functio

Re: Help needed with Windows Service in Python

2010-09-02 Thread David
tus(win32service.SERVICE_STOP_PENDING, 1000) David -- http://mail.python.org/mailman/listinfo/python-list

Re: High CPU utilization with Pylab

2010-09-05 Thread David
Il Sun, 5 Sep 2010 03:05:54 -0700 (PDT), Madhur ha scritto: > Is there something which does not makes sense .? 1. How, a computer, is supposed to handle your infinite loop? 2. Running ghraphs shuold be handled in totally different way: look at the "stripcharting" demo in this zip http://agni.phy

Python becoming orphaned over ssh

2010-09-29 Thread David
Hi there, I have a strange situation. If I do this: 1. Make a script /tmp/test.py on a remote server, with this contents: #!/usr/bin/python from subprocess import check_call check_call(['ping', 'www.google.com']) 2. Call the script like this over SSH: ssh r...@testbox /tmp/test.py 3. Interrup

Re: Python becoming orphaned over ssh

2010-09-30 Thread David
r without problems). Quite peculiar... Anyway, I hope that one of the Python developers will fix this sometime. David. -- http://mail.python.org/mailman/listinfo/python-list

Fwd: Python becoming orphaned over ssh

2010-10-01 Thread David
ere. Pretty interesting, but I'm a noob with this stuff. If I want to learn more, would this WP article (and linked pages) be a good place to learn more? http://en.wikipedia.org/wiki/Signal_%28computing%29 Thanks, David. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why "flat is better than nested"?

2010-10-27 Thread David
On 27 October 2010 20:58, Robin Becker wrote: > On 27/10/2010 10:13, Stefan Behnel wrote: >> Robin Becker, 25.10.2010 15:56: >>> >>> "I know that that that that that boy said is wrong!". >> >> What's a "that boy"? >> > well they say nested is hard. How about this break down [...] How about this b

Re: another newbie question

2010-11-14 Thread David
On 15/11/2010, otenki wrote: > When I enter 'from _future_ import division' at the command > line, I get the ImportError, no module named _future_. The module name is "__future__" Notice that there are 2 underscore characters before the word "future" and 2 after it. This is a common convention i

Re: Cannot get any Python commands to work

2017-06-12 Thread David
lling new > third-party packages. You may need to add '-3.6' or '-36' if you have > multiple versions installed. > > On 12 June 2017 at 15:47, David Marquand wrote: > > > I am trying to learn Django and cannot get easy_install to work. Python > > worki

Re: Issues compiling hunspell from source on windows

2013-06-30 Thread David Robinow
It appears you are using a 32 bit compiler with a 64-bit python. Install a 32 bit python. On Sun, Jun 30, 2013 at 11:54 AM, Akshay Kayastha wrote: > Hi I am trying to compile a python module called hunspell from the following > [source](https://pypi.python.org/pypi/hunspell). > > But I get the f

Re: Homework help requested (not what you think!)

2013-07-16 Thread David Hutto
e even up to the task of a simple algorithm like Bubble Sort -- at > least, not yet. > > Many thanks! > -- > http://mail.python.org/mailman/listinfo/python-list > -- Best Regards, David Hutto *CEO:* *http://www.hitwebdevelopment.com* -- http://mail.python.org/mailman/listinfo/python-list

Re: Understanding other people's code

2013-07-16 Thread David Hutto
Any program, to me, is just like speaking english. The class, or function name might not fully mesh with what your cognitive structure assumes it to be.read through the imports first, and see the classes and functions come alive with experience comes intuition of what it does, and the instances tha

Re: tkinter redraw rates

2013-07-16 Thread David Hutto
; > > The other performance issue I've found is that when the logic is running, > the app doesn't redraw. Ordinarily this would be acceptable, but as part of > my program, it loads data from a website, and during the load, the window > completely freezes up and doesn't r

Re: tkinter redraw rates

2013-07-16 Thread David Hutto
On Tue, Jul 16, 2013 at 9:32 PM, David Hutto wrote: > I've had a similar problem with a tkinter/3D app. right now I'm looking > toward Blender, and the Python API, but there is also wxpython, and the > usual python's library gtk. > > There is also matplotl

Re: Understanding other people's code

2013-07-19 Thread David Hutto
I forgot to mention idle. It can step through another's code and show you a step-by-step insructional, of what the code does. On Tue, Jul 16, 2013 at 8:05 PM, David Hutto wrote: > Any program, to me, is just like speaking english. The class, or function > name might not full

Re: Share Code Tips

2013-07-19 Thread David Hutto
a > fundamentally impossible goal. Your last sentence hints as to why; > there is no simple way to compare strings containing those characters, > because the correct treatment varies according to context. > > Your two best options are: Be case sensitive (and then you need only > worry about composition and combining characters and all those > nightmares - the ones you have to worry about either way), or use > casefold(). Of those, I prefer the first, because it's safer; the > second is also a good option. > > ChrisA > -- > http://mail.python.org/mailman/listinfo/python-list > -- Best Regards, David Hutto *CEO:* *http://www.hitwebdevelopment.com* -- http://mail.python.org/mailman/listinfo/python-list

Re: Share Code Tips

2013-07-19 Thread David Hutto
, '♞', DATA, flags=re.I); PTRNPRS = >> re.sub('', '♟', DATA, flags=re.I) >> >> For those of you making scripts to be run in a terminal, try this for a >> fancy terminal prompt: >> >> INPUTTEMP = input('User ≻≻≻') >> >> >> I may share more code later. Tell me what you think of my coding style >> and tips. >> >> >> Mahalo, >> >> Devyn Collier Johnson >> devyncjohn...@gmail.com >> -- >> http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> >> > > I'm guessing you may be posting with html. So all your code runs together. > > -- > Joel Goldstick > http://joelgoldstick.com > > -- > http://mail.python.org/mailman/listinfo/python-list > > -- Best Regards, David Hutto *CEO:* *http://www.hitwebdevelopment.com* -- http://mail.python.org/mailman/listinfo/python-list

Re: Share Code Tips

2013-07-19 Thread David Hutto
And also don't forget special char, or that it can bbe var char, or char in the DB lookup in boolean with the username. On Fri, Jul 19, 2013 at 11:43 PM, David Hutto wrote: > Just use an explanatory user tip that states it should be case sensitive, > just like with most sites, or app

Re: Share Code Tips

2013-07-19 Thread David Hutto
It seems, without utilizing this, or googling, that a case sensitive library is either developed, or could be implemented by utilizing case sensitive translation through a google translation page using an urlopener, and placing in the data to be processed back to the boolean value. Never attempted,

Re: Share Code Tips

2013-07-19 Thread David Hutto
It seems that you could use import re, in my mind's pseudo code, to compile a translational usage of usernames/passwords that could remain case sensitive by using just the translational dictionaries, and refining with data input tests/unit tests. On Sat, Jul 20, 2013 at 12:15 AM, David

Re: Share Code Tips

2013-07-19 Thread David Hutto
22 AM, David Hutto wrote: > It seems that you could use import re, in my mind's pseudo code, to > compile a translational usage of usernames/passwords that could remain case > sensitive by using just the translational dictionaries, and refining with > data input tests/unit tests

Re: Share Code Tips

2013-07-19 Thread David Hutto
32 if you count black, and white. On Sat, Jul 20, 2013 at 12:26 AM, David Hutto wrote: > I didn't see that this was for a chess game. That seems more point and > click. Everyone can recognize a bishop from a queen, or a rook from a pawn. > So why would case sensitivity matter oth

Re: Play Ogg Files

2013-07-19 Thread David Hutto
you could use , and I think its david@david:~$ python Python 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import subprocess >>> subprocess.call(

Re: Play Ogg Files

2013-07-19 Thread David Hutto
This is using 3.2, which shouldn't be far off, the latest I could get on ubuntu. david@david:~$ python3.2 Python 3.2.3 (default, Apr 10 2013, 05:29:11) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >&

Re: Play Ogg Files

2013-07-19 Thread David Hutto
Just get a good dictionary, and distutils I believe, someone a little bit more experienced in these should be along soon, or use the manual, and docs. On Sat, Jul 20, 2013 at 12:52 AM, David Hutto wrote: > This is using 3.2, which shouldn't be far off, the latest I could get on

Re: Play Ogg Files

2013-07-20 Thread David Hutto
It was supposed to show you that you can use a command line function from windows or linux that will play an ogg/.wav file/ etc with an if windows: do this or if linux do this. espeak was just a suggestion, unless you want your own voice played for the chatbot, or a selection of a male or female v

Re: Play Ogg Files

2013-07-20 Thread David Hutto
With linux you can have your package listed in synaptic, and can use with a sudo apt-get install whatever ogg player like ogg123, and windows I don't work with that much, but I'm pretty sure I've played .wav files from the command line before while working with cross platform just for practice, so

Re: Play Ogg Files

2013-07-20 Thread David Hutto
Yeah, its like yum used in others(or the point and click gui package installers). The main point kind of is in cross platform it would seem that you would just use what's available with try/except, or if statements, and the question is what os's is he going for. Then a simple usage of what's avail

Re: Play Ogg Files

2013-07-20 Thread David Hutto
Mainly I just use my apps for my own purposes. So it's usually on the debian/ubuntu distro I have, although I do have Windows XP SP3 in virtual box. I have been meaning to install some other linux distros in virtual box that are the main ones, percentage of utilization based, that are used, and pr

Re: Play Ogg Files

2013-07-20 Thread David Hutto
can import from haven't had time to update them, as well as update for os's that might have changed, and everyone has a newer version. On Sun, Jul 21, 2013 at 2:42 AM, David Hutto wrote: > Mainly I just use my apps for my own purposes. So it's usually on the > debian/ubuntu di

Re: Play Ogg Files

2013-07-22 Thread David Hutto
t?q=1.**2alpha1<https://code.google.com/p/pyglet/downloads/list?q=1.2alpha1> > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> > -- Best Regards, David Hutto *CEO:* *http://www.hitwebdevelopment.com* -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner - GUI devlopment in Tkinter - Any IDE with drag and drop feature like Visual Studio?

2013-07-22 Thread David Hutto
There is the matter of how much time you want to put into this. There is the standard gtk library for python, and in the future, as soon as I'm well enough to focus, having recent problems, I'll be using the blender game engine to enhance my software to a 3d graphical form...to make my apps pop. S

Re: Beginner. 2d rotation gives unexpected results.

2013-07-23 Thread David Hutto
otate() > d.rotate() > > screen.fill(black) > > a.draw() #draw point > b.draw() > c.draw() > d.draw() > pygame.display.flip() > clock.tick(30) > > pygame.quit()[/code] > > P.S. Sorry for my english, bit rusty in that department. > -- > http://mail.python.org/mailman/listinfo/python-list > -- Best Regards, David Hutto *CEO:* *http://www.hitwebdevelopment.com* -- http://mail.python.org/mailman/listinfo/python-list

Re: RE Module Performance

2013-07-24 Thread David Hutto
m any level of experience at all? > > ChrisA > -- > http://mail.python.org/mailman/listinfo/python-list > -- Best Regards, David Hutto *CEO:* *http://www.hitwebdevelopment.com* -- http://mail.python.org/mailman/listinfo/python-list

Re: RE Module Performance

2013-07-24 Thread David Hutto
learned a preferable gui kit. On Wed, Jul 24, 2013 at 10:17 AM, David Hutto wrote: > I've screwed up plenty of times in python, but can write code like a pro > when I'm feeling better(on SSI and medicaid). An editor can be built > simply, but it's preference that makes th

Re: embedded python and threading

2013-07-26 Thread David Robinow
Works for me. Except that if I then do: touch time.py I get the same error as you do. Can you figure out the problem now? On Fri, Jul 26, 2013 at 11:57 AM, David M. Cotter wrote: > okay, i have simplified it: here is the code > > == >

<    1   2   3   4   5   6   7   8   9   10   >