Please can someone look at my code and may be advice and may be help me with
some correction. I have been learning python for some time now. This is my
first project i wish to write. A hotel management system.
http://pastebin.com/LMHmuTiC
Thnaks
--
https://mail.python.org/mailman/listinfo/pyt
On Tue, Oct 28, 2014 at 3:08 PM, Terry Reedy wrote:
>> It's inconsistent only because the default sys.ps2 is those dots,
>> which aren't necessary in Idle. You could make it consistent by simply
>> changing sys.ps2.
>
>
> Nope. User code is executed in the user process. Its only effect on the
>
On 10/27/2014 11:10 AM, [email protected] wrote:
THIS IS THE LIST OF BOY NAMES
> Jacob
> ...
Writing hundreds of unnecessary lines at minimum inconsiderate. Please
don't do it.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 10/26/2014 11:28 PM, Seymore4Head wrote:
I am going to be flexible on IDLE in the near future, but I wanted to
try it the old fashion way. I already know using IDLE is better, but
I am not sure using IDLE will invoke Python 2 and I am not sure how to
change that at the moment.
Currently, I
On 10/26/2014 11:24 PM, Chris Angelico wrote:
On Mon, Oct 27, 2014 at 2:18 PM, Rustom Mody wrote:
On Monday, October 27, 2014 8:40:48 AM UTC+5:30, Chris Angelico wrote:
You can get block-by-block history by using Idle. I find that fairly
convenient for manipulating class/function definitions
On Mon, 27 Oct 2014 17:14:58 +0200, Marko Rauhamaa wrote:
> In POSIX, a write(2) system call on file blocks until all bytes have been
> passed on to the file system. The only exception (no pun intended) I know
> is the reception of a signal.
Writing to a file (or block device) will return a short
On Tuesday, October 28, 2014 12:41:40 AM UTC+5:30, [email protected] wrote:
> On Monday, October 27, 2014 6:24:19 PM UTC+1, Tim Golden wrote:
> > psutil is definitely your friend:
> >
> > https://github.com/giampaolo/psutil
> >
> > Although WMI can be quite handy too, depending on what you're tr
On Tuesday, October 28, 2014 6:56:10 AM UTC+5:30, Chris Angelico wrote:
> On Tue, Oct 28, 2014 at 12:12 PM, Rustom Mody wrote:
> > More generally for d being a 2-D reshape of dd (which may be anything
> > as long as the size matches)
> >
> dd = [1,2,3,4,5,6,7,8,9,10,11,12]
> d=[[dd[i*3+j
On 28 October 2014 00:36, Denis McMahon wrote:
>
> d = [[list(range(1,13))[i*3+j] for j in range(3)] for i in range(4)]
A quick note. Ranges (even 2.7's xrange) are all indexable. The cast
to a list isn't needed.
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Oct 28, 2014 at 12:12 PM, Rustom Mody wrote:
> More generally for d being a 2-D reshape of dd (which may be anything
> as long as the size matches)
>
dd = [1,2,3,4,5,6,7,8,9,10,11,12]
d=[[dd[i*3+j] for j in range(3)] for i in range(4)]
d
> [[1, 2, 3], [4, 5, 6], [7, 8, 9], [
On Tuesday, October 28, 2014 6:07:14 AM UTC+5:30, Denis McMahon wrote:
> On Mon, 27 Oct 2014 09:01:57 -0700, umatrp wrote:
> > I use python 3.4.0 version. In the course of developing / running a
> > python program, I have encountered a problem. I have reproduced below a
> > simple program to bring
On Mon, 27 Oct 2014 09:01:57 -0700, [email protected] wrote:
> I use python 3.4.0 version. In the course of developing / running a
> python program, I have encountered a problem. I have reproduced below a
> simple program to bring it out.
>
>
d = [[0]*3]*4 dd = [1,2,3,4,5,6,7,8,9,10,11,12]
On 28/10/2014 1:10 AM, [email protected] wrote:
Write a program that reads the contents of the two files into two separate
lists. The user should be able to enter a boy's name, a girl's
name or both, and the application will display messages indicating whether
the names wer
On Mon, 27 Oct 2014 08:10:04 -0700, emmanueloje wrote:
> Write a program that reads the contents of the two files into two
> separate lists.
Yep, know how to do that
> The user should be able to enter a boy's name, a girl's
> name or both
Yep, know how to do that
> and the application will dis
On Mon, Oct 27, 2014 at 3:39 PM, Ned Deily wrote:
> In article
> ,
> Cyd Haselton wrote:
>> I need to add a linker option to the command(s) run by setup.py when
>> building various objects. I'm not familiar with Python at all, so I
>> basically copied and modified a line from one area of the sc
On Monday, October 27, 2014 11:55:44 PM UTC+1, MRAB wrote:
> On 2014-10-27 22:38, kiuhnm wrote:
> > Consider this code:
> >
> > ---
> > from ctypes import *
> >
> > user32 = windll.user32
> > user32.MessageBoxA(0, 'ok', 'ok', 0)
> > ---
> >
> > If I run it in idle or from pycharm, the messagebox sh
On 2014-10-27 22:38, [email protected] wrote:
Consider this code:
---
from ctypes import *
user32 = windll.user32
user32.MessageBoxA(0, 'ok', 'ok', 0)
---
If I run it in idle or from pycharm, the messagebox shows 'o' instead of 'ok',
but if I run it from shell, it shows 'ok' like it should.
T
On Monday, October 27, 2014 3:38:31 PM UTC-7, [email protected] wrote:
> Consider this code:
>
> ---
> from ctypes import *
>
> user32 = windll.user32
> user32.MessageBoxA(0, 'ok', 'ok', 0)
> ---
>
> If I run it in idle or from pycharm, the messagebox shows 'o' instead of
> 'ok', but if I run it
Consider this code:
---
from ctypes import *
user32 = windll.user32
user32.MessageBoxA(0, 'ok', 'ok', 0)
---
If I run it in idle or from pycharm, the messagebox shows 'o' instead of 'ok',
but if I run it from shell, it shows 'ok' like it should.
The same happens with msvcrt.printf().
Why?
--
h
Rustom Mody writes:
> What would you say to a person who
> - Buys a Lambhorgini
I'd say: "Don't buy a Lambhorgini from that nice guy you met at a party,
but buy a Lamborghini by an authorized dealer" ;-)
--
I was a kid when Lamborghini launched the Miura!
--
https://mail.python.org
In article
,
Cyd Haselton wrote:
> I need to add a linker option to the command(s) run by setup.py when
> building various objects. I'm not familiar with Python at all, so I
> basically copied and modified a line from one area of the script to
> another
>
>
> ext_modules=[Extension('_struct',
On 10/27/14 2:32 PM, Larry Martell wrote:
On Mon, Oct 27, 2014 at 2:23 PM, Harvey Greenberg wrote:
I want to let the name of an attribute be the string value of a variable. Here
is some code:
class Object(object): pass
A = Object()
s = 'attr'
A. = 1
The last line denotes the variable value
On Monday, October 27, 2014 6:24:19 PM UTC+1, Tim Golden wrote:
> psutil is definitely your friend:
>
> https://github.com/giampaolo/psutil
>
> Although WMI can be quite handy too, depending on what you're trying to do:
>
> http://timgolden.me.uk/python/wmi/
>
> TJG
Thanks for answering.
I
On Mon, Oct 27, 2014 at 2:23 PM, Harvey Greenberg wrote:
> I want to let the name of an attribute be the string value of a variable.
> Here is some code:
>
> class Object(object): pass
> A = Object()
> s = 'attr'
> A. = 1
>
> The last line denotes the variable value by (not a python form). Wha
I want to let the name of an attribute be the string value of a variable. Here
is some code:
class Object(object): pass
A = Object()
s = 'attr'
A. = 1
The last line denotes the variable value by (not a python form). What I
want is to have A.attr = 1, but 'attr' determined by the value of s.
On 27/10/2014 17:16, [email protected] wrote:
> Hi! I'd like to write one or more scripts that analyze processes in
> memory on Windows 7. I used to do these things in C++ by using native
> Win32 API calls. How should I proceed in python? Any pointers?
>
psutil is definitely your friend:
https
Hi!
I'd like to write one or more scripts that analyze processes in memory on
Windows 7. I used to do these things in C++ by using native Win32 API calls.
How should I proceed in python? Any pointers?
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, Oct 27, 2014 at 10:17 AM, Wolfgang Maier
wrote:
> See
> https://docs.python.org/3/library/stdtypes.html?highlight=list#common-sequence-operations
> under Note 2 .
>
> Also asked and answered multiple times at stackoverflow, e.g.,
> http://stackoverflow.com/questions/6688223/
Also see
htt
On 10/27/2014 05:01 PM, [email protected] wrote:
I use python 3.4.0 version. In the course of developing / running a python
program, I have encountered a problem. I have reproduced below a simple program
to bring it out.
d = [[0]*3]*4
dd = [1,2,3,4,5,6,7,8,9,10,11,12]
for i in range(4):
...
I use python 3.4.0 version. In the course of developing / running a python
program, I have encountered a problem. I have reproduced below a simple program
to bring it out.
>>> d = [[0]*3]*4
>>> dd = [1,2,3,4,5,6,7,8,9,10,11,12]
>>> for i in range(4):
... for j in range(3): d[i][j] = dd[i*3+j
I need to add a linker option to the command(s) run by setup.py when
building various objects. I'm not familiar with Python at all, so I
basically copied and modified a line from one area of the script to
another
ext_modules=[Extension('_struct', ['_struct.c'], extra_link_args =
['Wl,--allow-shl
2014-10-27 11:10 GMT-04:00 :
> Write a program that reads the contents of the two files into two separate
> lists. The user should be able to enter a boy's name, a girl's
> name or both, and the application will display messages indicating whether
> the names were among the most
On Mon, 27 Oct 2014 08:10:04 -0700, emmanueloje wrote:
> Write a program that reads the contents of the two files into two
> separate lists. The user should be able to enter a boy's
name, a girl's
> name or both, and the application will display messages
indicating
>
Grant Edwards :
> If you really want to make sure that all bytes get written, you _must_
> put all write() calls in a loop that checks the return value and keeps
> re-writing any unwritten data.
>
> And to answer your next question: yes, Unix application programmers
> have been complaining about t
On 2014-10-26, Tim Delaney wrote:
> On 27 October 2014 01:14, Jon Ribbens wrote:
>> I have a need, in a Python C extension I am writing, for lists and
>> dictionaries with "lazy evaluation" - by which I mean that at least
>> some of the values in the lists/dictionaries are "proxy objects"
>> whic
Write a program that reads the contents of the two files into two separate
lists. The user should be able to enter a boy's name, a girl's
name or both, and the application will display messages indicating whether
the names were among the most popular.
THIS IS THE LIST OF BOY NAM
On 2014-10-26, Terry Reedy wrote:
> On 10/26/2014 10:14 AM, Jon Ribbens wrote:
>> Is there any better way to do this other than simply re-implementing
>> these types from scratch, emulating all their methods and operations?
>> (i.e. using UserList/UserDict). I was under the impression that that
>>
What is the best package to use with python 2.6 to access Web services. Is it
ZSI?
Can anyone recommend a good tutorial, preferably with a sandbox web service?
--
https://mail.python.org/mailman/listinfo/python-list
On 2014-10-27, Steven D'Aprano wrote:
> Roy Smith wrote:
>
>>> Yes and no. If something goes wrong in a .write() method,
>>> is not Python supposed to raise an error? (!)
>>
>> Define "wrong". It is not an error for a write() call to consume fewer
>> bytes than were requested.
>
> It's not? I'
On 2014-10-25, Wolfgang Maier wrote:
> It may be rare to use an expression both for its side-effects and its
> return value,
It's actually quite common.
For example:
f = open("filename")
d = f.readline()
In both of those lines, the side effects and return values are equally
vital. The
On Sun, 26 Oct 2014 23:32:08 -0400, Seymore4Head
wrote:
>On Mon, 27 Oct 2014 14:06:11 +1100, Ben Finney
> wrote:
>
>>Seymore4Head writes:
>>
>>> I am trying to learn classes.
>>> I am currently using Python 2.7 at the command line.
>>
>>(I think you mean the interactive Python interpreter, or
In article <[email protected]>,
Steven D'Aprano wrote:
> Roy Smith wrote:
>
> >> Yes and no. If something goes wrong in a .write() method,
> >> is not Python supposed to raise an error? (!)
> >
> > Define "wrong". It is not an error for a write() call to cons
In article ,
Cameron Simpson wrote:
> The "is" test is more direct and less subject to iffiness because the longer
> expression using id() leaves more scope/time for things to change, and of
> course "id" itself can be rebound to something weird.
Not to mention that Python is case-sensitive a
On Mon, Oct 27, 2014 at 10:30 PM, Steven D'Aprano
wrote:
> Roy Smith wrote:
>
>>> Yes and no. If something goes wrong in a .write() method,
>>> is not Python supposed to raise an error? (!)
>>
>> Define "wrong". It is not an error for a write() call to consume fewer
>> bytes than were requested.
Roy Smith wrote:
>> Yes and no. If something goes wrong in a .write() method,
>> is not Python supposed to raise an error? (!)
>
> Define "wrong". It is not an error for a write() call to consume fewer
> bytes than were requested.
It's not? I'm asking a genuine question here, not a rhetorical
On Mon, Oct 27, 2014 at 10:17 PM, alister
wrote:
> Notepad+ is also often suggested along with many other programmer editors/
> Integrated development environments (IDE).
That would be Notepad++, and yes, it's fairly well recommended. It's
based on the same edit component as SciTE, another good e
On Sun, 26 Oct 2014 23:32:08 -0400, Seymore4Head wrote:
> On Mon, 27 Oct 2014 14:06:11 +1100, Ben Finney
> wrote:
>
>>Seymore4Head writes:
>>
>>> I am trying to learn classes.
>>> I am currently using Python 2.7 at the command line.
>>
>>(I think you mean the interactive Python interpreter, o
- Original Message -
> From: "Seymore4Head"
> To: [email protected]
> Sent: Monday, 27 October, 2014 3:27:18 AM
> Subject: Classes and the command line
>
> I am trying to learn classes.
> I am currently using Python 2.7 at the command line.
> If you try to type commands at the comman
Martin wrote:
> I'm using the asyncio.Protocol interface to build a server which binds
> to a unix socket file. I want other system users to connect to the
> unix socket, so to communicate with the server.
>
> Where should I set the permissions of the file?
You should start the demon with a stri
- Original Message -
> From: "ast"
> To: [email protected]
> Sent: Monday, 27 October, 2014 9:16:26 AM
> Subject: Callback functions arguments
>
> Hi
>
> In this web site at example n°5
> http://fsincere.free.fr/isn/python/cours_python_tkinter.php
>
> A program is using the "Scale"
Michael Torrie wrote:
As far as I can tell, no BASIC dialect I've looked at (DOS and Linux
worlds only), has ever had any logical operators like AND (&&), OR (||),
and NOT (!). They only appear to have bitwise operators (&,|,~ C
equivalent). The fact that comparison operators returned 0 and -1
ast wrote:
> Hi
>
> In this web site at example n°5
> http://fsincere.free.fr/isn/python/cours_python_tkinter.php
>
> A program is using the "Scale" widget from tkinter module.
> Here is a piece of code:
>
> Valeur = StringVar()
>
> echelle = Scale(Mafenetre, from_=-100, to=100, resolution=10,
Hi! :)
I'm using the asyncio.Protocol interface to build a server which binds
to a unix socket file. I want other system users to connect to the
unix socket, so to communicate with the server.
Where should I set the permissions of the file?
The problem is that the socket file is created when th
Hi
In this web site at example n°5
http://fsincere.free.fr/isn/python/cours_python_tkinter.php
A program is using the "Scale" widget from tkinter module.
Here is a piece of code:
Valeur = StringVar()
echelle = Scale(Mafenetre, from_=-100, to=100, resolution=10, \
orient=HORIZONTAL, length=300,
"Mark Lawrence" a écrit dans le message de
news:[email protected]...
Also would you please access this list via https://mail.python.org/mailman/listinfo/python-list or
read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seein
On Mon, Oct 27, 2014 at 7:28 AM, Stefan Behnel wrote:
> Hi,
>
> please keep this on-list.
Sorry about that. Wrong button!
[snip]
>> Yes - I want to store a series of XML diffs/patches and be able to
>> generate documents by applying them.
>
> Could you be a little more specific? There are lots
Hi,
please keep this on-list.
Nicholas Cole schrieb am 26.10.2014 um 22:43:
> On Sun, Oct 26, 2014 at 6:30 PM, Stefan Behnel wrote:
>> Nicholas Cole schrieb am 26.10.2014 um 18:00:
>>> I'm looking for a python library that can parse XML Documents and
>>> create xml-aware "diff" files, and then u
57 matches
Mail list logo