On Tue, 09 Aug 2005 23:59:26 +0200, cantabile wrote:
> stas a écrit :
>
>> As a reminder, make sure that you install gettext in the namespace
>> of your toplevel module.
[]
> Noticed something :
> I must import test2.py AFTER gettext.install('test1') and even then, if
> test3.py imports test
Here's a module to show stderr output from console-less Python
apps, and stay out of the way otherwise. I plan to make a ASPN
recipe of it, but I thought I'd run it by this group first.
To use it, import the module. That's it. Upon import it will
assign sys.stderr.
In the normal case, your code
richard wrote:
> That's a good idea. Unfortunately, changing the sorting of the classifiers
> will be fun. Could I ask you to submit an RFE "bug" via the link on the
> pypi page?
I'll do that tomorrow morning.
> Yep, this is related to your other comment regarding my 6th point. Also, I
> don't b
The original message was received at Wed, 10 Aug 2005 09:14:22 +0300 from
python.org [82.194.226.158]
- The following addresses had permanent fatal errors -
- Transcript of session follows -
... while talking to python.org.:
>>> DATA
<<< 400-aturner; -RMS-E-CRE, ACP file create
Jeff Schwab wrote:
> I agree that you & I are probably discussing different things, but I
> think this is exactly what the OP was seeking. He said:
>
> > I'm working on a project to implement a simple cross-platform file
> > sharing protocol (using Python) that is similar to HTTP, and I
>
Hmmm--I would also be interested in knowing the answer to this. I get
the exact same behavior as the OP (probably because it's the intended
behavior?)
On Tue, 2005-08-09 at 14:38 -0700, J wrote:
> Hi,
>
>
> I am trying to add new data attributes to my extension classes from
> within a script. I
Jorge Godoy wrote:
> A subtree with version numbers could solve the problem of storing
> information for old versions when a new one is added.
>
> With regards to 4, I'd like to see the "Topic" category in the beginning
> of the page -- this is what most people search, I guess -- and not at the
>
Peter Hansen wrote:
> So while it would probably make an
> interesting project, and I'm pretty sure it's quite feasible, grabbing
> an off the shelf Forth might be a more productive use of your time.
Heh, methinks one might be misunderstanding the Forth culture.
Forth compilers are like poetry, i
Peter Hansen wrote:
> So while it would probably make an
> interesting project, and I'm pretty sure it's quite feasible, grabbing
> an off the shelf Forth might be a more productive use of your time.
Heh, methinks one might be misunderstanding the Forth culture.
Forth compilers are like poetry, i
"Gregory Piñero" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>Ahh, so it's a mutable thing. That makes sense that I can't change a
>mutable object and thus can't affect it outside of the function.
You of course meant immutable, but this is still confused. It is a
name-binding
"Christopher Subich" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
> Dennis Lee Bieber wrote:
>> In a more simplistic view, I'd reverse the phrasing... The name
>> "x" is assigned to the object "y" (implying it is no longer attached to
>> whatever used to have the name)
I agree tha
Bengt Richter wrote:
> On Tue, 09 Aug 2005 21:50:06 -, Grant Edwards <[EMAIL PROTECTED]> wrote:
>
>
>>On 2005-08-09, Scott David Daniels <[EMAIL PROTECTED]> wrote:
>>
>>>Grant Edwards wrote:
>>>
>Ex #1) 333-
>Hex On disk: 00 00 00 80 6a 6e 49 41
>
>Ex #2) 666-
>H
On Wed, 10 Aug 2005 03:47:06 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote:
>On Tue, 09 Aug 2005 21:50:06 -, Grant Edwards <[EMAIL PROTECTED]> wrote:
>
>>On 2005-08-09, Scott David Daniels <[EMAIL PROTECTED]> wrote:
>>> Grant Edwards wrote:
>Ex #1) 333-
>Hex On disk: 00 00 00 80 6
Bryan Olson wrote:
> Jeff Schwab wrote:
> > You don't have to pay Microsoft to develop a Windows-compatible
> > filesystem. See http://ubiqx.org/cifs/.
>
> That's a different usage of "filesystem" than what is at issue
> here.
I agree that you & I are probably discussing different things, but
"Gregory Piñero" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> how references work in Python
'references' are an implementation detail and a metaconcept used to talk
about Python but are not part of the language spec itself.
> when passing arguments into functions?
Python does
On Tuesday 09 August 2005 17:36, Andy Leszczynski
<>
(<[EMAIL PROTECTED]>) wrote:
> wikipedia
>
(http://en.wikipedia.org/wiki/Python_programming_language#Object-oriented_programming)
> says:
> """
> Python's support for object oriented programming paradigm is vast. It
> supports polymorphism [...
I've been needing a module level __getattr__ for some c library
wrapping. This has solved the problem:
# mymod.py:
import sys
from new import module
class ModuleProxy(module):
def __init__( self, name, master ):
module.__init__( self, name )
self._master = master
self.__dict__["__all
Roy Smith <[EMAIL PROTECTED]> wrote:
> I've got a directory where I keep all sorts of little snippets of
> python code for testing. When I start up python in that directory,
> I get the error I reported. It turns out, I've got a file called
> "string.py" in it [...]
>
> something in the help sys
On Tue, 09 Aug 2005 21:50:06 -, Grant Edwards <[EMAIL PROTECTED]> wrote:
>On 2005-08-09, Scott David Daniels <[EMAIL PROTECTED]> wrote:
>> Grant Edwards wrote:
Ex #1) 333-
Hex On disk: 00 00 00 80 6a 6e 49 41
Ex #2) 666-
Hex On disk: 00 00 00 80 6a 6e 59 41
>>>
Roy Smith wrote:
> Mike Meyer <[EMAIL PROTECTED]> wrote:
>> Well, the only thing that subversion does that I'd call bad is leave
>> turds in my development directory. I'm tired of having to tell
>> commands to ignore .svn files. Of course, Perforce is the only source
>> control system I know of th
Roy Smith wrote:
> No, that works fine. But, now I can't even reproduce the error I reported
> earlier (when I try, I get the help message as expected). And, yes, that
> was with a brand new interpreter session. Strange.
Perhaps you were running Python from a directory with a file called
strin
Roy Smith <[EMAIL PROTECTED]> wrote:
> No, that works fine. But, now I can't even reproduce the error I reported
> earlier (when I try, I get the help message as expected). And, yes, that
> was with a brand new interpreter session. Strange.
I got it now! Oh, this is funny.
I've got a directo
"Jeffrey E. Forcier" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thirding the Subversion/SVN suggestions. It's generally a newer, better
> CVS with some new features and a lot less of the negative features/lack
> thereof, of the older system.
For what it is worth, the Python de
In article <[EMAIL PROTECTED]>,
"Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> wrote:
> Roy Smith wrote:
>
> > Traceback (most recent call last):
> > File "", line 1, in ?
> > File "/usr/local/lib/python2.3/site.py", line 307, in call
> > import pydoc
> > File "/usr/local/lib/python2
Mike Meyer <[EMAIL PROTECTED]> wrote:
> Well, the only thing that subversion does that I'd call bad is leave
> turds in my development directory. I'm tired of having to tell
> commands to ignore .svn files. Of course, Perforce is the only source
> control system I know of that doesn't do this.
My
Mike Meyer <[EMAIL PROTECTED]> wrote:
> My current client uses subversion, and I generally wind up cursing at it
> at least once a day.
What makes you curse at it? I've never actually used it, just been
watching the project for several years. I'd be interested to hear your
experiences.
--
ht
Roy Smith wrote:
> Traceback (most recent call last):
> File "", line 1, in ?
> File "/usr/local/lib/python2.3/site.py", line 307, in __call__
> import pydoc
> File "/usr/local/lib/python2.3/pydoc.py", line 49, in ?
> from string import expandtabs, find, join, lower, split, strip,
>
Andy Leszczynski writes:
> Is not LSP more a quality of the desing of class hierachy rather then
> language itslef? Comments?
I do agree that LSP is more a class hierarchy thing than a language thing.
For example, it's easy in Python to write a LSP-violating set of classes:
class base:
de
Can anybody explain this bizarre behavior:
-
Roy-Smiths-Computer:play$ py
Python 2.3.4 (#3, Jun 29 2004, 21:48:03)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> help (isinstance)
foos b
Jeff Schwab wrote:
> You don't have to pay Microsoft to develop a Windows-compatible
> filesystem. See http://ubiqx.org/cifs/.
That's a different usage of "filesystem" than what is at issue
here.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
Jerry He wrote:
> Hi,
> suppose I have the following string
>
> cmdstr = "b = lambda s: s*s"
>
> Is there a way to execute this string other than
> copying it onto a file and then importing it?
>>> exec "b = lambda s: s*s"
>>> b
at 0x4d69cc>
--
http://mail.python.org/mailman/listinfo/p
Mike Meyer wrote:
> Well, the only thing that subversion does that I'd call bad is leave
> turds in my development directory. I'm tired of having to tell
> commands to ignore .svn files. Of course, Perforce is the only source
> control system I know of that doesn't do this.
ClearCase is really goo
Hi,
suppose I have the following string
cmdstr = "b = lambda s: s*s"
Is there a way to execute this string other than
copying it onto a file and then importing it?
thanks in advance,
Jerry
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has
In <[EMAIL PROTECTED]>, François Pinard <[EMAIL PROTECTED]> typed:
> [Mike Meyer]
>
> > [...] I generally wind up cursing at [subversion] at least once a day.
> Would you accept elaborating a bit on the motivations of the cursing?
> Your message says Perforce does nice things, one might fuzzily im
everytime i log in to my email another site keeps popping up. the same site
_
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
--
http://mail
Bryan Olson wrote:
>
> Atila Olah wrote:
> > My question is: How do I implement a virtual partition that acts like a
> > real file-system and is compleatly transparent to other programs?
> > Should I make a virtual file allocation table for a FAT32 partition or
> > simulate an NTFS? Or even fu
[EMAIL PROTECTED] wrote:
> I've heard 2 people complain that word 'global' is confusing.
>
> Perhaps 'modulescope' or 'module' would be better?
>
> Am I the first peope to have thought of this and suggested it?
>
> Is this a candidate for Python 3000 yet?
>
> Chris
After reading though some o
Andy Leszczynski writes:
> wikipedia
> (http://en.wikipedia.org/wiki/Python_programming_language#Object-oriented_programming)
> says:
> """
> Python's support for object oriented programming paradigm is vast. It
> supports polymorphism [...] fully in the Liskov substitution
> principle-sense for a
[Mike Meyer]
> [...] I generally wind up cursing at [subversion] at least once a day.
Would you accept elaborating a bit on the motivations of the cursing?
Your message says Perforce does nice things, one might fuzzily imply
that Subversion is bad or misbehaves on the same, but I do not read any
Why is a MultiFile object not an iterator?
For example if
mfp = multifile.MultiFile(fp)I cannot dofor line in mfp:
do_somethingRelated:MultiFile.next seems badly named.(Something like
next_section would be better.)Is this just historical accident or am I
missing the point?Thanks,Alan Isaac
--
ht
Crap. Forgot to mention that in some instances, I do want the class
definitions to create new instances and such. Sorry :)
--
http://mail.python.org/mailman/listinfo/python-list
Mike Meyer wrote:
> Perforce. it costs money, but it's worth it. My current client uses
> subversion, and I generally wind up cursing at it at least once a
> day. Perforce is much smarter about merges and dealing with
> branches. Also, if you like using Unix tools to do things like search
> your s
I've got multiple instances I want globally available in the secondary
modules, which can't easily be passed around with every function call
without driving me nuts, so I wish to have all variables from the Main
module passed to each of the other modules it creates.
One such example would be in Ma
[EMAIL PROTECTED] writes:
> I was wondering if anyone could make recomendations/comments about CVS
> systems, their experiences and what perhaps the strengths of each.
Perforce. it costs money, but it's worth it. My current client uses
subversion, and I generally wind up cursing at it at least on
sysfault wrote:
> I'm using os.popen() to open that program via the syntax:
> os.popen('pidof var_name', 'r'), but as you know var_name is not
> expanded within single quotes,
os.popen('pidof %s' % var_name, 'r')
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> As far as I know, there is not a prefabbed solution for this problem.
One
> issue that you must solve is the issue of buffering (when must some
data you've
> written to the compressor really go out to the other side) and the
issue of
> what to do when a read() or
ncf wrote:
> Hmm...thanks for the replies. Judging by this, it looks like I might
> still be in a slight perdiciment with doing it all, but time will tell.
> I wish there were a way I could reference across multiple modules.
>
> Well, thanks for your help. Hopefully I'll be able to work out some
>
Just a quick question before I waste time doing something that will
immediately be disregarded as unacceptable code... :)
When using the C API and writing extension modules, how do you normally
pass a structure up into the python module? For instance, if I have a
structure:
typedef struct Foo {
Grant Edwards wrote:
> And I'll guarantee that the difference between 333- and
> 666- has to be more than 1-bit. There's no way that can be
> the correct data unless it's something like an index into a
> different table or a pointer or something along those lines.
Absolutely. I hadn't ev
Jorge Godoy wrote:
> I have created an interface where I have a QDataBrowser and all of its
> editing and navigating controls and one of the displayed controls is in a
> QSpinBox.
>
> I have the navigation from current to next and previous records working
> fine if I only use the data browser con
Hmm...thanks for the replies. Judging by this, it looks like I might
still be in a slight perdiciment with doing it all, but time will tell.
I wish there were a way I could reference across multiple modules.
Well, thanks for your help. Hopefully I'll be able to work out some
*simple* solution for
On 2005-08-09, Christopher Subich <[EMAIL PROTECTED]> wrote:
> Grant Edwards wrote:
>> That would just be sick. I can't imagine anybody on an 8-bit
>> CPU using FP for a phone number.
>
> Nobody on an 8-bit CPU would have a FPU, so I'll guarantee that this is
> done using only 8 or 16-bit (probab
Evil Bastard wrote:
> Paul Rubin wrote:
>> Pick a different language.
>
> Maybe I should clean up my forth compiler instead, and get it ready for
> the prime time.
In searching for an existing Lua virtual machine** for the PIC,
following on my previous posting, I came across several references t
sysfault wrote:
> Hello, I have a function which takes a program name, and I'm using
> os.popen() to open that program via the syntax: os.popen('pidof var_name',
> 'r'), but as you know var_name is not expanded within single quotes, I
> tried using double quotes, and such, but no luck. I was lookin
Atila Olah wrote:
> My question is: How do I implement a virtual partition that acts like a
> real file-system and is compleatly transparent to other programs?
> Should I make a virtual file allocation table for a FAT32 partition or
> simulate an NTFS? Or even further: How do I create a juncti
Hello, I have a function which takes a program name, and I'm using
os.popen() to open that program via the syntax: os.popen('pidof var_name',
'r'), but as you know var_name is not expanded within single quotes, I
tried using double quotes, and such, but no luck. I was looking for a way
to have var_
> I was wondering if anyone could make recomendations/comments
> about CVS systems
Amoung other things the Zeus for Windows programmer's editor/IDE
comes with integrated CVS support:
http://www.zeusedit.com/features.html
> Most of the developement is Python, but some C, Javascript,
> HTML, e
Grant Edwards wrote:
> That would just be sick. I can't imagine anybody on an 8-bit
> CPU using FP for a phone number.
Nobody on an 8-bit CPU would have a FPU, so I'll guarantee that this is
done using only 8 or 16-bit (probably 8) integer math.
--
http://mail.python.org/mailman/listinfo/python
Richard Townsend wrote:
> I've been experimenting putting a reference to a function into a Queue
> object and was wondering what actually gets put in the Queue - is it the
> function's code object?
It's a Python-internal-reference-thingy.
> If I read from the Queue in a different module, it a
wikipedia
(http://en.wikipedia.org/wiki/Python_programming_language#Object-oriented_programming)
says:
"""
Python's support for object oriented programming paradigm is vast. It
supports polymorphism [...] fully in the Liskov substitution
principle-sense for all objects.
"""
Just wondering if
I wrote:
> Make self.counter a semaphore. Untested code:
A little clean-up. Still untested:
import threading
class class1:
def __init__(self):
self.counter = threading.semaphore(0)
result = self.doSomeJob()
def increaseCounter(self):
self.counter.release()
Nodir Gulyamov wrote:
> Hello All!
> I met some strange situation. In MainThread my program wating changes of
> some variable. This variable should be changed in another thread, but loop,
> which wait changing variable blocks all other threads.
> Code below:
>
> class class1:
> def __ini
could ildg wrote:
> I want to know this because I want to zip a directory and all of its
> sub-files and sub-directories to a zip file. zipfile module of python
> will not automatically include the empty directories, so I have to
> check if a dir is empty and do this manually
Can you make work
SPE (Stani's Python Editor) is an open-source python IDE with auto
indentation & completion, call tips, syntax coloring & highlighting,
UML diagrams, class explorer, source index, auto todo list, sticky
notes, pycrust shell, file browsers, drag&drop, context help, Blender
support, ... Spe ships wit
On 2005-08-09, Scott David Daniels <[EMAIL PROTECTED]> wrote:
> Grant Edwards wrote:
>>>Ex #1) 333-
>>>Hex On disk: 00 00 00 80 6a 6e 49 41
>>>
>>>Ex #2) 666-
>>>Hex On disk: 00 00 00 80 6a 6e 59 41
>>
>> So there's only a 1-bit different between the on-disk
>> representation of 333-
stas a écrit :
> As a reminder, make sure that you install gettext in the namespace
> of your toplevel module.
> What I mean is this:
>
> test1.py imports test2.py and test3.py
> test2.py imports test4.py
>
> Now you have to place the gettext.install call in test1.py and
> then the other modules
Martin v. Löwis wrote:
> Nicolas Fleury wrote:
>
>>Well, I'm using the alternatives.
>
> Perhaps not to the full power.
Not perhaps, surely;) Who does anyway;)
> So you don't want to write the makeArrayType function, right?
>
> How about this:
>
> # declaration
> class Array(object):
> __t
Phil Thompson wrote:
>> 2. In the same vein, how does one embed a runtime plot in a qt3 UI ? It
>> will
>> need to be a python solution since I am using python libraries to acquire
>> the data.
>
> Have a look at PyQwt which is a set of Python bindings for the Qt-based
> Qwt plotting library.
>
Hello All!
I met some strange situation. In MainThread my program wating changes of
some variable. This variable should be changed in another thread, but loop,
which wait changing variable blocks all other threads.
Code below:
class class1:
def __init__(self):
self.counter = 0
Hi,
I am trying to add new data attributes to my extension classes from
within a script. I am under the impression that python allows
that implicity
This is the definition of my class
PyTypeObject CmdPlace::PyType =
{
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
Dejan Rodiger said the following on 9.08.2005 23:28:
> [EMAIL PROTECTED] said the following on 9.08.2005 22:45:
>
>>Yes I double checked as I appreciate any help, but that is what is
>>stored on disk.
>>
>>If it helps, we modified Ex#3. to be 777-777-
>>On disk this is now 00 00 10 87 77 F9 Fc
Grant Edwards wrote:
>>Ex #1) 333-
>>Hex On disk: 00 00 00 80 6a 6e 49 41
>>
>>Ex #2) 666-
>>Hex On disk: 00 00 00 80 6a 6e 59 41
>
> So there's only a 1-bit different between the on-disk
> representation of 333- and 666-.
>
> That sounds pretty unlikely. Are you 100% sure you'
[EMAIL PROTECTED] said the following on 9.08.2005 22:45:
> Yes I double checked as I appreciate any help, but that is what is
> stored on disk.
>
> If it helps, we modified Ex#3. to be 777-777-
> On disk this is now 00 00 10 87 77 F9 Fc 41
>
> All the input fields are filled in this new examp
Paul Rubin wrote:
> I don't think you want to do this. Runtime type tags and the overhead
> of checking them on every operation will kill you all by themselves.
> Processors like that haven't been used much as Lisp targets either,
> for the same reasons. Pick a different language.
On thinking ab
Yes I double checked as I appreciate any help, but that is what is
stored on disk.
If it helps, we modified Ex#3. to be 777-777-
On disk this is now 00 00 10 87 77 F9 Fc 41
All the input fields are filled in this new example.
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I managed to compile and install the FileChooser plugin (.so file)
in /usr/share/qt3/plugins/designer and use it in my form in Designer.
Then I tried to use pyuic which generated the .py code from the ui file. An
attempt to execute the python file quits with :
Traceback (most recent call last
On 2005-08-09, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I can posted records as it will take up to much space. But all
> three phone numbers are stored in 8 bytes with null bytes (ie.
> 00) stored in the leading positions (ie. the left hand side)
>
> I do have some more examples;
>
> I have
Michael Hudson wrote:
> [EMAIL PROTECTED] writes:
>
>> On Sat, Aug 06, 2005 at 05:15:22PM -0400, Terry Reedy wrote:
>>> In any case letting developers add new features is part of the price of
>>> getting unpaid bug fixes for free software. But note that PSF does not
>>> make you to upgrade. He
You are correct, that was a typo.
the second example should end in F441.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Dejan Rodiger wrote:
> [EMAIL PROTECTED] said the following on 9.08.2005 19:29:
>
>>Phone 1: 5616864700
>>Hex On Disk: C0DBA8ECF441
>
>
> 5616864700(10)=14ECA8DBC(16)
> 14 EC A8 DB Cleftshift by 4 bits (it will add 0 on last C)
> C0 DB A8 EC 14 00 write bytes from right to left
> C0 DB A8 EC
Gregory Piñero wrote:
> So what if I do want to share a boolean variable like so:
Well, the easiest way is to wrap it in a list:
mybool = [True]
mybool[0] = False
mybool[0] = True
and so on.
Alternately, what is this boolean attached to that's so significant?
Sharing an arbitrary boolean, with
What kinds of illegal date values are you trying to represent? The
reason I ask is that it's not going to be as easy as subclassing
datetime... datetime is implemented in C. and so enforcement of legal
values is going to be in the C code. For the time.h functions, you're
also going to be constra
Dejan Rodiger wrote:
> 8003346488(10)=1DD096038(16)
> 1D D0 96 03 8
> 80 03 96 D0 1D 00
> 80 03 96 d0 fd 41 Add E041
I'm pretty sure that the last full byte is a parity check of some sort.
I still thing that Phone2 (..F1) is a typo and should be 41. Even if
it's not, it could be a more detail
the extension on the files is *.mas but I a pretty sure it is not
relevant. I beleive it used by the application.
I can posted records as it will take up to much space.
But all three phone numbers are stored in 8 bytes with null bytes (ie.
00) stored in the leading positions (ie. the left hand si
[EMAIL PROTECTED] wrote:
> I'm attempting to build Python 2.4.1 on Solaris 10 using gcc 3.4.3. I
> get the following build error:
This is a GCC bug, which I think got fixed in gcc 4.0.1. You can work
around it by removing the definition of _XOPEN_SOURCE, POSIX_SOURCE,
XOPEN_SOURCE_EXTENDED from py
This doesn't work. I'm out of my league here.
--
http://mail.python.org/mailman/listinfo/python-list
Nicolas Fleury wrote:
> Well, I'm using the alternatives.
Perhaps not to the full power.
> __arrayTypes = {}
> def makeArrayType(arg1, arg2=someDefault):
> if (arg1, arg2) in __arrayTypes:
> return __arrayTypes[arg1, arg2]
> renamed_arg1 = arg1
> renamed_arg2 = arg2
> clas
ncf wrote:
> In file A, I have an instance of a class and then I import file B
> (import fileB as fb). In file B, I need to access file A's class
> instance. Is there anyway I can do this? (I hope that was descriptive
> enough :\)
Let's see...
# -- fileA.py
class Test(object): pass
myInstance =
Circular import issues can usually be resolved by moving import
statements into the bodies of functions which aren't executed when the
module itself is imported. Simple example:
fileA.py --
import fileB as fb
foo = 10# we're going to access foo from fileB
fb.do_something_with_foo()
In article <[EMAIL PROTECTED]>,
Paolino <[EMAIL PROTECTED]> wrote:
>
>Why descriptor mechanism doesn't apply to modules?
The real answer: Because Guido doesn't want it to
--
Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/
The way to build large Python applications is
Thanks everyone. I understand now. Everything is a reference, all
that matters is whether I can go inside the "cubbyhole" and change
something. Immutables don't allow this.
So what if I do want to share a boolean variable like so:
sharedbool=True
class cls1:pass
cl=cls1()
cl.sharedbool1=shared
In file A, I have an instance of a class and then I import file B
(import fileB as fb). In file B, I need to access file A's class
instance. Is there anyway I can do this? (I hope that was descriptive
enough :\)
-Wes
--
http://mail.python.org/mailman/listinfo/python-list
In article
<[EMAIL PROTECTED]>,
Michael Hudson <[EMAIL PROTECTED]> wrote:
> Donn Cave <[EMAIL PROTECTED]> writes:
>
> > On the contrary, there are a couple. Ghc is probably the
> > leading implementation these days, and by any reasonable
> > measure, it is serious.
> >
> > Objective CAML is in
> Are you sure you can specify arbitrary arguments to the __new__ method?
> I thought they had to be the class object, the tuple of bases, and the
> dictionary of names.
Nevermind, I think I was imagining metaclasses rather than just regular
overriding of __new__
--
http://mail.python.org/mailma
I think you have to call type.__new__ like this:
def __new__(cls, year, month, day, *args, **kw):
print "new called"
try:
return _datetime.__new__(cls, year, month, day, *args,
**kw)
except ValueError:
return type.__new__(cls, ...)
Are you sure
On Tue, 09 Aug 2005 16:32:31 +0100
N.Davis wrote:
> With single inheritance in C++ or Java, if you wanted to see what a
> method did and it appeared to be inherited, you would simply look in the
> base class's file, and if necessary recurse up the inheritance hierarchy
> until you found the met
[EMAIL PROTECTED] said the following on 9.08.2005 19:29:
> Phone 1: 5616864700
> Hex On Disk: C0DBA8ECF441
5616864700(10)=14ECA8DBC(16)
14 EC A8 DB Cleftshift by 4 bits (it will add 0 on last C)
C0 DB A8 EC 14 00 write bytes from right to left
C0 DB A8 EC F4 41 Add E041
> Phone 1: 8003346488
Christopher Subich wrote:
> Rocco Moretti wrote:
>
>> Variables in Python are names. They aren't the cubbyholes into which
>> you put values, they are sticky notes on the front of the cubby hole.
>
>
> +1 MOTW (Metaphor of the Week)
Thanks, but please note it's not really mine - I've seen it s
Dennis Lee Bieber wrote:
> On Tue, 09 Aug 2005 10:39:29 -0500, Rocco Moretti
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>
>>Change it to "the object referenced by y is assigned to the name of x",
>>and you're closer to the truth.
>
> In a more simplistic view, I'
[EMAIL PROTECTED] said the following on 9.08.2005 19:29:
> We are working on a data file reader and extraction tool for an old
> MS-DOS accounting system dating back to the mid 80's.
Could you tell us what is the extension of those files?
Could you post full 5-10 records (ASCII + HEX)?
--
Dejan
1 - 100 of 163 matches
Mail list logo