On Wed, 02 Feb 2005 11:30:34 -0800 (PST), Nemesis
<[EMAIL PROTECTED]> wrote:
> Hi all, I'm trying to write a multiplatform function that tries to
> return the actual user home directory. I saw that
> os.path.expanduser("~") works on Linux but on Windows2000 (at least on
> the win I used) it returns
I was working on some things that use Glenn Strong's excellent libnjb
wrapper on my Linux box. I have since bought a PowerBook and have been
trying to get everything working correctly under OS/X.
This morning I got Python-libnjb to build without errors using the
following command:
ld -dynamic -dy
I think I'm mis-understanding something about how PYTHONPATH works (at
least on OSX I didn't have this trouble on Linux).
I have a directory where I store libraries that I'm playing around
with. However, for some reason python can't find the library. Since
I'm using PyQt, I use pythonw, but the re
On Sun, 06 Mar 2005 13:41:57 GMT, Gregor <[EMAIL PROTECTED]> wrote:
> There's a DOS console application I am trying to script (in Python), but it
> doesn't seem to use stdout or stderr... For example, if I redirect output
> to a file ("cmd > file.txt"), the output still appears on screen.
> Similar
On Tue, 14 Dec 2004 23:16:43 -0700, Michael McGarry
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am horrible with Regular Expressions, can anyone recommend a book on it?
>
> Also I am trying to parse the following string to extract the number
> after load average.
>
> " load average: 0.04, 0.02, 0
On 4/14/05, mark hellewell <[EMAIL PROTECTED]> wrote:
> On 4/14/05, BJörn Lindqvist <[EMAIL PROTECTED]> wrote:
> > Please do not reply to spam. Replying to spam makes it much harder for
> > spam filters to catch all the spam or will produce very many false
> > positives. Atleast that's how gmail's
On 10/13/06, eldorado <[EMAIL PROTECTED]> wrote:
> I have looked around and cannot seem to find a way to strip leading zeros
> off of values in a dictionary. Basically, I am looking to do a for loop
> and any value that has one or more leading zeros would be stripped. Any
> pointers would be apprec
On 5/31/06, Manoj Kumar P <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Can anyone tell me a good python editor/IDE?
> It would be great if you can provide the download link also.
>
> Thank You,
> -Manoj-
>
>
> "SASKEN RATED Among THE Top 3 BEST COMPANIES TO WORK FOR IN INDIA - SURVEY
> 2005 conducted by
On 6/4/06, hacker1017 <[EMAIL PROTECTED]> wrote:
> im just asking out of curiosity.
My current gig is perl only, but I still use python for personal stuff
1) +Twisted for a couple of IRC Bots
2) an interface between TextMate and py.test
3) a soccer management game (wxPython + PyGame)
--
Stand
Hello everyone,
I recently had a need to do some work with fuzzy matches, so I ported
Lawrence Philips DMetaph class from C++ to Python.
This is currently pretty much a line for line port of his his C++
code. It is not very pythonic at all.
Because it is SO ugly, I'm not yet making it available
On 25 Sep 2006 07:35:45 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Metaperl,
>
> Steve makes a good point. Fredrik is one of the most important
> contributors of Python code, tools, etc and as far as I am concerned,
> that is so important that it gives him the right to be cranky from tie
On 11/29/06, Lou Pecora <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> "Scott_Davies" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I have an old Mac with OS X Panther installed. I also have the Python
> > language download file, but I haven't got a text/script editor to use
> > fo
I'm playing around with py.test and writing a parser for it's output
for use in TextMate.
I've run into what appears to be a strange phenomenon, but which is
likely me doing something wrong.
I'm writing a test to test some HTML output and the test fails for
several reasons, all of which I underst
On 5/15/06, Cameron Laird <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote:
> .
> .
> .
> >That's exactly my point. Assuming your test coverage is good, such an
> >
ath, (atime, mtime))
utime(path, None)
Set the access and modified time of the file to the given values. If the
second form is used, set the access and modified times to the current time.
>>> os.utime('test', None)
>>> ^D
([EMAIL PROTECTED]) ls
gt;
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
I would start here http://docs.python.org/library/random.html you are
likely interested in choice or sample.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
, right or wrong,' is a thing that no patriot would think of
> saying. It is like saying, 'My mother, drunk or sober.'"
>
> -- G.K. Chesterton
> --
> http://mail.python.org/mailman/listinfo/python-list
>
a ',' on the end of your print should suppress the newline.
>>> def x():
...print 'foo',
...print 'bar'
...
>>> x()
foo bar
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
tarted using py.test. I
even wrote a plugin for TextMate to interface with py.test. If I had
known about Nose I would likely have used it instead because it is
built on top of the standard module. Now I have many thousands of
lines of py.test code so am not likely to make the change.
--
Stand Fa
On Wed, Nov 12, 2008 at 5:16 PM, Roy Smith <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> "Timothy Grant" <[EMAIL PROTECTED]> wrote:
>
>> I wanted to like unittest but couldn't. So I started using py.test. I
>> even wrote a p
On Sun, Jun 8, 2008 at 2:17 PM, kj <[EMAIL PROTECTED]> wrote:
>
>
> I'm a Perlhead trying to learn the Way of Python. I like Python
> overall, but every once in a while I find myself trying to figure
> out why Python does some things the way it does. At the moment
> I'm scratching my head over P
On Mon, Jun 9, 2008 at 6:01 PM, <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> New user to python. I can write to a file, however, I would like to
> do both...whatever I do on the screen, I'd like to write it to a file.
>
> any pointers on where I can find this info.
>
> thanks,
>
This code has on
On Sat, Jun 14, 2008 at 11:54 AM, John Salerno <[EMAIL PROTECTED]>
wrote:
> John Salerno wrote:
>
> -
>> #!/usr/bin/env python
>>
>> from socket import *
>> from time import ctime
>>
>> HOST = '192.168.1.100'
>>
>
>
> -
>> #!/usr/bin/env python
>>
>> from socket import *
>>
>> HOST = '19
ional feature
> (keeping quoted names as a single entry) rather than going to a full-blown
> command-line argument parsing tool? Even regular expressions seem like
> they'd
> probably be overkill here? Or no?
>
> Thanks,
> ---Joel
I've found that anytime I have m
.html
> Sent from the Python - python-list mailing list archive at Nabble.com.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
I'm glad to see you found the old post and implemented the code suggested
there.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
stinfo/python-list
>
Thank you for introducing me to a fabulous new word. Had to look it up, but
I like it.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
>
> The scripts I load are: qbuf, TagList, indent/python.vim and a reduced
> version of the standard python.vim
>
> Could someone provide some pointers?
>
> Thanks,
>
> Pablo Torres N.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Are you editing someone e
>
> -- Ratfink
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
I'd start with file sizes.
If that's not enough you might look at the md5 library and check the md5
values for the files.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
ally been 8 spaces. Most terminals, printers and
other devices understand the tab as 8 characters.
Smart editors have made it easy to make tabs APPEAR as four spaces, but they
are almost universally interpreted elsewhere as 8 characters.
http://en.wikipedia.org/wiki/Tab_key
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
Wise popper where I work only allows access to the first 100
messages. To access the next 100 you have to retrieve the first 100.
My guess is that gmail is doing something similar.
If you retrieve the first 400, do you get a new list the next time?
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
he two separate installations. OSX relies on the version of
python they ship. While there are likely cases where it could be
replaced completely safely the risks of having to re-install your OS
at some point because it has the wrong version of python are not worth
it.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
d and
went from there.
I honestly don't think it is a cause for concern though. The situation
is very similar to on Linux (Red Hat has their version of python) you
simply install what you want and use it.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
of_unit_testing_frameworks#Python
>
> /Jorgen
>
> --
> // Jorgen Grahn \X/ snipabacken.se> R'lyeh wgah'nagl fhtagn!
> --
> http://mail.python.org/mailman/listinfo/python-list
>
py.test supports setup/teardown_module, setup/teardown_class and
setup_teardown_method.
I've never needed to use the first, the second comes in very handy
especially when writing acceptance tests.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
ges. It doesn't sound like the
> APIs are going to be too tough to grasp. And yes, I've about 10 years
> work in Windows using an event-driven model (LabWindows).
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Make sure to subscribe to the wxPython list the people there have
helped me immensely in the past.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
them python-files.
>
> how would I import them?
> --
> http://mail.python.org/mailman/listinfo/python-list
>
set your PYTHONPATH environment to include the directory where your module is.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
tion.
>>> import re
>>> s = '/Users/sriram/folder1/folder2/folder3/folder4/folder5/file'
>>> y = re.search('folder3.*', s)
>>> y.group()
'folder3/folder4/folder5/file'
>>>
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
ment before these are executed, but I do not.
> Instead it shows up *after* the last 2 lines of code have completed. Is
> there something broken about this?
My guess is that the output is getting buffered and the buffer doesn't
get flushed until sometime after the function executes.
-
68.x.x number. However, I know that that is not the IP that
the world sees when my packets finally leave the building.
What if your machine has multiple interface cards in it?
What are you trying to accomplish?
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Aug 5, 2008 at 4:39 PM, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> Sorry for replying to the replier (Timothy) instead of the OP (David),
> but the original post seems to have been eaten by my ISP.
>
> On Tue, 05 Aug 2008 15:48:26 -0700, Timothy Grant wrote:
>
&
-list
>
I'd likely use the csv module.
http://docs.python.org/lib/module-csv.html
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
listview object?
>
> Thanks in advance,
> sulu
I haven't done any threaded apps, but my understanding is that the you
should not manipulate the GUI outside of the main application thread.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
ar from the original message.
>>>
>>>
>>> Wei Guo wrote:
>>>>
>>>> #this is a better way of testing a string for float
>>>> def isFloat(s):
>>>>try:
>>>>s = float(s)
>>>>except:
>>>>return False
>>>>return True
>>>
>>>
>>> --
>>> http://mail.python.org/mailman/listinfo/python-list
>>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
estigate a logging decorator. Python's Decorator
module has a decorator factory that should allow you to log at least
the calls. I'm not sure it would help you much with the time the
method took, but I could very well be wrong about that.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
B's run Java, so there *may* be some
chance that it might be possible to get Jython running on it.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
needed something like this so did a straight port of
the double-metaphone code to python.
It's horrible, it's ugly, it's non-pythonic in ways that make me
cringe, it has no unit tests, but it does work.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
b/module-StringIO.html
>> File objects - http://docs.python.org/lib/bltin-file-objects.html
>>
>> --
>> Jerry
It looks to me like you are opening the url, but never retrieving the
content of the url.
I think you may have better luck with urllib2 which has a read() method.
http://docs.python.org/lib/urllib2-examples.html
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
do the same here. I have a horribly ugly version of
the double-metaphone algorithm in python that does work, and may be of
some use in solving this problem.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
tion. I have a fairly elegant version of the
> original
> metaphone algorithm I wrote myself (in PERL, many years ago) but I've
> never found
> the time to reverse-engineer the original C++ code for double-metaphone and
> "pythonize" it.
>
> On Mon, Aug 11, 2008 at 2
tp://mail.python.org/mailman/listinfo/python-list
>
Does making it a class level instead of instance level variable not work?
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
; read the dubious Wikipedia article:
>
> http://en.wikipedia.org/wiki/Pearl
>
> Mike
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Maybe he meant Pearl Jam compilation download.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
x27;, 'b', 'c']]
>>>>
>
>
> How come q is not updated after I deleted p?
>
> This is my point.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Because the list still has a reference to the object formerly known as p.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
n me this behaviour ?
>
>
> Thanks.
> --
> Boutillier Alexis
> Methodology engineer
>
> Arteris SA
> The Network-on-Chip Company TM
> www.arteris.net
>
> 6 par Ariane Immeuble Mercure
> 78284 Guyancourt Cedex
> France
> Office: (+33) 1 61 37 38 71
>
x27;m
> going with the third.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
I was going to go with not particularly strong in English. To someone
not familiar with English, downer() could very well be the obvious
converse of upper().
I'm usually quick to think "troll" but this time I didn't. Maybe I'm just naive.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
", "copyright", "credits" or "license" for more information.
>>> x = 'the quick brown fox'
>>> 'the' in x
True
>>> 'qui' in x
True
>>> 'jumped' in x
False
>>>
If that doesn't meet your needs you may want to look at the re
module. But if you can avoid re's your likely better off.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Aug 27, 2008 at 10:00 PM, W. eWatson <[EMAIL PROTECTED]> wrote:
> Timothy Grant wrote:
>>
>> On Wed, Aug 27, 2008 at 8:49 PM, W. eWatson <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> Is it possible to do a search for a wild card string in anoth
On Thu, Aug 28, 2008 at 1:40 AM, Alexis Boutillier
<[EMAIL PROTECTED]> wrote:
> Timothy Grant a écrit :
>>
>> On Wed, Aug 27, 2008 at 2:49 AM, Alexis Boutillier
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> Hi,
>>>
>>> I have a stran
On Fri, Aug 29, 2008 at 12:48 AM, Alexis Boutillier
<[EMAIL PROTECTED]> wrote:
> Timothy Grant a écrit :
>>
>> On Thu, Aug 28, 2008 at 1:40 AM, Alexis Boutillier
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> Timothy Grant a écrit :
>>>>
>&
> http://mail.python.org/mailman/listinfo/python-list
>
Why not look at the process list, and if you find two entries kill the
one that is just starting?
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
ing us to divine what you're looking for
based on next-to-no content in your question is a bit much.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
very interested in reading past
> discussion on it, if they are available.
>
> Regards
> Marco
I think the most obvious solution to the problem is effective unit
tests. If you type "a.y =1" and have a test that asserts a.x == 1 then
you would quite quickly discover that you made a typo.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
epress.com/putitdown
> --
> http://mail.python.org/mailman/listinfo/python-list
>
I find it impossible to take anyone asking others to do their school
work for them seriously no matter how or what they are willing to pay.
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
.5/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload',
'/Library/Python/2.5/site-packages',
'/usr/local/lib/wxPython-unicode-2.8.8.0/lib/python2.5',
'/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC']
>>>
--
Stand Fast,
tjg. [Timothy Grant]
--
http://mail.python.org/mailman/listinfo/python-list
On 31 Mar 2006 18:20:27 -0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> In using a simple smtp routine:
>
> # begin example
> >>> import smtplib
> >>> server = smtplib.SMTP('outgoing.verizon.net')
> >>> server.sendmail('[EMAIL PROTECTED]', '[EMAIL PROTECTED]',
> """To: [EMAIL PROTECTED]
> Fro
62 matches
Mail list logo