I have a structure in python that I think is a list
with elements .Cap
and .Ticker
where Cap
is a float and Ticker
is string.
So, I reference things like
industrylist[i].cap and industrylist[i].ticker
and this works fine.
What I want to do is reduce the list
so that it only
I have a dictionary grp that has lists
for each element ( excuse my terminology if it’s
incorrect).
So gname might be automobiles, finance, construction etc
and grp[gname] is a list and this list
has elements that are strings
such as [“AAA”,”BBB”,”AAA”,”CCC”]
Is there a quick w
Do I have to import something
In order to use the set command ?
I am trying to use it but
I keep getting an error.
Mark
--
http://mail.python.org/mailman/listinfo/python-list
I want to modify a string in the following way :
for s in stks:
s = s.strip()
if ( s[-2:] == ‘GR’
):
s[-2:]= ‘GF’
so, if the last two characters are GR, I want to change
them to GF ( there will be other if statements also but I am
just putting this one
7;s __name__
entry can be used later on.
Leading to more questions:
If this is the case, how do I get at the current module and its
dictionary from a c-extension function that takes no parameters ? Do I
have to stash it away internally in the C-code on initialisation, or
I have a function uniqueList that is below :
Def uniqueList(origList):
nodups= {}
for temp in origList:
nodups[temp] =
None
returns nodups.keys()
When used in the following context :
industryList = uniqueList(jpbarradata[group])
where jpbarradata[g
eep Creator.
I'd really
appreciate any ideas or issues that people see with this set
up.
Thanks,
Mark
--
http://mail.python.org/mailman/listinfo/python-list
Is it DEAD ?
An exciting prospect when I first heard of Nokia's proposal.
I thought there would be a few more postings here since the idea first
surfaced around Jan 2004.
Maybe I missed something.
Can anyone on the pilot program make a comment ?
Please give me reason to hope ?
Mark
--
Python program will directly
manipulate objects in the 3D program.
My brother has used Jython and he said in there, the Python Interpreter
is an object and you can bind it to an object. I'm not sure how this
would happen in C++ though.
Thanks,
Mark
-Original Message-
From: Josiah Carlson
h");
fclose(pythonFileP);
Py_Finalize();
}else{
printf("File not opened!\n");
}
return
0;
}
--- It's crashing
when I try to do the PyObject_CallMethod. How do I get at this
method? I'm not sure what the python file needs
> the re class for example.
>
> Somebody called O'Reilly taught you that Python has "standard
> classes", one of which is "re"??? Hmmm, can't have been O'Reilly the
> publisher; must have been O'Reilly the builder.
Or possibly O'Reilly
I have a Windows build of Python 2.4 core with all the extensions, both
debug and release. The release installer is built by msi.py
Is there a way to build a debug distribution other than rewriting msi.py
?
---
The information co
Hi,
We are trying to build a Database of all Open Source Bounties, Call for
Tenders (projects), and Grants.
Other than the Bounties provided by Mark Shuttleworth is anyone
available of any on other sites?
Here is a link to our DB:
http://www.opensourcexperts.com/bountylist.html
Cheers,
Mark
r window
(not necessarily interactive apart from a close button) to display some
data, but leaves the Python prompt active so I can carry on from there.
Haven't found anything about this yet. All sample multithreaded Tkinter
code I've seen uses the main thread as the GU
ssors. Because python
thinks it has two processors on my machine, too (because of
hyperthreading) and should exhibit the same decrease then (IF it would
be coupled to two processors).
Yours,
Mark
--
http://mail.python.org/mailman/listinfo/python-list
> Date: Thu, 16 Dec 2004 11:59:53 GMT
> From: "John Pote" <[EMAIL PROTECTED]>
>
> "Mark English" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> Is there a safe way to run tkinter in a multithreaded app
> where the mainloop ru
Hi
I'm brand new to python and I was wondering if anybody knew of a easy way to
change every character in a list into its lower case form.
The list is like so:
commands = ['CLASS-MAP MATCH-ALL cmap1', 'MaTch Ip AnY', 'CLASS-map Match-Any
cmap2', 'MaTch AnY', 'Policy-map policy1', 'Class cmap1'
"H. S. Lahman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Responding to Daniel T
>
> >>Try and find and experienced OO developer who would advocate that large,
> >>complex generalizations are a good practice. You can write lousy
> >>programs in any paradigm. The likelihood
Actually what I want is element 'class-map match-all cmap1' from list 1 to
match 'class-map cmap1 (match-all)' or 'class-map cmap1 mark match-all done' in
list 2 but not to match 'class-map cmap1'.
Each element in both lists have multiple words in them.
Jody - Is this you?
Pr. Mark A. Hoffman, S.T.S.St. John's Lutheran
ChurchSan Antonio, Texas(210)223-2611
Confidentiality Notice: This email message including any
attachments is for the sole use of the intended recipient(s) and may contain
confidential and privileged information
omplete or do I need to call built in
functions in a different way?
$ python
Python 2.3.4 (#1, Jun 13 2004, 11:21:03)
[GCC 3.3.1 (cygming special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
Michael Spencer <[
Thanks. This version is the version that comes with cygwin. They must be behind.
Steven Bethard <[EMAIL PROTECTED]> wrote:
>
> Mark Devine wrote:
> > the trouble is it throws up the following error for set:
> >
> > $ ./test.py
> > Traceback (most recent call
x27;]), Set(['A', 'B', 'E'])]
A B C D False
A B D True
A E F False
A (E) B False
A B True
E A B True
The results should be:
> A B C D True
> A B D True
> A E F False
> A (E) B True
> A B False
> E A B True
Michael Spencer <[EMAIL PROTECTED]&
If I use:
if el.issubset(testelement):
I get a closer anwser but the brackets cause a problem. They are optional in
the test list so (D) in the test list is equal to D or (D) in the reference
list.
"Mark Devine" <[EMAIL PROTECTED]> wrote:
>
> I got the script workin
it on.
regards
Steve
Mark Devine wrote:
I got it working correctly now thanks. I was on the right track it was a subset not a superset that was required in the end and all has worked out fine for me. Thank you for all your help
Steve Holden <[EMAIL PROTECTED]> wrote:
Mark Devine wrote:
Bryant Huang wrote:
Hi,
Is it possible to perform iteration within the re.sub() function call?
Sure. As the docs note:
If repl is a function, it is called for every non-overlapping occurrence
of pattern. The function takes a single match object argument, and
returns the replacement string. Fo
diting the /etc/ld.so.conf
file might be the better option.
Have look at 'man ldconfig' and 'man ld.so'.
Yours,
Mark
--
http://mail.python.org/mailman/listinfo/python-list
oxying all 8 Procs of
pystone resulted in approx 155000 pystones, while python2.4 with psyco
1.3 resulted in approx 20 pystones ...
Mark
--
http://mail.python.org/mailman/listinfo/python-list
Tom Haddon wrote:
Hi Folks,
Newbie question here. I'm trying to set up some unit testing for a database abstraction class, and the first thing I want to test is the connection parameters. So, my question is, how do I dynamically pass the variables from a list, for example to the unittest module so
Sorry for not putting a subject in the last e-mail. The function lower suited
my case exactly. Here however is my main problem:
Given that my new list is :
[class-map match-all cmap1', 'match ip any', 'class-map match-any cmap2',
'match any', 'policy-map policy1', 'class cmap1', 'policy-map polic
Can someone help me with below ?
It’s not my question but I will
forward any answers to my friend
who I am sending this for.
Mark
-Original Message-
From: Tan, Heap Ho
Sent: Tuesday, March 22, 2005 1:11
PM
To: Leeds, Mark
This is a follow up question
To the previous question
About sorting that
I sent for my friend.
-Original Message-
From: Tan, Heap Ho
Sent: Tuesday, March 22, 2005 2:06 PM
To: Leeds, Mark
Subject: RE: FW: Python help group
How can you speed it? Does anyone know if
ar one is for the game NetHack).
>
> Thanks,
> Chris
Check out the Win32 Console functions on MSDN, such as AlocConsole(),
ReadConsoleOutput(), GetStdHandle(). I don't see an easy way to get the
screen buffer handle unless you are the process that owns the console,
however.
Mark
--
http://mail.python.org/mailman/listinfo/python-list
ersion ('3.4')]
>>> print ' < '.join(map(str, version_list))
0.1.0 < 0.1.2 < 1.867b < 1.867c < 3.2.2 < 3.4
>>>
It should be noted that distutils.version provides a StrictVersion
class that offers less flexible but more predictable ordering -- see
the module docstrings for more details.
Regards,
Mark Rowe
<http://bdash.net.nz/>
--
http://mail.python.org/mailman/listinfo/python-list
2 -pthread -lm
-ldl -lutil /usr/lib/python2.2/config/libpython2.2.a
I discovered what libraries to link to by asking distutils:
import distutils.sysconfig
distutils.sysconfig.get_config_var('LIBS')
distutils.sysconfig.get_config_var('SYSLIBS')
g++ links to the right libraries for .cpp files.
-Mark
--
http://mail.python.org/mailman/listinfo/python-list
Why did you chose the static variant? This should be equivalent:
>
> g++ x.cpp -o x -I/usr/include/python2.2 -pthread -lm
> -ldl -lutil -lpython2.2
>
> --
> Regards,
>
> Diez B. Roggisch
On my system, for whatever reason, the .so library isn't present. I have
the pyth
"Reinhold Birkenfeld" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
> Heiko Wundram wrote:
>> Am Samstag, 26. März 2005 20:43 schrieb Mark Tolonen:
>>> On my system, for whatever reason, the .so library isn't present. I
>>> have
On 28 Mar 2005 03:56:42 -0800, in comp.lang.c , "Xah Lee"
<[EMAIL PROTECTED]> wrote:
>Python doc 3.6.4 Mutable Sequence Types at
(whatever)
will you /please/ stop crossposting this python thread to comp.lang.c.
(FUP's set to exclude CLC, please respect this)
--
Mar
s 'instance_1'
my initial instance was 'instance_2'
my initial instance was 'None'
my initial instance was 'instance_1'
Best-regards,
Mark
--
http://mail.python.org/mailman/listinfo/python-list
Maurice Ling wrote:
Hi,
I'm a postgraduate and my project deals with a fair bit of text
analysis. I'm looking for some libraries and tools that is geared
towards text analysis (and text engineering). So far, the most
comprehensive toolkit in python for my purpose is NLTK (natural language
tool
maybe list(tuple)[0:2])) will
get you what you
want but I don’t know how to
change it back to a tuple.
I’m just starting out but
I would be interested also.
mark
-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
gt; reply, please change the subject line.
Is anybody else finding that Gmails spam filter has started
labelling a lot of python-list emails as spam? About 20
python-list emails a day end up getting caught by their
filter and I'm having to manually go in and mark them
as "Not spam".
mark
On 4/14/05, James <[EMAIL PROTECTED]> wrote:
> Yes - it's been like that for the last month or so now and it's quite
> annoying, especially seeing as before it was working at near enough
> 100% accuracy.
And I don't suppose there's much we can do about it?
mar
#x27;ve now done the same. Let's hope they can do something about it,
it is a little annoying!
mark
> /S
--
http://mail.python.org/mailman/listinfo/python-list
s useful to me.
>From a pure programming point of view it's not a sufficient reason to
keep list comprehensions, especially as the interpreter shell could be
massaged into giving more output, but right here right now it's a lot
easier to read the former than the lat
"pythonchallenge" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> For the riddles' lovers among you, you are most invited to take part
> in the Python Challenge, the first python programming riddle on the net.
>
> You are invited to take part in it at:
> http://www.pythonchallenge.c
reatening him with a life long ban from this list should he repeat
such disgusting words on our forum.
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
uot;
"You mean like functools.partial?"
"But I don't want to do it like that, I want..."
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
On 12/11/2013 02:11, Terry Reedy wrote:
On 11/11/2013 4:41 PM, Mark Lawrence wrote:
From http://docs.python.org/dev/whatsnew/3.4.html#optimizations "The
UTF-32 decoder is now 3x to 4x faster.". Does anybody have any
references to this work? All I can find is the 3.3 what's n
x27;)
34
>>> sys.getsizeof(u' ')
52
bad by design
Don't you start :)
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
casions, but have consistently seen their help
rejected, and the responders who finally get fed up.
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
-tkc
Why oh why do I have an image of people at Bletchley Park trying to
switch Colossus from GMT to DOUBLE British Summer Time and back again?
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
.
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
First thing would you please read and action this
https://wiki.python.org/moin/GoogleGroupsPython so we don't have to read
double spaced google crap, thanks.
On 12/11/2013 22:27, lrwarre...@gmail.com wrote:
On Tuesday, November 12, 2013 4:21:58 PM UTC-6, Mark Lawrence wrote:
On 12/11/20
s more that I'm sure Steven D'Aprano can probably
list from the top of his head :)
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
ct a response of any kind.
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
e second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
On 12/11/2013 23:54, Ian Kelly wrote:
On Tue, Nov 12, 2013 at 4:38 PM, Mark Lawrence wrote:
What would you classify insulting my late mother as?
Rudeness. I'm not defending Nikos here, but let's not call it
something that it isn't.
Only being rude, well that's alrig
hy isn't the OP here being spoon fed?
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
From the link above "More examples
Starting with version 0.7, more examples can be found in the examples/
subdirectory of the source distribution."
Have you looked at these?
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christ
On 13/11/2013 16:42, Matt Graves wrote:
On Wednesday, November 13, 2013 11:32:24 AM UTC-5, Mark Lawrence wrote:
On 13/11/2013 16:12, Matt Graves wrote:
I'm using the jabberbot library and there is not a whole lot of documentation
on it. Does anyone have experience with this li
ogramming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
On 13/11/2013 22:00, Ferrous Cranus wrote:
Στις 13/11/2013 11:56 μμ, ο/η Mark Lawrence έγραψε:
On 13/11/2013 21:39, Ferrous Cranus wrote:
Στις 13/11/2013 11:30 μμ, ο/η Johannes Findeisen έγραψε:
On Wed, 13 Nov 2013 23:19:53 +0200
Ferrous Cranus wrote:
Στις 13/11/2013 7:45 μμ, ο/η Chris
ody, problem
solved :)
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
On 14/11/2013 00:57, Ned Batchelder wrote:
On Wednesday, November 13, 2013 5:32:49 PM UTC-5, Mark Lawrence wrote:
Wrong. You've once again not bothered to read the information that's
been handed to you on a plate. If you'd followed the instructions you
would not get the &
ys of
pronouncing the vowel combination au. Whatever happened to "There
should be one-- and preferably only one --obvious way to do it."? :)
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://
tain is now :)
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
On 14/11/2013 02:55, Steven D'Aprano wrote:
Please Mark, and anyone else reading, I'm begging you on bended knee,
take your flaming off list. You can be a valued member of this community
when you put your mind to it, but your prideful refusal to stop attacking
Nikos is helping to
On 15/11/2013 06:44, Steven D'Aprano wrote:
On Thu, 14 Nov 2013 17:10:02 +0000, Mark Lawrence wrote:
On 14/11/2013 03:56, renato.barbosa.pim.pere...@gmail.com wrote:
I apologize again for my bad english and any inconvenience that I have
generated.
I do wish that people would
efficiently you worked, the more profit your employer made.
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
top of your code.
Would you also be kind enough to read and action this
https://wiki.python.org/moin/GoogleGroupsPython to prevent the double
line spacing shown above, thanks.
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
s prounced
"Bremmer" and used to be spelt "Bremmer". Don't ask :)
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
On 16/11/2013 05:38, JL wrote:
On Saturday, November 16, 2013 8:22:25 AM UTC+8, Mark Lawrence wrote:
Yes but please don't top post. Actually print is a statement in Python
2 so your code should work if you use
from __future__ import print_function
at the top of your code.
Would you al
onna install those 2 modules for python 3.3.2?
I assume you can navigate to the Python 3.3.2 directory where pip is
installed and run it from there.
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mai
world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
who to
my knowledge has never posted here before?
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
e invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
deletion and
verification.
-tkc
Please stop feeding him, TIA.
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
es and you're out" limit?
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
disk, so after
a bit of RTFM I came up with this.
import sqlite3
from datetime import datetime, date
def datetime2date(datetimestr):
return datetime.strptime(datetimestr, '%Y-%m-%d')
sqlite3.register_converter('DATETIME', datetime2date)
db = sqlite3.connect(
the codecs issues see
http://bugs.python.org/issue7475 and http://bugs.python.org/issue19543
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
esign languages?)
As a rule of thumb people don't like change? This obviously assumes
that language designers are people :)
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailma
On 17/11/2013 12:34, Ned Batchelder wrote:
On Sunday, November 17, 2013 7:30:03 AM UTC-5, YBM wrote:
Le 17.11.2013 10:12, Nikos a écrit :
Στις 16/11/2013 6:46 μμ, ο/η YBM έγραψε:
Le 16.11.2013 17:30, Ferrous Cranus a écrit :
Mark wrote:
If you have to deliberately post like this in an
ho is currently paranoid about my spelling
and grammar?
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
On 17/11/2013 12:57, Ned Batchelder wrote:
On Sunday, November 17, 2013 7:45:05 AM UTC-5, Mark Lawrence wrote:
On 17/11/2013 12:34, Ned Batchelder wrote:
YBM: I'm going to politely ask you again to please stop.
1) Don't answer off-topic questions here. It only encourages more
On 17/11/2013 13:28, Nikos wrote:
You're on dangerous ground me old son. Please give up, you can't win,
too many people have seen you in your true light.
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mar
cond best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
On 17/11/2013 15:06, Ned Batchelder wrote:
On Sunday, November 17, 2013 9:42:25 AM UTC-5, Mark Lawrence wrote:
On 17/11/2013 14:17, Nikos wrote:
==
root@secure [~/distribute-0.6.49]# pip install pygeoip
Downloading/unpacking pygeoip
guage in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
lieve: http://foaas.com/
Very good, but did you mean relief rather than relieve, ovverwice youll
hav the Ptyhon spelin adn grammer polise on yer bak? :)
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
On 17/11/2013 02:16, Mark Lawrence wrote:
All the references regarding the subject that I can find, e.g.
http://stackoverflow.com/questions/1829872/read-datetime-back-from-sqlite-as-a-datetime-in-python,
talk about creating a table in memory using the timestamp type from the
Python layer. I
st to keep an eye on,
thanks.
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
e best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
)
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
t programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
ian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
much better to use the Flexible String Representation.
I agree but approximately 0.000142857% of the world population
disagrees.
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
On 17/11/2013 22:48, Tim Daneliuk wrote:
On 11/17/2013 04:33 PM, Gregory Ewing wrote:
Mark Lawrence wrote:
As a rule of thumb people don't like change? This obviously assumes
that language designers are people :)
That's probably true (on both counts).
I guess this means
don't sound the same.
Plus this mistake is very common; I typically see it at least once a
day.
Somebody published a link to this poem some months back, I think it's
worth repeating http://www.i18nguy.com/chaos.html
--
Python is the second best programming language in the wo
1101 - 1200 of 5532 matches
Mail list logo