punk.sa...@gmail.com wrote:
> Hi All,
>
> Im new to Python. Im coming from C# background and want to learn Python.
> I was used to do following thing in C# in my previous experiences. I want
> to know how do I implement below example in Python. How these things are
> done in Python.
> [code]
> pu
Hi All,
Im new to Python. Im coming from C# background and want to learn Python.
I was used to do following thing in C# in my previous experiences. I want to
know how do I implement below example in Python. How these things are done in
Python.
[code]
public class Bank
{
public
Alok Singh Mahor writes:
> Hello everyone,
> few months back I started learning python and now I got nice familiarity.
> now i want to use python for creating dynamic database driven websites. and
> I dont want to use existing web frameworks for my work. I am learning
> things so I wont feel lazy
On Aug 3, 2013, at 12:37 AM, Alok Singh Mahor wrote:
> Hello everyone,
> few months back I started learning python and now I got nice familiarity. now
> i want to use python for creating dynamic database driven websites. and I
> dont want to use existing web frameworks for my work. I am learnin
On 8/2/2013 10:24 PM, kevin4f...@gmail.com wrote:
Looking at this again, I believe you actually had the structure almost
right before. You want to look through *all* of the target players cards
and if *none* of them match, (ie the search fails), you want to draw 1
card. What you were missing b
Hello everyone,
few months back I started learning python and now I got nice familiarity.
now i want to use python for creating dynamic database driven websites. and
I dont want to use existing web frameworks for my work. I am learning
things so I wont feel lazy to write all the code myself becaus
kevin4f...@gmail.com wrote:
> I'm trying to create a game of Go Fish in Python. But I've stumbled onto a
> little problem that I can't seem to figure out how to deal with.
>
Please list the program the way you are actually running it. The
present one will not run very long before producing
On Friday, August 2, 2013 7:11:37 PM UTC-7, Joshua Landau wrote:
> On 3 August 2013 02:44, wrote:
>
>
>
> Yeah, I already know about that. But if I try to change it, I'm not even able
> to start the program. If I try to change the if statement that it corresponds
> with, I get a an error say
On 2 August 2013 22:34, Chris Angelico wrote:
> On Fri, Aug 2, 2013 at 10:15 PM, wrote:
>
> Problem #3
> > cm or inch? The only serious unit is an SI unit.
> > (In scientific publications, only SI units are accepted)
>
> The cm is not a primary SI unit either.
But it is an SI unit.
(As a si
On 3 August 2013 02:44, wrote:
> Yeah, I already know about that. But if I try to change it, I'm not even
> able to start the program. If I try to change the if statement that it
> corresponds with, I get a an error saying "card" is not a global. And if I
> try to shift it in, for some reason...t
On Sat, Aug 3, 2013 at 2:44 AM, wrote:
> Yeah, I already know about that. But if I try to change it, I'm not even able
> to start the program. If I try to change the if statement that it corresponds
> with, I get a an error saying "card" is not a global. And if I try to shift
> it in, for some
On Friday, August 2, 2013 6:42:30 PM UTC-7, Terry Reedy wrote:
> Nonsense: they are executed just as you ask, even though what you ask is
>
> not what you meant.
>
>
>
> On 8/2/2013 8:40 PM, kevin4f...@gmail.com wrote:
>
>
>
> > def player_0_hitman(hit):
>
> > for card in pHands[targe
On Friday, August 2, 2013 6:39:43 PM UTC-7, John Ladasky wrote:
> On Friday, August 2, 2013 5:40:52 PM UTC-7, kevin...@gmail.com wrote:
>
> > Basically, my code is ignoring the if's and else's. I don't get why.
>
> > Everything appears to be positioned correctly, but for some odd reason, even
Nonsense: they are executed just as you ask, even though what you ask is
not what you meant.
On 8/2/2013 8:40 PM, kevin4f...@gmail.com wrote:
def player_0_hitman(hit):
for card in pHands[target_player]:
if target_card[0] == card[0]:
count = pHands[target_player].coun
On Friday, August 2, 2013 5:40:52 PM UTC-7, kevin...@gmail.com wrote:
> Basically, my code is ignoring the if's and else's. I don't get why.
> Everything appears to be positioned correctly, but for some odd reason, even
> after an if, the program also runs the else as well.
Look carefully at y
On 03/08/2013 01:40, kevin4f...@gmail.com wrote:
I'm trying to create a game of Go Fish in Python. But I've stumbled onto a
little problem that I can't seem to figure out how to deal with.
There is a human player (player 0) and three computer players (from 1-3). The
human player goes first and
On 8/2/2013 3:14 AM, Ben Finney wrote:
Chris Angelico writes:
[…] rather than OO/LibreOffice. (I'll not distinguish those two. Far
as I'm concerned, they're one product with two names.)
That's simply false. LibreOffice has, since the 2010 fork of the code
base and especially since the exodus
On 8/2/2013 1:19 AM, Dave Angel wrote:
Terry Reedy wrote:
On 8/1/2013 7:33 PM, Dave Angel wrote:
Terry Reedy wrote:
The diff with all the changes is here
http://hg.python.org/peps/rev/fb24c80e9afb
Just out of curiosity, where is "coding cookie" defined? I found enough
distant referenc
Hello,
I'm currently working on implementing Import Hooks (PEP302) with Python
2.7 to be able to import modules whose code is in ZODB. However, I have
stumbled upon a widely known issue about import deadlock[0][1] (note
that this issue is not directly related to ZODB, but a more general
question a
On Fri, Aug 2, 2013 at 1:00 PM, Schneider wrote:
> Hi list,
>
> I have to write a small SMTP-Relay script (+ some statistic infos) and I'm
> wondering, if this
> can be done in python (in terms of performance, of course not in terms of
> possibility ;) ).
>
> It has to handle around 2000 mails per
Hello,
I'm currently working on implementing Import Hooks (PEP302) with Python
2.7 to be able to import modules whose code is in ZODB. However, I have
stumbled upon a widely known issue about import deadlock[0][1] (note
that this issue is not directly related to ZODB, but a more general
question a
I'd like to be able to use PyArg_ParseTuple() in a generic way.
for example, i'd like to have all commands start with 1 integer parameter, and
this "commandID" will inform me of what parameters come next (via LUT).
knowing that i can then call ParseTuple again with the proper parameters.
like t
I'm trying to create a game of Go Fish in Python. But I've stumbled onto a
little problem that I can't seem to figure out how to deal with.
There is a human player (player 0) and three computer players (from 1-3). The
human player goes first and chooses a target player. And then a card rank (for
On Fri, Aug 2, 2013 at 7:18 PM, wrote:
> How should I tweak my setup to make it easier to retrieve my email? I hope
> I'm doing this reply correctly.
The best way is to use email, not the Google Groups interface. Start here:
http://mail.python.org/mailman/listinfo/python-list
You can use gm
On Fri, Aug 2, 2013 at 10:15 PM, wrote:
> Le vendredi 2 août 2013 17:19:11 UTC+2, Skip Montanaro a écrit :
>> > The solely valid solution, assuming there is some wish,
>> > is to define a maximal line width (preferably in SI units ;-)
>>
>> So, 79 * 8 points == 0.22295696 meters, right? :-)
>
Le vendredi 2 août 2013 17:19:11 UTC+2, Skip Montanaro a écrit :
> > The solely valid solution, assuming there is some wish,
>
> > is to define a maximal line width (preferably in SI units ;-)
>
>
>
> So, 79 * 8 points == 0.22295696 meters, right? :-)
>
>
>
> Skip
You can correct your m
> Reading outlook email, I found this:
>
> http://timgolden.me.uk/python/win32_how_do_i/read-my-outlook-inbox.html
>
> There is lots to find via google with 'reading outlook email with python'
You might also want to look at the source for the SpamBayes Outlook plugin:
https://pypi.python.org/pypi
On Fri, Aug 2, 2013 at 2:18 PM, wrote:
> On Thursday, August 1, 2013 2:32:55 PM UTC-4, Chris Angelico wrote:
> On Thu, Aug 1, 2013 at 7:08 PM, wrote:
>
> 1) You receive an email
>
> 2) That email has two URLs in it ("secure hyperlinks" means they begin
>
> https:// ?)
>
> 3) You choose one of t
On Thursday, August 1, 2013 2:32:55 PM UTC-4, Chris Angelico wrote:
On Thu, Aug 1, 2013 at 7:08 PM, wrote:
1) You receive an email
2) That email has two URLs in it ("secure hyperlinks" means they begin
https:// ?)
3) You choose one of them as being "appropriate" - is it always the second?
4
> The solely valid solution, assuming there is some wish,
> is to define a maximal line width (preferably in SI units ;-)
So, 79 * 8 points == 0.22295696 meters, right? :-)
Skip
--
http://mail.python.org/mailman/listinfo/python-list
> is the third column is only the microsecond?
Yes.
> how could i get this to write with the rest of the time (the hh:mm:ss) ?
It sounds like you really want the time formatted in a particular way,
not just the numeric value of one or more fields. Look at the
documentation for the strftime meth
On Friday, August 2, 2013 8:35:13 AM UTC-4, Steven D'Aprano wrote:
> On Fri, 02 Aug 2013 03:54:32 -0700, matt.doolittle33 wrote:
>
>
>
> > Hey everybody,
>
> >
>
> > I am using 2.7 on Ubuntu 12.10. All I need to do is to print time with
>
> > the microseconds. I have been looking at the do
Le vendredi 2 août 2013 13:07:47 UTC+2, Chris “Kwpolska” Warrick a écrit :
> On Fri, Aug 2, 2013 at 2:51 AM, Roy Smith wrote:
>
> > In article ,
>
> > Terry Reedy wrote:
>
> >
>
> >> Newly revised this morning:
>
> >> http://www.python.org/dev/peps/pep-0008/#maximum-line-length
>
> >> summ
On Friday, August 2, 2013 8:37:45 AM UTC-4, Skip Montanaro wrote:
> Perhaps use datetime?
>
>
>
> >>> now = datetime.datetime.now()
>
> >>> now.isoformat()
>
> '2013-08-02T07:37:08.430131'
>
> >>> now.strftime("%f")
>
> '430131'
>
>
>
> Skip
Thanks Skip, what i currently i have is:
On 2013-08-02, Grant Edwards wrote:
> On 2013-08-02, Schneider wrote:
>
>> I have to write a small SMTP-Relay script (+ some statistic infos)
>> and I'm wondering, if this can be done in python (in terms of
>> performance, of course not in terms of possibility ;) ).
>>
>> It has to handle around
On 2013-08-02, Schneider wrote:
> I have to write a small SMTP-Relay script (+ some statistic infos)
> and I'm wondering, if this can be done in python (in terms of
> performance, of course not in terms of possibility ;) ).
>
> It has to handle around 2000 mails per hour for at least 8hours a day
On 2013-08-02, Chris Angelico wrote:
> On Fri, Aug 2, 2013 at 8:14 AM, Ben Finney wrote:
>> Chris Angelico writes:
>>
>>> [?] rather than OO/LibreOffice. (I'll not distinguish those two. Far
>>> as I'm concerned, they're one product with two names.)
>>
>> That's simply false. ...
>>
>> Claiming
On 2013-08-02, Dennis Lee Bieber wrote:
> On Thu, 1 Aug 2013 19:29:06 + (UTC), Grant Edwards
> declaimed the following:
>
>>
>>I got tired of hand assembling (and disassembling) code for a custom
>>microprocessor, so I wrote an assembler and a disassembler.
>
> Let me know when you recre
On Fri, Aug 2, 2013 at 2:16 PM, Schneider wrote:
> Queuing the mails for a while is not possible, because the tool should sit
> between the client and smtp-server.
> It should act as proxy, not as server.
I've written an SMTP proxy (primary purpose: check SPF records;
secondary purpose: rate-limi
so you are saying that
self.logfile.write('%s\t'%(str(time(
should be:
self.logfile.write('%s\t'%(str(time.time(
???
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
On 08/02/2013 03:09 PM, Ray Cote wrote:
- Original Message -
From: "Schneider"
To: python-list@python.org
Sent: Friday, August 2, 2013 8:00:09 AM
Subject: Python performance
Hi list,
I have to write a small SMTP-Relay script (+ some statistic infos)
and
I'm wondering, if this
can be d
- Original Message -
> From: "Schneider"
> To: python-list@python.org
> Sent: Friday, August 2, 2013 8:00:09 AM
> Subject: Python performance
>
> Hi list,
>
> I have to write a small SMTP-Relay script (+ some statistic infos)
> and
> I'm wondering, if this
> can be done in python (in ter
On Fri 02 Aug 2013 02:59:26 PM CEST, Tim Chase wrote:
On 2013-08-02 14:00, Schneider wrote:
I have to write a small SMTP-Relay script (+ some statistic infos)
and I'm wondering, if this
can be done in python (in terms of performance, of course not in
terms of possibility ;) ).
It has to handle
Astroid_ is the new name of former logilab-astng library. It's an AST library,
used as the basis of Pylint_ and including Python 2.5 -> 3.3 compatible tree
representation, statical type inference and other features useful for advanced
Python code analysis, such as an API to provide extra informatio
>Speaking to the OP: personally, I don't like the approach of putting data
>access methods at the module level to >begin with. I'd rather use a class.
>Just because it makes sense to have a singleton connection now doesn't mean it
>>will always make sense as your application grows.
>In fact,
On 2013-08-02 14:00, Schneider wrote:
> I have to write a small SMTP-Relay script (+ some statistic infos)
> and I'm wondering, if this
> can be done in python (in terms of performance, of course not in
> terms of possibility ;) ).
>
> It has to handle around 2000 mails per hour for at least 8hour
On Fri, Aug 2, 2013 at 1:08 PM, Dave Angel wrote:
> matt.doolittl...@gmail.com wrote:
>
>> Hey everybody,
>>
>> I am using 2.7 on Ubuntu 12.10.
>
> and what version of Python are you using? I don't know if it matters,
> but it's useful to always supply both Python version and OS version.
>
Looks
On Fri, 02 Aug 2013 03:54:32 -0700, matt.doolittle33 wrote:
> Hey everybody,
>
> I am using 2.7 on Ubuntu 12.10. All I need to do is to print time with
> the microseconds. I have been looking at the docs and trying things for
> about half a day now with no success. Currently my code looks like
Perhaps use datetime?
>>> now = datetime.datetime.now()
>>> now.isoformat()
'2013-08-02T07:37:08.430131'
>>> now.strftime("%f")
'430131'
Skip
--
http://mail.python.org/mailman/listinfo/python-list
Am 02.08.2013 12:54, schrieb matt.doolittl...@gmail.com:
I am using 2.7 on Ubuntu 12.10. All I need to do is to print time with the
microseconds.[...]
# write date and time and microseocnds
self.logfile.write('%s\t'%(str(strftime("%Y-%m-%d",
self.logfile.write(
Op 01-08-13 17:20, ru...@yahoo.com schreef:
> On 07/29/2013 02:52 PM, Antoon Pardon wrote:
>> Op 29-07-13 01:41, ru...@yahoo.com schreef:
>>> How, using Python-3.3's email module, do I "flatten" (I think
>>> that's the right term) a Message object to get utf-8 encoded
>>> body with the headers:
>>>
matt.doolittl...@gmail.com wrote:
> Hey everybody,
>
> I am using 2.7 on Ubuntu 12.10.
and what version of Python are you using? I don't know if it matters,
but it's useful to always supply both Python version and OS version.
> All I need to do is to print time with the microseconds. I have b
Hi list,
I have to write a small SMTP-Relay script (+ some statistic infos) and
I'm wondering, if this
can be done in python (in terms of performance, of course not in terms
of possibility ;) ).
It has to handle around 2000 mails per hour for at least 8hours a day
(which does not mean, that
Op 01-08-13 17:20, ru...@yahoo.com schreef:
> On 07/29/2013 02:52 PM, Antoon Pardon wrote:
>> Op 29-07-13 01:41, ru...@yahoo.com schreef:
>>> How, using Python-3.3's email module, do I "flatten" (I think
>>> that's the right term) a Message object to get utf-8 encoded
>>> body with the headers:
>>>
On Fri, Aug 2, 2013 at 2:51 AM, Roy Smith wrote:
> In article ,
> Terry Reedy wrote:
>
>> Newly revised this morning:
>> http://www.python.org/dev/peps/pep-0008/#maximum-line-length
>> summary:
>> 72 for text block (comments, triple-quoted strings)
>> 79 for normal code
>> 99 for code that is re
Hey everybody,
I am using 2.7 on Ubuntu 12.10. All I need to do is to print time with the
microseconds. I have been looking at the docs and trying things for about half
a day now with no success. Currently my code looks like this:
# write date and time and microseocnds
self.
"D. Xenakis" writes:
> I tried to install SIP and PyQt5 using the pip install command but it
> didnt work on both cases (i was getting errors), so i finally
> installed them using the windows installers provided in
> riverbankcomputing website.
> My problem though here is that whenever i try to c
On Fri, Aug 2, 2013 at 10:46 AM, wrote:
> I do know some Python programming, I just dont know enough to put together
> the various scripts I need...I would really really appreciate if some one can
> help me with that...
Be aware that you might be paying money for that. If you know "some"
carpe
I do know some Python programming, I just dont know enough to put together the
various scripts I need...I would really really appreciate if some one can help
me with that...
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Aug 2, 2013 at 8:14 AM, Ben Finney wrote:
> Chris Angelico writes:
>
>> […] rather than OO/LibreOffice. (I'll not distinguish those two. Far
>> as I'm concerned, they're one product with two names.)
>
> That's simply false. ...
>
> Claiming they're the same product is ignoring the transfe
Le jeudi 1 août 2013 02:50:13 UTC+2, Chris Angelico a écrit :
> ...
> rather than OO/LibreOffice. (I'll not distinguish those two. Far as
>
> I'm concerned, they're one product with two names.)
...
Very interesting aspect in LibreOffice.
As the "center of gravity of the development" has move
Am 01.08.2013 18:02, schrieb cool1...@gmail.com:
I know I should be testing out the script myself but I did, I tried
and since I am new in python and I work for a security firm that ask
me to scan hundreds of documents a day for unsafe links (by opening
them) I thought writing a script will be mu
Chris Angelico writes:
> […] rather than OO/LibreOffice. (I'll not distinguish those two. Far
> as I'm concerned, they're one product with two names.)
That's simply false. LibreOffice has, since the 2010 fork of the code
base and especially since the exodus of developers to The Document
Foundati
63 matches
Mail list logo