noydb wrote:
> How would you convert a list of strings into a list of variables using
> the same name of the strings?
>
> So, ["red", "one", "maple"] into [red, one, maple]
>
> Thanks for any help!
red="a string"
one="another string"
maple="a file path"
old=["red", "one", "maple"]
newList=map(ev
I'll be 59 in a couple of months.
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list
Daniel Fetchinson, 19.08.2011 10:17:
I'll be 59 in a couple of months.
That's actually more on topic for one of the alt.test newsgroups.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
On Thursday, August 18, 2011 10:23:49 PM Steven D'Aprano did opine:
> gene heskett wrote:
> >> But I'd like to return the question. What's wrong with nntp?
> >
> > The sheer volume of traffic eats 99% of an ISP's bandwidth.
>
> I doubt that very much, particularly if the ISP drops the binary
> n
On Thursday, August 18, 2011 12:16:50 PM Jason Staudenmayer did opine:
[...]
> I do know it is ironic that I forgot to stop the footer for the one
> reply. It's not my choice to add it but I was able to find a way around
> that work policy for list emails. I'm a strong opponent of dropping any
> e
:P
Personally, I use LaTeX, which fits all my requirements.
On Fri, Aug 19, 2011 at 5:24 AM, Ethan Furman wrote:
> Alec Taylor wrote:
>>
>> wow, people still use WordPerfect?
>
> Them's fightin' words right there! :)
>
> Yes, we still use Word Perfect, and will as long as it is available. The
>
On Aug 18, 7:00 pm, Ethan Furman wrote:
> I have WordPerfect v13 which we are currently using for letter merges.
> I would like to automate this with Python instead of learning the WP
> Macro language.
>
> Does anyone have any pointers?
>
paper letter or eletronic mail merger ?
What you need is
If you really want __setitem__ and not __setattr__, you should change the
base class to 'dict'. Or 'import UserDict' and use that for the base class.
On Aug 18, 2011 9:45 PM, "luvspython" wrote:
> I'm using Python 2.7 and the code below fails at the 'super' statement
> in the __setitem__ function
In article
<2ab25f69-6017-42a6-a7ef-c71bc2ee8...@l2g2000vbn.googlegroups.com>,
noydb wrote:
> How would you convert a list of strings into a list of variables using
> the same name of the strings?
>
> So, ["red", "one", "maple"] into [red, one, maple]
>
> Thanks for any help!
I'm not sure wh
Hi all,
I have a script "myscript.py" located in "/usr/local/bin" on my linux box.
I can execute it in ipython with
run /usr/local/bin/myscript.py
but not with
run myscript.py
even though /usr/local/bin is in my $PATH and in my $PYTHONPATH.
What should I do to correct this?
Best regards,
Joha
Hi Josh,
thanks for the reply. I am no expert so please bear with me:
I thought that the {32} was supposed to match the previous expression 32
times?
So how can i have all matches accessible to me?
matt
On Thursday, August 18, 2011, Josh Benner wrote:
> On Thu, Aug 18, 2011 at 4:03 PM, Matt F
Thanks to all for your responses! Good lessons. I implemented
something like what Jerry Hill suggested (dictionary), which works
well for my purposes. The list of strings that is being passed into
this code is also provided by something I wrote so I do trust what is
being sent. Might use what A
> Hi Josh,
> thanks for the reply. I am no expert so please bear with me:
> I thought that the {32} was supposed to match the previous expression 32
> times?
>
> So how can i have all matches accessible to me?
$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
Type "he
I have an instrument that has a RS232 type serial comm port and I need
to connect to and control. I use Python 3.2 in Windows XP, plus
pySerial module. I have a problem when I execute a script consisting
of statements that open the comm port, configure it, write strings to
and receive strings from
On 18 août, 22:44, coldpizza wrote:
>
>
> ...
>
> In a web/html environment or in broken ascii-only consoles like the
> one on windows ...
C:\Users\Jean-Michel>echo 'Cet œuf de Lætitia coûte un €uro'
'Cet œuf de Lætitia coûte un €uro'
C:\Users\Jean-Michel>c:\Python27\python
Python 2.7.2 (default
On Fri, Aug 19, 2011 at 6:00 AM, Johan Ekh wrote:
> Hi all,
> I have a script "myscript.py" located in "/usr/local/bin" on my linux box.
> I can execute it in ipython with
>
> run /usr/local/bin/myscript.py
>
> but not with
>
> run myscript.py
>
> even though /usr/local/bin is in my $PATH and in m
Hi,
thanks for the suggestion. I guess i had found another way around the
problem as well. But i really wanted to match the line exactly and i
wanted to know why it doesn't work. That is less for the purpose of
getting the thing to work but more because it greatly annoys me off that
i can't figure
Folks,
What might be a good replacement for the shelve module, but one that
can handle a few gigs of data. I'm doing some calculations on daily
stock prices and the result is a nested list like:
[[date_1, floating result 1],
[date_2, floating result 2],
...
[date_n, floating result n]]
However,
On Fri, Aug 19, 2011 at 11:31 AM, Forafo San wrote:
> Folks,
> What might be a good replacement for the shelve module, but one that
> can handle a few gigs of data. I'm doing some calculations on daily
> stock prices and the result is a nested list like:
For what you're doing, I would give PyTabl
On 19 août, 17:20, Matt Funk wrote:
> Hi,
> thanks for the suggestion. I guess i had found another way around the
> problem as well. But i really wanted to match the line exactly and i
> wanted to know why it doesn't work. That is less for the purpose of
> getting the thing to work but more becaus
Hi Python users,
I am maintaining a website written with Python CGI scripts. To make sure the
website is working well,
I would like to have a script which automatically "uses" this website and
checks it's output everyday. It
would be better if this script runs from the clients' side.
Could any
On 19/08/11 17:31, Forafo San wrote:
> Folks,
> What might be a good replacement for the shelve module, but one that
> can handle a few gigs of data. I'm doing some calculations on daily
> stock prices and the result is a nested list like:
>
> [[date_1, floating result 1],
> [date_2, floating res
Matt Funk writes:
> thanks for the suggestion. I guess i had found another way around the
> problem as well. But i really wanted to match the line exactly and i
> wanted to know why it doesn't work. That is less for the purpose of
> getting the thing to work but more because it greatly annoys me
In Yingjie Lin
writes:
> Hi Python users,
> I am maintaining a website written with Python CGI scripts. To make
> sure the website is working well, I would like to have a script which
> automatically "uses" this website and checks it's output everyday. It
> would be better if this script runs
On Aug 19, 11:54 am, Thomas Jollans wrote:
> On 19/08/11 17:31, Forafo San wrote:
>
>
>
>
>
>
>
>
>
> > Folks,
> > What might be a good replacement for the shelve module, but one that
> > can handle a few gigs of data. I'm doing some calculations on daily
> > stock prices and the result is a neste
On Fri, Aug 19, 2011 at 8:08 AM, Yingjie Lin wrote:
> Hi Python users,
>
> I am maintaining a website written with Python CGI scripts. To make sure the
> website is working well,
> I would like to have a script which automatically "uses" this website and
> checks it's output everyday. It
> would
Dear friends,
I need execute an external program from a gui using PyQt4, to avoid
that hang the main thread, i must connect the signal "finished(int)"
of a QProcess to work properly.
for example, why this program don't work?
from PyQt4.QtCore import QProcess
pro = QProcess() # create QProc
You might check one of many binary encoders (like Avro, Thrift ...).
The other option is to use a database, sqlite3 is pretty fast (if you schema is
fixed). Otherwise you can look at some NoSQL ones (like MongoDB).
--
http://mail.python.org/mailman/listinfo/python-list
On Friday, August 19, 2011, Alain Ketterlin wrote:
> Matt Funk writes:
> > thanks for the suggestion. I guess i had found another way around the
> > problem as well. But i really wanted to match the line exactly and i
> > wanted to know why it doesn't work. That is less for the purpose of
> > gett
On 8/19/11 10:49 AM, Ken Watford wrote:
On Fri, Aug 19, 2011 at 11:31 AM, Forafo San wrote:
Folks,
What might be a good replacement for the shelve module, but one that
can handle a few gigs of data. I'm doing some calculations on daily
stock prices and the result is a nested list like:
For wh
On Fri, 19 Aug 2011 10:15:20 -0700 (PDT), Edgar Fuentes
wrote:
> Dear friends,
>
> I need execute an external program from a gui using PyQt4, to avoid
> that hang the main thread, i must connect the signal "finished(int)"
> of a QProcess to work properly.
>
> for example, why this program don't
On 19 août, 19:33, Matt Funk wrote:
>
> The results obtained are:
> results:
> [(' 2.199000e+01', ' : (instance: 0)\t:\tsome description')]
> so this matches the last number plus the string at the end of the line, but no
> retaining the previous numbers.
>
> Anyway, i think at this point i will go
Hi Python users,
I have been using try...except statements in the situations where I can expect
a certain type of errors might occur.
But sometimes I don't exactly know the possible error types, or sometimes I
just can't "spell" the error types correctly.
For example,
try:
response
Hi John and Chris,
Thanks for the help.
I looked at both and think that mechanize suits my needs better,
since it simply needs a python script and doesn't depend on Firefox.
Yingjie
> From: John Gordon
> Mechanize seems like what you want. It's built on top of
> urllib2.http://wwwsearch.s
In Yingjie Lin
writes:
> try:
> response = urlopen(urljoin(uri1, uri2))
> except urllib2.HTTPError:
> print "URL does not exist!"
> Though "urllib2.HTTPError" is the error type reported by Python, Python
> doesn't recognize it as an error type name. I tried using "HTTPError"
> alon
On Friday 2011 August 19 12:09, Yingjie Lin wrote:
> Hi Python users,
>
> I have been using try...except statements in the situations where I can
> expect a certain type of errors might occur. But sometimes I don't exactly
> know the possible error types, or sometimes I just can't "spell" the erro
:
On 19 August 2011 15:09, Yingjie Lin wrote:
>
> I have been using try...except statements in the situations where I can
> expect a certain type of errors might occur.
> But sometimes I don't exactly know the possible error types, or sometimes I
> just can't "spell" the error types correctly.
Hi Zero,
I see! This is very helpful. Thank you.
- Yingjie
On Aug 19, 2011, at 3:30 PM, Zero Piraeus wrote:
> :
>
> On 19 August 2011 15:09, Yingjie Lin wrote:
>>
>> I have been using try...except statements in the situations where I can
>> expect a certain type of errors might occur.
I'm pretty sure I'd actually read the first 2 links you point to, but the
difference between __setattr__ and __setitem__ still never registered with
me -- perhaps partly because even the discussion of __setattr__ discusses
adding an entry to the "*dictionary* of instance attributes".
*MANY* thank
On Aug 19, 1:56 pm, Phil Thompson wrote:
> On Fri, 19 Aug 2011 10:15:20 -0700 (PDT), Edgar Fuentes
>
>
>
>
>
>
>
>
>
> wrote:
> > Dear friends,
>
> > I need execute an external program from a gui using PyQt4, to avoid
> > that hang the main thread, i must connect the signal "finished(int)"
> > of
On 08/19/2011 11:33 AM, Matt Funk wrote:
> On Friday, August 19, 2011, Alain Ketterlin wrote:
>> Matt Funk writes:
>> > thanks for the suggestion. I guess i had found another way around the
>> > problem as well. But i really wanted to match the line exactly and i
>> > wanted to know why it doesn't
John Gordon wrote:
> In Yingjie Lin
> writes:
>
>> try:
>> response = urlopen(urljoin(uri1, uri2))
>> except urllib2.HTTPError:
>> print "URL does not exist!"
>
>> Though "urllib2.HTTPError" is the error type reported by Python, Python
>> doesn't recognize it as an error type name. I tried usi
That's great - but do they program in python?
On Fri, Aug 19, 2011 at 2:38 PM, Sajjad Ahmad wrote:
> See All details on
>
> http://hotelandtourism9.blogspot.com/2011/08/indian-hotels-wall-st-effect.html
>
> .
>
> See All details on
>
> http://hotelandtourism9.blogspot.com/2011/08/indian-hotels-wa
On Friday, August 19, 2011 10:33:49 AM UTC-7, Matt Funk wrote:
> number = r"\d\.\d+e\+\d+"
> numbersequence = r"%s( %s){31}(.+)" % (number,number)
> instance_linetype_pattern = re.compile(numbersequence)
>
> The results obtained are:
> results:
> [(' 2.199000e+01', ' : (instance: 0)\t:\tsome desc
In <4e4ec405$0$29994$c3e8da3$54964...@news.astraweb.com> Steven D'Aprano
writes:
> > You can catch all exceptions by catching the base class Exception:
> Except that is nearly always poor advice, because it catches too much: it
> hides bugs in code, as well as things which should be caught.
>
On Friday, August 19, 2011 12:55:40 PM UTC-7, Edgar Fuentes wrote:
> On Aug 19, 1:56 pm, Phil Thompson
> wrote:
> > On Fri, 19 Aug 2011 10:15:20 -0700 (PDT), Edgar Fuentes
> > wrote:
> > > Dear friends,
> >
> > > I need execute an external program from a gui using PyQt4, to avoid
> > > that hang
On Aug 19, 2011, at 4:17 PM, Matty Sarro wrote:
> That's great - but do they program in python?
Please don't repost URLs sent by a spammer. Only Google truly knows how its
algorithm works, but the general consensus is that the more times Google sees a
link repeated, the more credibility the l
Forafo San wrote:
> Folks,
> What might be a good replacement for the shelve module, but one that
> can handle a few gigs of data. I'm doing some calculations on daily
> stock prices and the result is a nested list like:
>
> [[date_1, floating result 1],
> [date_2, floating result 2],
> ...
> [
On 19/08/2011 20:55, ru...@yahoo.com wrote:
On 08/19/2011 11:33 AM, Matt Funk wrote:
On Friday, August 19, 2011, Alain Ketterlin wrote:
Matt Funk writes:
thanks for the suggestion. I guess i had found another way around the
problem as well. But i really wanted to match the line exactly and i
Matty Sarro wrote:
> That's great - but do they program in python?
Thanks for that, I didn't see the spam the first time, but thanks to
your "joke" I saw it now! I really appreciate that, because I LOVE to have
spam sent to me, including all the URLs. An extra bonus is that when the
posting is ar
John Gordon wrote:
> In <4e4ec405$0$29994$c3e8da3$54964...@news.astraweb.com> Steven D'Aprano
> writes:
>
>> > You can catch all exceptions by catching the base class Exception:
>
>> Except that is nearly always poor advice, because it catches too much: it
>> hides bugs in code, as well as thin
It's not the end of the world calm down I thought it was quite funny for a
friday joke!
Sent from my iPhone
On Aug 19, 2011, at 4:43 PM, Steven D'Aprano
wrote:
> Matty Sarro wrote:
>
>> That's great - but do they program in python?
>
> Thanks for that, I didn't see the spam the first time,
It was a joke, no need to be a prick about it.
If you're that offended then spend the cycles fixing the damn list so it
stops having so much spam. You realize spam comes in almost constantly,
right? Enough that multiple tines over the past weeks there have been no
less than 3 threads about it.
If
Glad someone has a sense of humor :)
If one person smiled I consider it a success.
Happy weekend!
On Aug 19, 2011 5:12 PM, "Rodrick Brown" wrote:
> It's not the end of the world calm down I thought it was quite funny for a
friday joke!
>
> Sent from my iPhone
>
> On Aug 19, 2011, at 4:43 PM, Stev
On Friday, August 19, 2011, jmfauth wrote:
> On 19 août, 19:33, Matt Funk wrote:
> > The results obtained are:
> > results:
> > [(' 2.199000e+01', ' : (instance: 0)\t:\tsome description')]
> > so this matches the last number plus the string at the end of the line,
> > but no retaining the previous
xDog Walker wrote:
> On Friday 2011 August 19 12:09, Yingjie Lin wrote:
[ ... ]
>> Does anyone know what error type I should put after the except statement?
>> or even better: is there a way not to specify the error types? Thank you.
>
> You probably need to import urllib2 before you can use urlli
On Fri, 19 Aug 2011 17:12:40 -0400
Matty Sarro wrote:
> It was a joke, no need to be a prick about it.
It was spam. You're the prick. If you think spam is funny it's
because you aren't the one that has to spend your time dealing with the
fallout.
> If you're that offended then spend the cycl
On Aug 19, 4:21 pm, Carl Banks wrote:
> On Friday, August 19, 2011 12:55:40 PM UTC-7, Edgar Fuentes wrote:
> > On Aug 19, 1:56 pm, Phil Thompson
> > wrote:
> > > On Fri, 19 Aug 2011 10:15:20 -0700 (PDT), Edgar Fuentes
> > > wrote:
> > > > Dear friends,
>
> > > > I need execute an external progra
On 8/19/11 12:09 PM, Yingjie Lin wrote:
> try:
> response = urlopen(urljoin(uri1, uri2))
> except urllib2.HTTPError:
> print "URL does not exist!"
>
> Though "urllib2.HTTPError" is the error type reported by Python, Python
> doesn't recognize it as an error type name.
> I tried using
On Friday, August 19, 2011, Carl Banks wrote:
> On Friday, August 19, 2011 10:33:49 AM UTC-7, Matt Funk wrote:
> > number = r"\d\.\d+e\+\d+"
> > numbersequence = r"%s( %s){31}(.+)" % (number,number)
> > instance_linetype_pattern = re.compile(numbersequence)
> >
> > The results obtained are:
> > re
On 8/19/11 3:36 PM, Steven D'Aprano wrote:
By the way, you know that you should never, ever use floats for currency,
right?
That's just incorrect. You shouldn't use (binary) floats for many *accounting*
purposes, but for many financial/econometric analyses, floats are de rigeur and
work much
On Aug 19, 5:00 pm, lzlu123 wrote:
> I have an instrument that has a RS232 type serial comm port and I need
> to connect to and control. I use Python 3.2 in Windows XP, plus
> pySerial module. I have a problem when I execute a script consisting
> of statements that open the comm port, configure it
On Fri, Aug 19, 2011 at 8:31 AM, Forafo San wrote:
> Folks,
> What might be a good replacement for the shelve module, but one that
> can handle a few gigs of data. I'm doing some calculations on daily
> stock prices and the result is a nested list like:
>
> [[date_1, floating result 1],
> [date_
On Friday, August 19 at 17:12 (-0400), Matty Sarro said:
>
> If you're that offended then spend the cycles fixing the damn list so
> it
> stops having so much spam. You realize spam comes in almost
> constantly,
> right? Enough that multiple tines over the past weeks there have been
> no
> less
Robert Kern wrote:
> On 8/19/11 3:36 PM, Steven D'Aprano wrote:
>
>> By the way, you know that you should never, ever use floats for currency,
>> right?
>
> That's just incorrect. You shouldn't use (binary) floats for many
> *accounting* purposes, but for many financial/econometric analyses, flo
Johannes wrote:
> hi list,
> what is the best way to check if a given list (lets call it l1) is
> totally contained in a second list (l2)?
[...]
For anyone interested, here's a pair of functions that implement
sub-sequence testing similar to str.find and str.rfind:
http://code.activestate.com/r
Never used it, but I think you can try this:
Pexpect - a Pure Python Expect-like module
Pexpect is a pure Python Expect-like module. Pexpect makes Python...
www.noah.org/python/pexpect/
lzlu123 wrote:
> I have an instrument that has a RS232 type serial comm port and I need
> to connect to an
You will lose a lot of people asking/answering interesting stuff, and
maybe eventually the list will die. Me (like many people with little
free time) seldom post in blogs/forums/mailing lists where I need to
register.
gene heskett wrote:
> That is asking the user to take considerable effort and
Hello, I am looking for the Python Windows Extensions to see if they can be
installed on a Mac.THanks.
--
http://mail.python.org/mailman/listinfo/python-list
You mean pywin32?
They sure don't install on linux so that should give you a clue...
On 19 August 2011 22:02, johnny.venter wrote:
>
> Hello, I am looking for the Python Windows Extensions to see if they can be
> installed on a Mac.THanks.
>
> --
> http://mail.python.org/mailman/listinfo/pyth
On Fri, Aug 19, 2011 at 1:02 PM, johnny.venter wrote:
>
> Hello, I am looking for the Python Windows Extensions to see if they can be
> installed on a Mac.THanks.
Your request is nonsensical. pywin32 wraps the Windows API libraries.
Mac OS X is not Windows; it does not implement the Windows API.
On 2011-08-19, Steven D'Aprano wrote:
> Even if you don't think it's the ethical thing to do, consider that someday
> you might be maintaining code written by the OP :)
A common further conclusion people reach is "but then I will be able to get
a job fixing it!"
Trust me, this is NOT where you w
Javier writes:
> You will lose a lot of people asking/answering interesting stuff, and
> maybe eventually the list will die.
I don't think it would die, but the chances are greater that it would
become insular and further disconnected from the Python community, and
hence far less useful.
> Me (
73 matches
Mail list logo