On 6/23/2011 11:49 PM, Gnarlodious wrote:
Let me restate my question.
Say I have a script Executable.py that calls all other scripts and
controls them:
#!/usr/local/bin/python
from Module import Data
import ModuleTest
ModuleTest.py has this:
print(Data.Plist.Structure)
Running Executable.py g
On 6/24/2011 12:32 AM, Chetan Harjani wrote:
x=y="some string"
And we know that python interprets from left to right.
Read the doc. "5.14. Evaluation order
Python evaluates expressions from left to right. Notice that while
evaluating an assignment, the right-hand side is evaluated before the
On Fri, Jun 24, 2011 at 2:32 PM, Chetan Harjani
wrote:
> x=y="some string"
> And we know that python interprets from left to right. so why it doesnt
> raise a name error here saying name 'y' is not defined?
In most languages, the answer is that the = operator associates right
to left, even though
x=y="some string"
And we know that python interprets from left to right. so why it doesnt
raise a name error here saying name 'y' is not defined?
another example:
(1,2) + 3,
here, python raises a TypeError "can only concatenate tuple(not int) to
tuple" but we know (3,) is a tuple as seen by follo
Just a follow up on the longer post I made [1]:
Is it bad to set __abstractmethod__ on non-functions in order to
trigger the ABC abstractness checks?
If not, are __isabstractmethod__ on objects and __abstractmethods__ on
classes misleading names?
Like I said before, I don't mean to imply that Py
On Jun 24, 2:01 pm, Gnarlodious wrote:
> Seems like it should already be invented.
If you're finding you're importing the same data into every single
module, then you're doing something wrong. Creating dependencies
across modules like you're wanting is a recipe for suffering.
--
http://mail.pyt
Idea: It occurs to me that my application class inherits "object". Can
I set that to inherit an object that already includes data? So every
subsequent class would start off with data loaded (except for class
Data).
Seems like it should already be invented.
-- Gnarlie
--
http://mail.python.org/ma
Let me restate my question.
Say I have a script Executable.py that calls all other scripts and
controls them:
#!/usr/local/bin/python
from Module import Data
import ModuleTest
ModuleTest.py has this:
print(Data.Plist.Structure)
Running Executable.py gives me this:
NameError: name 'Data' is not
"Waldek M." wrote:
> But your point was...?
That it's easier for you to find ways to achieve what you want than it
is require Python to change to accommodate your need.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 23 Jun 2011 19:01:59 -0700, Gnarlodious wrote:
> On Jun 23, 12:10 pm, Terry Reedy wrote:
>
>> from test import ftest,itest
>>
>> def test_main():
>>
>> if __name__ == '__main__':
>> test_main()
>
> I don't understand this. Can you explain, or refer me to some
> documentation?
What
On Wed, Jun 22, 2011 at 12:28 PM, Neal Becker wrote:
> AFAICT, the python iterator concept only supports readable iterators, not
> write.
> Is this true?
>
> for example:
>
> for e in sequence:
> do something that reads e
> e = blah # will do nothing
>
> I believe this is not a limitation on th
On Fri, Jun 24, 2011 at 10:07 AM, Steven D'Aprano
wrote:
> On Fri, 24 Jun 2011 04:00:17 +1000, Chris Angelico wrote:
>
>> On Fri, Jun 24, 2011 at 2:58 AM, Eric Snow
>> wrote:
>>> So, which are the other pieces of Python that really need the heavy
>>> optimization and which are those that don't?
On Jun 23, 12:10 pm, Terry Reedy wrote:
> from test import ftest,itest
>
> def test_main():
>
> if __name__ == '__main__':
> test_main()
I don't understand this. Can you explain, or refer me to some
documentation?
-- Gnarlie
http://Gnarlodious.com
--
http://mail.python.org/mailman/listinf
Chris Torek wrote:
> In article I wrote, in part:
>>Another possible syntax:
>>
>>for item in container with key:
>>
>>which translates roughly to "bind both key and item to the value
>>for lists, but bind key to the key and value for the value for
>>dictionary-ish items". Then ... the OP wo
On Fri, 24 Jun 2011 04:00:17 +1000, Chris Angelico wrote:
> On Fri, Jun 24, 2011 at 2:58 AM, Eric Snow
> wrote:
>> So, which are the other pieces of Python that really need the heavy
>> optimization and which are those that don't? Thanks.
>>
>>
> Things that are executed once (imports, class/fun
On 2011.06.23 06:24 PM, miamia wrote:
> Hello,
> I am using 32bit win xp pro and compiling my python scripts as exe
> with py2exe. Everything works ok on 32bit windows platforms. But how
> can I compile my program for use on 64bit Windows?
>
> On 64bit windows this error occures in event log:
> Act
Hello,
I am using 32bit win xp pro and compiling my python scripts as exe
with py2exe. Everything works ok on 32bit windows platforms. But how
can I compile my program for use on 64bit Windows?
On 64bit windows this error occures in event log:
Activation context generation failed for "C:\Program F
On Wed, 2011-06-22 at 10:44 -0700, Tim Hanson wrote:
> Thanks for your responses to my student question about using OS paths in
> Python.
>
> For the more general case, I am a Linux user interested in making my scripts
> platform neutral, which would include Linux, Unix (including Mac), and
> W
On Thu, 23 Jun 2011 08:13:18 +0100, Gurpreet Singh
wrote:
...Cygwin spam. Twice.
Please don't mail to both comp.lang.python and python-list. They are
gatewayed to each other, so we see your messages twice, which makes us
roughly half as likely to respond to them.
--
Rhodri James *-* W
In article I wrote, in part:
>Another possible syntax:
>
>for item in container with key:
>
>which translates roughly to "bind both key and item to the value
>for lists, but bind key to the key and value for the value for
>dictionary-ish items". Then ... the OP would write, e.g.:
>
>for e
On Jun 23, 4:47 pm, "Thomas L. Shinnick"
wrote:
> There is also
> print(match_obj.string)
> which gives you a copy of the string searched. See end of section
> 6.2.5. Match Objects
I tried that, but the only time I wanted the string printed was when
there *wasn't* a match, so the match ob
Hello new world !
i’m glad to announce the release of version GOZERBOT 0.9.2, a bot that
has been declared dead but has arrived from the pits of hell to serve
our people here well ;] Discovered that SQLAlchemy has been fixed in
such a way that it was easy to resurrect the thing, and release a new
2011/6/24 Waldek M. :
> Dnia Fri, 24 Jun 2011 01:29:38 +1000, Chris Angelico napisał(a):
>> You can have them in Python. Just run your code through cpp (the C
>> preprocessor) first. Voila!
>>
>> It's handy for other things too. Don't like Python's lack of "then"
>> and "end if"?
> [...]
> Yup, got
There is also
print(match_obj.string)
which gives you a copy of the string searched. See end of section
6.2.5. Match Objects
At 02:58 PM 6/23/2011, John Salerno wrote:
After I've run the re.search function on a string and no match was
found, how can I access that string? When I try to p
On Jun 23, 3:47 pm, Ian Kelly wrote:
> On Thu, Jun 23, 2011 at 1:58 PM, John Salerno wrote:
> > After I've run the re.search function on a string and no match was
> > found, how can I access that string? When I try to print it directly,
> > it's an empty string, I assume because it has been "cons
In article <1308852410.2257.1466520...@webmail.messagingengine.com>,
pyt...@bdurham.com wrote:
> > You'll have to install Tcl yourself. The 2.6 binaries were
> compiled against a newer version than Apple ships.
>
> Does this requirement apply to Python 2.7 or Python 3.2 for the
> Mac or is this r
On Thu, Jun 23, 2011 at 1:58 PM, John Salerno wrote:
> After I've run the re.search function on a string and no match was
> found, how can I access that string? When I try to print it directly,
> it's an empty string, I assume because it has been "consumed." How do
> I prevent this?
This has noth
After I've run the re.search function on a string and no match was
found, how can I access that string? When I try to print it directly,
it's an empty string, I assume because it has been "consumed." How do
I prevent this?
It seems to work fine for this 2.x code:
import urllib.request
import re
Dnia Fri, 24 Jun 2011 01:29:38 +1000, Chris Angelico napisał(a):
> You can have them in Python. Just run your code through cpp (the C
> preprocessor) first. Voila!
>
> It's handy for other things too. Don't like Python's lack of "then"
> and "end if"?
[...]
Yup, got the sarcasm, that's for sure.
B
In article <96gb36fc6...@mid.individual.net>,
Gregory Ewing wrote:
>Chris Torek wrote:
>
>> Oops! It turns out that os.kill() can raise OverflowError (at
>> least in this version of Python, not sure what Python 3.x does).
>
>Seems to me that if this happens it indicates a bug in
>your code. It o
On Fri, Jun 24, 2011 at 2:58 AM, Eric Snow wrote:
> So, which are the other pieces of Python that really need the heavy
> optimization and which are those that don't? Thanks.
>
Things that are executed once (imports, class/func definitions) and
things that primarily wait for user input don't nee
On Jun 23, 2011 10:42 AM, "mando" wrote:
>
> I've installed MacPython 2.6 under mac os x 2.6 and the IDLE doesn't
> work.
> I post error log. Suggestions?
>
> Thanks a lot.
>
> Luca
>
You'll have to install Tcl yourself. The 2.6 binaries were compiled against
a newer version than Apple ships.
>
Benjamin,
> You'll have to install Tcl yourself. The 2.6 binaries were
compiled against a newer version than Apple ships.
Does this requirement apply to Python 2.7 or Python 3.2 for the
Mac or is this requirement Python 2.6 specific?
Thank you,
Malcolm
--
http://mail.python.org/mailman/listinfo
On 6/23/2011 10:09 AM, Gnarlodious wrote:
On Jun 23, 7:59 am, Noah Hall wrote:
>from a import x
I'm doing that:
import Module.Data as Data
However I end up doing it in every submodule, so it seems a little
redundant. I wish I could load the variable in the parent program and
have it be availa
(I apologize for the length of this article -- if I had more time,
I could write something shorter...)
In article
Neal Becker wrote:
>AFAICT, the python iterator concept only supports readable iterators,
>not write.
>Is this true?
>
>for example:
>
>for e in sequence:
> do something that rea
On Jun 23, 11:42 am, Noah Hall wrote:
> > What about using an environment variable?
>
> Yes, that's fine, but only if the data is suitable for it.
In this case, the variable is a namespace containing the property of a
folder full of plist files. I access any dictionary item anywhere in
my webapp
On Jun 23, 8:42 am, Peter Otten wrote:
> from Module import Data
>
> There, you saved three more characters .
OK I get it, LOL.
> But I don't think it's a good idea. Remember that "explicit is better than
> implicit".
Thanks, now I know what that means.
-- Gnarlie
--
http://mail.python.org/mail
On Thu, Jun 23, 2011 at 6:18 PM, Guillaume Martel-Genest
wrote:
> On Jun 23, 9:41 am, Gnarlodious wrote:
>> Is there a way to declare a project-wide variable and use that in all
>> downstream modules?
>>
> What about using an environment variable?
Yes, that's fine, but only if the data is suitab
I've installed MacPython 2.6 under mac os x 2.6 and the IDLE doesn't
work.
I post error log. Suggestions?
Thanks a lot.
Luca
23/06/11 19.18.01 Apple80211 framework[211]
ACInterfaceGetPower called
with NULL interface
23/06/11 19.18.01 [0x0-0x1f61f6].org.python.IDLE[2470]
Traceback (m
On Jun 23, 9:41 am, Gnarlodious wrote:
> Is there a way to declare a project-wide variable and use that in all
> downstream modules?
>
> -- Gnarlir
What about using an environment variable?
--
http://mail.python.org/mailman/listinfo/python-list
I was thinking about the different features of Python that have an
impact on performance. Here are the obvious ones I could think of:
Features most impactful on performance:
- function calls
- loops
Features least impactful on performance:
- imports
- function definitions
- class definitions
On Jun 23, 2011, at 12:11 PM, Cathy James wrote:
> Dear All,
>
> I looked through this forum's archives, but I can't find a way to
> search for a topic through the archive. Am I missing something?
http://www.google.com/search?q=site%3Amail.python.org%2Fpipermail%2Fpython-list%2F+++banana
--
h
murtaza.ned...@gmail.com
--
http://mail.python.org/mailman/listinfo/python-list
On 23/06/11 18:11:32, Cathy James wrote:
I looked through this forum's archives, but I can't find a way to
search for a topic through the archive. Am I missing something?
One way to search the past contributions to this forum is to
go to http://groups.google.com/advanced_search and specify
"co
Dear All,
I looked through this forum's archives, but I can't find a way to
search for a topic through the archive. Am I missing something?
Thanks as always.
CJ.
--
http://mail.python.org/mailman/listinfo/python-list
On 23/06/2011 16:07, Anurag wrote:
My application is a web based application for both windows and Linux.
The web part is developed using Django. So if Python does not support
it then any support for local sytem account authentication in Django?
I am looking for a common library for both Linux an
Ian Kelly wrote:
> On Wed, Jun 22, 2011 at 3:54 PM, Steven D'Aprano
> wrote:
>> Fortunately, that's not how it works, and far from being a "limitation",
>> it would be *disastrous* if iterables worked that way. I can't imagine
>> how many bugs would occur from people reassigning to the loop varia
On Thu, Jun 23, 2011 at 9:58 PM, Waldek M. wrote:
> Of course, it is just my personal opinion. It might be not pythonic,
> I may be wrong, yet - concept of constants is not something new and
> if other languages, like C/C++/Java/Perl/ (bash even) have them,
> I can't see the reason not to have the
On Jun 23, 4:42 pm, Peter Otten <__pete...@web.de> wrote:
(snip)
> > However I end up doing it in every submodule, so it seems a little
> > redundant. I wish I could load the variable in the parent program and
> > have it be available in all submodules. Am I missing something?
>
> You can modify th
My application is a web based application for both windows and Linux.
The web part is developed using Django. So if Python does not support
it then any support for local sytem account authentication in Django?
I am looking for a common library for both Linux and Windows. Any help
will be Gr8
Rega
On Wed, Jun 22, 2011 at 3:54 PM, Steven D'Aprano
wrote:
> Fortunately, that's not how it works, and far from being a "limitation",
> it would be *disastrous* if iterables worked that way. I can't imagine
> how many bugs would occur from people reassigning to the loop variable,
> forgetting that it
On Thu, Jun 23, 2011 at 3:09 PM, Gnarlodious wrote:
> On Jun 23, 7:59 am, Noah Hall wrote:
>> >>>from a import x
>
> I'm doing that:
> import Module.Data as Data
Well, that's not quite the same. You're using Module.Data as Data - I
guess you've done this because you've realised that import Module
Gnarlodious wrote:
> On Jun 23, 7:59 am, Noah Hall wrote:
>> >>>from a import x
>
> I'm doing that:
> import Module.Data as Data
from Module import Data
There, you saved three more characters .
> However I end up doing it in every submodule, so it seems a little
> redundant. I wish I could loa
On Jun 23, 7:59 am, Noah Hall wrote:
> >>>from a import x
I'm doing that:
import Module.Data as Data
However I end up doing it in every submodule, so it seems a little
redundant. I wish I could load the variable in the parent program and
have it be available in all submodules. Am I missing someth
On Thu, Jun 23, 2011 at 9:14 AM, sajuptpm wrote:
> Hi,
> How get all users belongs to a group using python ldap module.
Depends on what you mean by "users" and "group", what information you
already have, and what information you want to get. I'll assume you
mean posix accounts and groups, and tha
On Thu, Jun 23, 2011 at 2:41 PM, Gnarlodious wrote:
> Is there a way to declare a project-wide variable and use that in all
> downstream modules?
Well, the standard way you should do it is to use import to import a
certain variable - for example -
a.py -
x = 3
>>>from a import x
>>>x
3
--
ht
No, but you can define a name in one module and import that into others.
On Thu, Jun 23, 2011 at 9:41 AM, Gnarlodious wrote:
> Is there a way to declare a project-wide variable and use that in all
> downstream modules?
>
> -- Gnarlir
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Is there a way to declare a project-wide variable and use that in all
downstream modules?
-- Gnarlir
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
How get all users belongs to a group using python ldap module.
--
http://mail.python.org/mailman/listinfo/python-list
Hi All,
I'm pleased to announce that PyPad (Python environment for iOS) 2.7.1
Update 4 is now available in the iTunes App Store. New in this version
is the ability to create custom modules. Modules can be independent or
can include other user modules to build larger frame works.
Plans for fu
"Waldek M." writes:
> Dnia Thu, 23 Jun 2011 17:22:37 +1000, Ben Finney napisał(a):
> > The ability to re-bind any attribute, even ones which the author
> > thought should be constant, makes writing unit tests much easier. I
> > don't see that putative benefits of constant bindings would be
> > a
Dnia Thu, 23 Jun 2011 17:22:37 +1000, Ben Finney napisał(a):
> If you mean creating a binding which can't be re-bound: −1.
Perhaps. Or perhaps that could be done in some other fashion;
I admit that I usually stick to more strict languages
and while Python's flexibility is great... I'm really missi
mahantesh varavattekar writes:
> i am new to python please help to let me know the syntax for python
> 3.2. with examples.
Welcome!
Please work your way through the Python tutorial from the beginning
http://docs.python.org/release/3.2/tutorial/>. Run each example,
experiment with it to understa
Le 23/06/2011 11:48, mahantesh varavattekar a écrit :
Hi,
i am new to python please help to let me know the syntax for python
3.2. with examples.
and how can i use these things for ranges
http://lmgtfy.com/?q=python+syntax+range+example
Laurent
--
http://mail.python.org/mailman/listinfo/pytho
[Sorry for over-quoting, I am not sure how to trim this properly]
Steven D'Aprano wrote:
> On Thu, 23 Jun 2011 09:30 am Thomas 'PointedEars' Lahn wrote:
>> Mel wrote:
>>> Steven D'Aprano wrote:
I *guess* that what you mean by "writable iterators" is that rebinding
e should change seq in
As a general note concerning the use of Python on Project Euler, and
the one minute guideline.
For problems 1-100, each problem is easily solved in less than 1
minute processing time *if* the algorithms and math is done "right"
and with thought.
My project Euler scripts solves the first 100 probl
Hi,
i am new to python please help to let me know the syntax for python
3.2. with examples.
and how can i use these things for ranges
--
http://mail.python.org/mailman/listinfo/python-list
Re !
> This is because 32-bit processes (Python, 32-bit cmd) cannot see the
> 64-bit DLLs in System32.
Thanks.
You are right... but it is not enought.
This command: echo %PROCESSOR_ARCHITECTURE%
give the statut:
32: x86
64: AMD64
and DIR C:\Windows\System32\SoundRecorder.exe is OK
On Thu, 23 Jun 2011 06:16 pm Gregory Ewing wrote:
> Generally I think some people worry far too much about
> anticipating and catching exceptions. Don't do that,
> just let them happen. If you come across a specific
> exception that it makes sense to catch, then catch
> just that particular one. L
Chris Torek wrote:
Oops! It turns out that os.kill() can raise OverflowError (at
least in this version of Python, not sure what Python 3.x does).
Seems to me that if this happens it indicates a bug in
your code. It only makes sense to pass kill() something
that you know to be the pid of an ex
On 23/06/2011 09:08, Thorsten Kampe wrote:
* Tim Golden (Thu, 23 Jun 2011 08:31:26 +0100)
Certain commands, including "dir" and "copy" are not executables
in their own right, but merely subcommands of cmd.exe.
Right, "internal commands".
You've got two options in Python:
os.system (r"c
* Tim Golden (Thu, 23 Jun 2011 08:31:26 +0100)
>
> Certain commands, including "dir" and "copy" are not executables
> in their own right, but merely subcommands of cmd.exe.
Right, "internal commands".
> You've got two options in Python:
>
>os.system (r"cmd /c dir c:\windows")
os.system aut
On 23/06/2011 06:02, Anurag wrote:
On Jun 22, 7:01 pm, Adam Tauno Williams
wrote:
On Wed, 2011-06-22 at 06:34 -0700, Anurag wrote:
Hi All,
I am working on application which needs to do a authentication against
LDAP, if LDAP not installed then local system account (administrator
user in windo
On 23/06/2011 07:33, Michel Claveau - MVP wrote:
Hi!
(sorry for my bad english...)
On Win 7 64 bits:
Command-Line
CD \Python27
dir C:\Windows\System32\SoundRecorder.exe:==> OK
Python.exe
import os
os.system("dir C:\\Windows\\System32\\SoundRecorder.exe")
==> Do not found t
* Michel Claveau - MVP (Thu, 23 Jun 2011 08:33:20 +0200)
> On Win 7 64 bits:
> Command-Line
> CD \Python27
> dir C:\Windows\System32\SoundRecorder.exe:==> OK
> Python.exe
>
> >>> import os
> >>> os.system("dir C:\\Windows\\System32\\SoundRecorder.exe")
>
> ==> Do not found the file
kkiranmca writes:
> Hi i am new for this version and could please help me .
Welcome!
Don't ask whether you can ask. Just ask.
http://catb.org/~esr/faqs/smart-questions.html>
--
\ “I put contact lenses in my dog's eyes. They had little |
`\ pictures of cats on them. Then I to
"Waldek M." writes:
> Still, I'd reallly like to have constants as a built-in...
If you mean creating a binding which can't be re-bound: −1.
The ability to re-bind any attribute, even ones which the author thought
should be constant, makes writing unit tests much easier. I don't see
that putati
File system paths are a thing you need to take care moving from one OS to other.
Perhaps simplest way to avoid this in windows is install cygwin and enjoy.
Keep your accessible files in directories /var or /home which are common (but
not in something like /cygdrive/c - Cygwin equilvalent of C:) -
On Wed, Jun 22, 2011 at 11:50 PM, kkiranmca wrote:
> Hi i am new for this version and could please help me .
You didn't pose an actual question...
Cheers,
Chris
--
http://mail.python.org/mailman/listinfo/python-list
79 matches
Mail list logo