Hi
pradeep nair schrieb:
> now wen i run hello1.py,i want the some function or utility in
> hello1.py that can pass the keyboard i/p to hello.py .
Have a look at subprocess.Popen
http://docs.python.org/lib/module-subprocess.html
--
René
--
http://mail.python.org/mailman/listinfo/python-list
HMS Surprise schrieb:
> I imported a set of functions from a file I wrote to interpreter
> shell:
>
> from myFile import *
>
> Now if I change functions in this file how can I make python forget it
> so I can force a fresh import?
I think you are looking for reload(). But don't forget to check i
HMS Surprise schrieb:
> I thought if I could do this:
> >>> a = b = ''
Bind both the names a and b to the same string object.
> >>> a = 'a'
Bind the name a to a *new* string object with the value 'a'. This
replaces the previous binding of the name a.
> >>> la = lb = []
Bind both the names la a
Antoon Pardon schrieb:
>> Who says the axes are labeled "familiarity" and "learning period"? I
>> just assume they are labeled (y-axis) "Effort" and (x-axis) "Knowledge"
>> (or "skill" or ).
>
> You can assume all you want, but no serious person processing numbers
> would choose axes like
Stefan Behnel schrieb:
> I agree that code posted to comp.lang.python should use english identifiers
> and that it is worth considering to use english identifiers in open source
> code that is posted to a public OS project site. Note that I didn't say "ASCII
> identifiers" but plain english identif
Marc 'BlackJack' Rintsch schrieb:
> You find it in the sources by the line number from the traceback and the
> letters can be copy'n'pasted if you don't know how to input them with your
> keymap or keyboard layout.
Typing them is not the only problem. They might not even *display*
correctly if you
Steven D'Aprano schrieb:
> How is that different from misreading "disk_burnt = True" as "disk_bumt =
> True"? In the right (or perhaps wrong) font, like the ever-popular Arial,
> the two can be visually indistinguishable. Or "call" versus "cal1"?
That is the wrong question. The right question is:
Anders J. Munch schrieb:
> There's any number of things to be done about that.
> 1. # -*- encoding: ascii -*-
This would limit comments and string literals to ASCII, too. I use "-*-
coding: utf-8 -*-" in all of my code and I am still against this PEP.
It is useful to be able to spell my own name
Stefan Behnel schrieb:
> Ok, but then maybe that code just will not become Open Source. There's a
> million reasons code cannot be made Open Source, licensing being one, lack of
> resources being another, bad implementation and lack of documentation being
> important also.
>
> But that won't chang
Stefan Behnel schrieb:
> My personal take on this is: search-and-replace is easier if you used well
> chosen identifiers. Which is easier if you used your native language for them,
> which in turn is easier if you can use the proper spellings.
I strongly disagree with this. My native language is
Steven D'Aprano schrieb:
>
>> A Python
>> project that uses Urdu identifiers throughout is just as useless
>> to me, from a code-exchange point of view, as one written in Perl.
>
> That's because you can't read it, not because it uses Unicode. It could
> be written entirely in ASCII,
Stefan Behnel schrieb:
> "go to" is not meant for clarity, nor does it encourage code readability.
Some people would argue that position.
> But that's what this PEP is about.
IMHO, this PEP does not encourage clarity and readability, it
discourages it. Identifiers which my terminal cannot even d
Stefan Behnel schrieb:
> Sounds like high time for an editor that supports the project team in their
> work, don't you think?
I think your argument about "isolated projects" is flawed. It is not at
all unusual for code that was never intended to be public, whose authors
would have sworn that it wi
Stefan Behnel schrieb:
> René Fleschenberg wrote:
>> you have failed to do that, in my opinion. All you have presented are
>> vague notions of rare and isolated use-cases.
>
> I don't think software development at one of the biggest banks in Germany can
> be consid
Stefan Behnel schrieb:
> René Fleschenberg wrote:
>> Programming is such an English-dominated culture that I even "think" in
>> English about it.
>
> That's sad.
I don't think so. It enables me to communicate about that topic with a
very broad range of ot
Stefan Behnel schrieb:
>>> Admittedly, it's done in Java, but why should Python fail to support unicode
>>> identifiers in the way Java does?
>> Your example does not prove much. The fact that some people use
>> non-ASCII identifiers when they can does not at all prove that it would
>> be a serious
Thorsten Kampe schrieb:
> Because keywords are not meant meant to extended or manipulated or
> something similar by the programmers. Keywords are well known and only
> a limited set of words. That's why you can't use keywords as
> identifiers.
This is true for keywords, but not for the stdl
Stefan Behnel schrieb:
>> I think your argument about "isolated projects" is flawed. It is not at
>> all unusual for code that was never intended to be public, whose authors
>> would have sworn that it will never ever be need to read by anyone
>> except themselves, to surprisingly go public at some
Stefan Behnel schrieb:
>> 1) Which additional potential for bugs and which hindrances for
>> code-sharing do you see with the with-statement?
>
> I'm not sufficiently used to it to understand it immediately when I read it.
http://www.python.org/dev/peps/pep-0343/
It is not that hard to grasp.
>
Thorsten Kampe schrieb:
>> Identifiers which my terminal cannot even display surely
>> are not very readable.
>
> This PEP is not about you. It's about people who write in their native
> language and who are forced to use a dodgy transcription from
> characters of their own language to ASCII.
I
Thorsten Kampe schrieb:
>> That is a reason to actively encourage people to write their code in
>> English whereever possible, not one to allow non-ASCII identifiers,
>> which might even do the opposite.
>
> There is no reason to encourage or discourage people in which language
> to write their c
Thorsten Kampe schrieb:
>> It is impossible to write Python in a native language other than English
>> even with the implementation of this PEP. All you get is a weird mixture
>> of English identifiers from various libraries and identifiers in your
>> native language.
>
> You have a few English ke
Thorsten Kampe schrieb:
> Just by repeating yourself you don't make your point more valid.
You are doing just the same. Your argument that encouraging code-sharing
is not a worthwhile goal is an ideologic one, just as the opposite
argument is, too (I do think that code sharing is very different f
Stefan Behnel schrieb:
> You're not trying to suggest that writing code in a closed area project is a
> bad habit, are you?
I think that the idea that you know today, with 100% certainty, that all
parts of your closed area project will stay closed forever is an
illusion and thus a bad idea, yes.
Thorsten Kampe schrieb:
> * René Fleschenberg (Tue, 15 May 2007 14:04:07 +0200)
>> Thorsten Kampe schrieb:
>>> Because keywords are not meant meant to extended or manipulated or
>>> something similar by the programmers. Keywords are well known and only
>>>
Stefan Behnel schrieb:
> That's easy to prevent: just keep your fingers from projects that work with
> them and make sure that projects you start do not use them.
You keep bringing up that argument that completely neglects reality. The
same argument can be used to justify anything else (including
Thorsten Kampe schrieb:
> GOTOs are not understable. Identifiers in foreign languages are
> perfectly understable. Just not to you.
> For coding problems better solutions (approaches) exist than using
> GOTOs (procedural programming, modules). For identifier naming
> problems it's not a better a
Marc 'BlackJack' Rintsch schrieb:
2) The with-statement does have proven substantial benefits, IMO.
>>> Not to me. I don't use it, so no-one should.
>> Now you are starting to troll?
>
> I thought he starts to argument like you. ;-)
I did not argue that way. I doubted that non-ASCII identi
Thorsten Kampe schrieb:
> It has nothing to do with that. It simply allows people to write their
> own identifier names with their native character set without using
> dodgy transcriptions (that might not even exist). There is no sense in
> making people write "ueber" instead of "über". That's 2
Thorsten Kampe schrieb:
> No, if you claim that something by itself is good and has to be
> encouraged then you are obliged to prove or give arguments for that.
That would be well outside the scope of this newsgroup, and if you
cannot see the reaons for this yourself, I am afraid that I won't be
Thorsten Kampe schrieb:
> You are right, except that using the correct characters for words is
> not a "funny thing". Using Polish diacritics (for example) for
> identifier names just makes sense for a project that already uses
> polish comments and polish names for their code. You will never ge
Thorsten Kampe schrieb:
> You could actually try by giving some arguments for your opinion. Your
> rationale was "English only, please" because of "code sharing".
I thought this was pretty clear. The more people can easily read code,
the higher the probability that it will be useful for them and
Carsten Haese schrieb:
> Allowing people to use identifiers in their native language would
> definitely be an advantage for people from such cultures. That's the use
> case for this PEP. It's easy for Euro-centric people to say "just suck
> it up and use ASCII", but the same people would probably s
Javier Bezos schrieb:
>> But having, for example, things like open() from the stdlib in your code
>> and then öffnen() as a name for functions/methods written by yourself is
>> just plain silly. It makes the code inconsistent and ugly without
>> significantly improving the readability for someone w
Steven D'Aprano schrieb:
> But they aren't new risks and problems, that's the point. So far, every
> single objection raised ALREADY EXISTS in some form or another.
No. The problem "The traceback shows function names having characters
that do not display on most systems' screens" for example doe
Steven D'Aprano schrieb:
>> Any program that uses non-English identifiers in Python is bound to
>> become gibberish, since it *will* be cluttered with English identifiers
>> all over the place anyway, wether you like it or not.
>
> It won't be gibberish to the people who speak the language.
Hmmm,
Gregor Horvath schrieb:
> If comments are allowed to be none English, then why are identifier not?
I don't need to be able to type in the exact characters of a comment in
order to properly change the code, and if a comment does not display on
my screen correctly, I am not as fscked as badly as whe
[EMAIL PROTECTED] schrieb:
> I'm not sure how you conclude that no problem exists.
> - Meaningful identifiers are critical in creating good code.
I agree.
> - Non-english speakers can not create or understand
> english identifiers hence can't create good code nor
> easily grok existing code.
Gregor Horvath schrieb:
> René Fleschenberg schrieb:
>
>> today, to the best of my knowledge. And "in some form or another"
>> basically means that the PEP would create more possibilities for things
>> to go wrong. That things can already go wrong today does not
Stefan Behnel schrieb:
> Then get tools that match your working environment.
Integration with existing tools *is* something that a PEP should
consider. This one does not do that sufficiently, IMO.
--
René
--
http://mail.python.org/mailman/listinfo/python-list
Stefan Behnel schrieb:
>>> - Non-english speakers can not create or understand
>>> english identifiers hence can't create good code nor
>>> easily grok existing code.
>> I agree that this is a problem, but please understand that is problem is
>> _not_ solved by allowing non-ASCII identifiers!
>
Marc 'BlackJack' Rintsch schrieb:
> There are potential users of Python who don't know much english or no
> english at all. This includes kids, old people, people from countries
> that have "letters" that are not that easy to transliterate like european
> languages, people who just want to learn P
Stefan Behnel schrieb:
> *Your* logic can be used to justify dropping *any* feature.
No. I am considering both the benefits and the problems. You just happen
to not like the outcome of my considerations [again, please don't reply
by E-Mail, I read the NG].
--
René
--
http://mail.python.org/mail
Steven D'Aprano schrieb:
>> Unless you are 150% sure that there will *never* be the need for a
>> person who does not know your language of choice to be able to read or
>> modify your code, the language that "fits the environment best" is
>> English.
>
> Just a touch of hyperbole perhaps?
>
> You
Gregor Horvath schrieb:
>> *That* logic can be used to justify the introduction of *any* feature.
>>
>
> No. That logic can only be used to justify the introduction of a feature
> that brings freedom.
That is any feature that you are not forced to use. So let's get gotos
and the like. Every progr
Stefan Behnel schrieb:
>> Now, very special environments (what I called "rare and isolated"
>> earlier) like special learning environments for children are a different
>> matter. It should be ok if you have to use a specially patched Python
>> branch there, or have to use an interpreter option that
Christophe schrieb:
> Who displays stack frames? Your code.
Wrong.
> Whose code includes unicode
> identifiers? Your code.
Wrong.
> Whose fault is it to create a stack trace
> display procedure that cannot handle unicode? You.
Wrong. If you never have to deal with other people's code,
cong
Christophe schrieb:
> René Fleschenberg a écrit :
>> Christophe schrieb:
>>> You should know that displaying and editing UTF-8 text as if it was
>>> latin-1 works very very well.s
>>
>> No, this only works for those characters that are in the ASCII range.
You have misread my statements.
Carsten Haese schrieb:
> There is evidence against your assertions that knowing some English is a
> prerequisite for programming
I think it is a prerequesite for "real" programming. Yes, I can imagine
that if you use Python as a teaching tool for Chinese 12 year-o
Martin v. Löwis schrieb:
> I've reported this before, but happily do it again: I have lived many
> years without knowing what a "hub" is, and what "to pass" means if
> it's not the opposite of "to fail". Yet, I have used their technical
> meanings correctly all these years.
I was not speaking of t
Martin v. Löwis schrieb:
>>> Then get tools that match your working environment.
>> Integration with existing tools *is* something that a PEP should
>> consider. This one does not do that sufficiently, IMO.
>
> What specific tools should be discussed, and what specific problems
> do you expect?
S
André Wyrwa schrieb:
> I'm wondering, though, if there isn't ANY way to have the password
> confirmed for the user that is already logged in. Please note the
> difference, i don't want to write some kind of login functionality. The
> user is already authenticated, i just want to have a typed in pas
Hi
The article you read at
http://www.cafepy.com/article/python_types_and_objects is really good,
and the most comprehensive one I know about Python's object system. I
recommend that you read it as many times as you need to understand it.
It can be confusing -- just don't give up ;)
I will try to
Hi
Gigs_ schrieb:
> I want to learn to make web pages with django.
> I dont know nothing about HTML.
>
> How much of HTML I need to know to be able to learn django well?
You need to get a profound knowledge of it, unless you have someone else
who does the HTML/Templating for your project. In tha
54 matches
Mail list logo