Inflex scan report [020220054666]

2005-02-02 Thread victor
Administrator Email Reply Address: victor Email sent to: [EMAIL PROTECTED] Inflex ID: 020220054666 Report Details --- AntiVirus Results... 00:03 _headers_ 00:03 text.zip 00:03 Text.bat >>> Virus 'W32/MyDoom-O' found in file >&g

PDF with nonLatin-1 characters

2006-07-12 Thread victor
I want to generate a report and the PDF fits perfectly. Though there is an issue of using different encoding in the doc. I tried PyPS with no success. I need a lib that can make PDFs with an arbitrary set of fonts (possibly embed them into the document). What would you suggest? -- http://mail.

Re: how to stop python

2006-07-31 Thread victor
or if u want explicit exit of program then use: import sys sys.exit(1) or raise SystemExit, 'message' Dan wrote: > bruce bedouglas at earthlink.net posted: > > > perl has the concept of "die". does python have anything > > similar. how can a python app be stopped? > > I see this sort of state

Python - forking an external process?

2013-07-02 Thread Victor Hooi
, then exit. What's the idiomatic way of doing this within Python? Is it possible to do with Subprocess? Cheers, Victor (I did see this SO post - http://stackoverflow.com/questions/6011235/run-a-program-from-python-and-have-it-continue-to-run-after-the-script-is-kille, but it's a bit ol

Re: Python - forking an external process?

2013-07-02 Thread Victor Hooi
Also, what's this improvement you mentioned? Cheers, Victor On Wednesday, 3 July 2013 13:59:19 UTC+10, rusi wrote: > On Wednesday, July 3, 2013 9:17:29 AM UTC+5:30, Victor Hooi wrote: > > > Hi, > > > > > > I have a Python script where I want to run fork and

Re: how to insert random error in a programming

2012-10-15 Thread Victor Stinner
Try fuzzing. Examples: http://pypi.python.org/pypi/fusil/ http://peachfuzzer.com/ Victor -- http://mail.python.org/mailman/listinfo/python-list

Creating different classes dynamically?

2012-12-09 Thread Victor Hooi
'DogRootTag': DogConfigurationParser(), 'CatRootTag': CatConfigurationParser(), } Cheers, Victor -- http://mail.python.org/mailman/listinfo/python-list

TypeError: 'in ' requires string as left operand, not Element

2012-12-09 Thread Victor Hooi
marketlink_configfiles() File "foo.py", line 83, in bar with open(os.path.join(root, file), 'r') as f: File "C:\Python27\lib\ntpath.py", line 97, in join if path[-1] in "/\\": TypeError: 'in ' requires string as left operand, not Element Cheers, Victor -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeError: 'in ' requires string as left operand, not Element

2012-12-09 Thread Victor Hooi
Hi, Ignore me - PEBKAC...lol. I used "root" both for the os.walk, and also for the root XML element. Thanks anyhow =). Cheers, Victor On Monday, 10 December 2012 11:52:34 UTC+11, Victor Hooi wrote: > Hi, > > > > I'm getting a strange error w

Re: Creating different classes dynamically?

2012-12-09 Thread Victor Hooi
heya, Dave: Ahah, thanks =). You're right, my terminology was off, I want to dynamically *instantiate*, not create new classes. And yes, removing the brackets worked =). Cheers, Victor On Monday, 10 December 2012 11:53:30 UTC+11, Dave Angel wrote: > On 12/09/2012 07:35 PM, Victor Ho

Using regexes versus "in" membership test?

2012-12-12 Thread Victor Hooi
st the brief mention here - http://docs.python.org/2/reference/expressions.html#not-in ) Would I be substantially better off using a list of strings and using "in" against each line, then using a second pass of regex only on the matched lines? (Log files are compressed, I'm actually using bz2 to read them in, uncompressed size is around 40-50 Gb). Cheers, Victor -- http://mail.python.org/mailman/listinfo/python-list

Re: Using regexes versus "in" membership test?

2012-12-12 Thread Victor Hooi
g-level, module, function etc - and possibly the tag-value pairs? And yes, based on what you said, I probably will use the "in" loop first outside the regex - the lines I'm searching for are fairly few compared to the overall log size. Cheers, Victor On Thursday, 13 December 2012

Re: Using regexes versus "in" membership test?

2012-12-12 Thread Victor Hooi
x27;s definitely better to do it that way. However, I'd still like to fix up the regex, or fix any glaring issues with it as well. Cheers, Victor On Thursday, 13 December 2012 17:19:57 UTC+11, Chris Angelico wrote: > On Thu, Dec 13, 2012 at 5:10 PM, Victor Hooi wrote: > > >

Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Victor Hooi
s I set 6 and 7 to - is that because the earlier elements are set? How should I properly omit them? Is this all documented somewhere? What is the minimum I need to specify? And what happens to the fields I don't specify? Cheers, Victor -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.realpath(path) bug on win7 ?

2013-01-06 Thread Victor Stinner
It looks like the following issue: http://bugs.python.org/issue14094 Victor Le 6 janv. 2013 07:59, "iMath" <2281570...@qq.com> a écrit : > os.path.realpath(path) bug on win7 ? > > Temp.link is a Symbolic link > Its target location is C:\test\test1 > But > >&

Searching through two logfiles in parallel?

2013-01-07 Thread Victor Hooi
ed message, and then just try to resync to the next sent message. Is there a Pythonic way, or some kind of idiom that I can use to approach this problem? Cheers, Victor -- http://mail.python.org/mailman/listinfo/python-list

Re: Searching through two logfiles in parallel?

2013-01-07 Thread Victor Hooi
line, which happens to be 5:00:12. In reality, I'd need to handle missing messages in logfile2, but that's the general idea. Does that make sense? (There's also a chance I've misunderstood your buf code, and it does do this - in that case, I apologies - is there any chance you

// compile python core //

2011-06-25 Thread victor lucio
Hi I would like to know how to compile the python core. I am going to remove some modules of it to have a thin python. Where could I find further information about it? I would be grateful for your suggestions Waldemar -- http://mail.python.org/mailman/listinfo/python-list

Embedding a thin python

2011-07-04 Thread victor lucio
Hi All, I would like to remove some modules for embedding a thin python. how to do that? I would be grateful for your suggestions -- http://mail.python.org/mailman/listinfo/python-list

Argparse, and linking to methods in Subclasses

2011-07-17 Thread Victor Hooi
class, then call the operation method inside of that. Any ideas of how I could achieve the above? Perhaps a different design pattern for Servers? Or a way to use argparse in this situation? Thanks, Victor -- http://mail.python.org/mailman/listinfo/python-list

Using argparse to call method in various Classes?

2011-07-17 Thread Victor Hooi
of the appropriate Server class, then call the operation method inside of that - not a generic check/build/configure module Any ideas of how I could achieve the above? Perhaps a different design pattern for Servers? Or any way to mould argparse to work with this? Thanks, Victor -- http://mail.python.org/mailman/listinfo/python-list

// about building python //

2011-07-21 Thread victor lucio
Hi All, I'd like to embbed a thin python in one application of mine i'm developing so I need to know the module dependencies because I'm going to remove some modules. I also need to know the best way to rebuild the python core once these modules have been removed. So, could you provide me some po

Re: Trying to learn about metaclasses

2011-07-25 Thread Victor Khangulov
of Python where these rule are different or if there is a more correct way to achieve this. I will follow this discussion to see if someone has a better answer. -victor -- http://mail.python.org/mailman/listinfo/python-list

Can Epydoc be used to document decorated function in Python?

2011-07-28 Thread Victor Khangulov
o description. I am using Epydoc v3.0.1. Thanks -victor -- http://mail.python.org/mailman/listinfo/python-list

Communicating from Flash to Python

2011-03-03 Thread Victor Subervi
Hi; I have an AS3 script that is supposed to communicate with a python script and I don't think it is. The python script is to email. How can I trouble-shoot this? Beno -- http://mail.python.org/mailman/listinfo/python-list

Re: Communicating from Flash to Python

2011-03-04 Thread Victor Subervi
On Fri, Mar 4, 2011 at 2:57 AM, Godson Gera wrote: > You can use PyAMF http://pyamf.org > Thanks! Beno -- http://mail.python.org/mailman/listinfo/python-list

Absolutely Insane Problem with Gmail

2011-03-05 Thread Victor Subervi
Hi; I have this code: #!/usr/bin/python import sys, os, string import cgitb; cgitb.enable() import cgi cwd = os.getcwd() dirs = string.split(cwd, '/') dirs = dirs[1:-1] backLevel = '/' + string.join(dirs, '/') sys.path.append(cwd) sys.path.append(backLevel) import string form = cgi.FieldStorage()

Re: Absolutely Insane Problem with Gmail

2011-03-06 Thread Victor Subervi
On Sat, Mar 5, 2011 at 11:11 PM, Littlefield, Tyler wrote: > >ourEmail = ' > myemaila...@gmail.com' > > >ourEmail = ' > q...@xxx.com' > > You redefine this twice. > Right. The second definition, of course, overwrites the first. That is deliberate. I simply comment out the second when I'm testin

How Translate This PHP

2011-03-06 Thread Victor Subervi
Hi; How do I translate this PHP code? if($ok){ echo "returnValue=1"; }else{ echo "returnValue=0"; } In other words, when the email successfully sends, send back both the name of the variable and its value. TIA, Beno -- http://mail.python.org/mailman/listinfo/python-list

Re: How Translate This PHP

2011-03-06 Thread Victor Subervi
On Sun, Mar 6, 2011 at 10:53 AM, Noah Hall wrote: > On Sun, Mar 6, 2011 at 2:45 PM, Victor Subervi > wrote: > > Hi; > > How do I translate this PHP code? > > > > if($ok){ > > echo "returnValue=1"; > > }else{ > > echo &qu

changing to function what works like a function

2011-03-07 Thread Victor Paraschiv
Hi everyone i understood that the goal of Python is to make programing easy (of course, powerful at the same time). I think one way to do it is to eliminate unnecessary syntax exceptions. One is the following: for a complex number "z", to get the real and imaginary  part, you type:  "z.real" and

strange behaviour with while-else statement

2011-03-07 Thread Victor Paraschiv
rror: unindent does not match any outer indentation level >>> The only way I noticed it would accept is to set the last "print" statement directly under/in the block of "while": which is not the intention. (According to the docs, while statement should work witho

Re: changing to function what works like a function

2011-03-07 Thread Victor Paraschiv
Well, thank you all for being honest ☺   What I conclude is that you, the programmers, don’t really care about those who are new to programming: for most people out of the programming world, I think it is simpler to be able to write: real(z), just as you write: sin(z), abs(z), (z)^2 etc.

Re: How Translate This PHP

2011-03-09 Thread Victor Subervi
On Sun, Mar 6, 2011 at 12:00 PM, Noah Hall wrote: > On Sun, Mar 6, 2011 at 3:11 PM, Victor Subervi > wrote: > > Ah. I thought I had to "return" something! > > Well, based on what you asked, you would've, but based on the code, > all it was doing is printing

Re: Don't Want Visitor To See Nuttin'

2011-03-10 Thread Victor Subervi
On Wed, Mar 9, 2011 at 5:33 PM, Ian wrote: > On 09/03/2011 21:01, Victor Subervi wrote: > >> The problem is that it prints "Content-Type: text/html" to the screen >> > If you can see what is intended to be a header, then it follows that you > are not sendi

Re: Don't Want Visitor To See Nuttin'

2011-03-10 Thread Victor Subervi
On Thu, Mar 10, 2011 at 8:50 PM, Benjamin Kaplan wrote: > > print "Content-Type: text/html" > > print > > print ''' > > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> > > > > > > > > and this has worked in the past, so I'm surprised it doesn't work here. > > Don't understan

Re: Don't Want Visitor To See Nuttin'

2011-03-11 Thread Victor Subervi
On Fri, Mar 11, 2011 at 3:54 AM, Ian Kelly wrote: > On Wed, Mar 9, 2011 at 2:01 PM, Victor Subervi > wrote: > > Maya 2012: Transform At the Source > > Yow. You're designing a Maya 2012 website to help some travel company > bilk gullible people out of thousands of do

Re: Don't Want Visitor To See Nuttin'

2011-03-11 Thread Victor Subervi
On Fri, Mar 11, 2011 at 4:26 AM, Dennis Lee Bieber wrote: > On Thu, 10 Mar 2011 18:00:10 -0800 (PST), alex23 > declaimed the following in gmane.comp.python.general: > > > He's comp.lang.python's version of Sisyphus. Or maybe Sisyphus' > > boulder...I forget where I was going with this. > >

I don't understand generator.send()

2011-05-14 Thread Victor Eijkhout
n? In my code I was hoping to get 0,1,2,3,4,5,2,6,7 as yield expressions. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu -- http://mail.python.org/mailman/listinfo/python-list

Re: I don't understand generator.send()

2011-05-14 Thread Victor Eijkhout
sent is not None: > yield None # This becomes the return value from gen.send() > yield sent # This is the next value yielded >i += 1 I think this will serve my purposes. Thanks everyone for broadening my understanding of generators. Victor. -- Victor

Re: English Idiom in Unix: Directory Recursively

2011-05-18 Thread Victor Eijkhout
Harrison Hill wrote: > No need - I have the Dictionary definition of recursion here: > > Recursion: (N). See recursion. If you tell a joke, you have to tell it right. Recursion: (N). See recursion. See also tail recursion. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu

Package containing C sources

2018-01-30 Thread Victor Porton
I am going to create a Python wrapper around a generally useful C library. So the wrapper needs to contain some C code to glue them together. Can I upload a package containing C sources to PyPi? If not, what is the proper way to distribute it? -- Victor Porton - http://portonvictor.org

Re: Package containing C sources (Posting On Python-List Prohibited)

2018-01-30 Thread Victor Porton
Lawrence D’Oliveiro wrote: > On Wednesday, January 31, 2018 at 6:13:00 PM UTC+13, Victor Porton wrote: >> I am going to create a Python wrapper around a generally useful C >> library. So the wrapper needs to contain some C code to glue them >> together. > > Not neces

Handle SIGINT in C and Python

2018-01-31 Thread Victor Porton
dler). Is this possible? How? -- Victor Porton - http://portonvictor.org -- https://mail.python.org/mailman/listinfo/python-list

Re: Handle SIGINT in C and Python

2018-01-31 Thread Victor Porton
Victor Porton wrote: > I need to assign a real C signal handler to SIGINT. > > This handler may be called during poll() waiting for data. For this reason > I cannot use Python signals because "A Python signal handler does not get > executed inside the low-level (C) signal h

Re: Handle SIGINT in C and Python (Posting On Python-List Prohibited)

2018-01-31 Thread Victor Porton
Lawrence D’Oliveiro wrote: > On Wednesday, January 31, 2018 at 8:58:18 PM UTC+13, Victor Porton wrote: >> For this reason I >> cannot use Python signals because "A Python signal handler does not get >> executed inside the low-level (C) signal handler. Instead, the low-le

Help to debug my free library

2018-01-31 Thread Victor Porton
Traceback (most recent call last): Segmentation fault (here libcomcom.so is installed in /usr/local/lib) -- Victor Porton - http://portonvictor.org -- https://mail.python.org/mailman/listinfo/python-list

Re: Handle SIGINT in C and Python (Posting On Python-List Prohibited)

2018-01-31 Thread Victor Porton
Lawrence D’Oliveiro wrote: > On Wednesday, January 31, 2018 at 9:55:45 PM UTC+13, Victor Porton wrote: >> Lawrence D’Oliveiro wrote: >> >>> On Wednesday, January 31, 2018 at 8:58:18 PM UTC+13, Victor Porton >>> wrote: >>>> For this reason I >>&g

Re: Help to debug my free library

2018-01-31 Thread Victor Porton
Chris Angelico wrote: > On Thu, Feb 1, 2018 at 5:58 AM, Victor Porton wrote: >> LibComCom is a C library which passes a string as stdin of an OS command >> and stores its stdout in another string. > > Something like the built-in subprocess module does? I was going to

Re: Help to debug my free library

2018-01-31 Thread Victor Porton
wxjmfa...@gmail.com wrote: > Le mercredi 31 janvier 2018 20:13:06 UTC+1, Chris Angelico a écrit : >> On Thu, Feb 1, 2018 at 5:58 AM, Victor Porton wrote: >> > LibComCom is a C library which passes a string as stdin of an OS >> > command and stores its stdout in anoth

Re: Help to debug my free library

2018-01-31 Thread Victor Porton
Dennis Lee Bieber wrote: > On Wed, 31 Jan 2018 20:58:56 +0200, Victor Porton > declaimed the following: > >>LibComCom is a C library which passes a string as stdin of an OS command >>and stores its stdout in another string. >> >>I wrote this library recen

Re: Handle SIGINT in C and Python (Posting On Python-List Prohibited)

2018-01-31 Thread Victor Porton
Lawrence D’Oliveiro wrote: > On Thursday, February 1, 2018 at 8:10:24 AM UTC+13, Victor Porton wrote: >> Lawrence D’Oliveiro wrote: >> >>> The usual behaviour for POSIX is that the call is aborted with EINTR >>> after you get the signal. >> >> T

Re: Handle SIGINT in C and Python (Posting On Python-List Prohibited)

2018-01-31 Thread Victor Porton
Lawrence D’Oliveiro wrote: > On Thursday, February 1, 2018 at 5:57:58 PM UTC+13, Victor Porton wrote: >> I meant to call poll() from C code, not Python code. > > Do you need to use C code at all? Python is quite capable of handling this > <https://docs.python.org/3/lib

Dependency injection: overriding defaults

2018-01-31 Thread Victor Porton
library. For the server, the log should go to a file (not to stderr). Question: How to profoundly make my software to use the appropriate logger, dependently on whether it is a command line utility or the daemon? -- Victor Porton - http://portonvictor.org -- https://mail.python.org/mailman

Object-oriented gettext

2018-01-31 Thread Victor Porton
above example). What is the best way to do this? Should I write an object-oriented wrapper around gettext package? -- Victor Porton - http://portonvictor.org -- https://mail.python.org/mailman/listinfo/python-list

Advice on where to define dependency injection providers

2018-01-31 Thread Victor Porton
ecution_context_build, or maybe in something like xmlboiler.core.providers.execution_context? -- Victor Porton - http://portonvictor.org -- https://mail.python.org/mailman/listinfo/python-list

Re: Object-oriented gettext

2018-01-31 Thread Victor Porton
Victor Porton wrote: > I want to write a multiuser application which uses multiple languages (one > language for logging and a language per user). > > https://docs.python.org/3/library/gettext.html describes a procedural > gettext interface. The language needs to be switched befo

Re: Dependency injection: overriding defaults

2018-02-01 Thread Victor Porton
dieter wrote: > Victor Porton writes: > >> I am writing a library, a command line utility which uses the library, >> and a I am going to use dependency_injector package. >> >> Consider loggers: >> >> For the core library the logger should default to

$srcdir and $datadir

2018-02-08 Thread Victor Porton
In GNU software written in C $srcdir and $datadir are accessible to C code through generated config.h file. What is the right way to config directories for a Python program? -- Victor Porton - http://portonvictor.org -- https://mail.python.org/mailman/listinfo/python-list

Re: $srcdir and $datadir

2018-02-10 Thread Victor Porton
First, I've already solved my problem using setuptools and pkg_resources.resource_stream() and an environment variable to specify the path to data files. Ben Finney wrote: > Victor Porton writes: > >> In GNU software written in C $srcdir and $datadir are accessible to

What is more Pythonic: subclass or adding functionality to base class?

2018-02-11 Thread Victor Porton
e objects of this class. What is more pythonic? 1. Create its subclass PredicateParserWithError and add the additional field on_error to this class. 2. Add on_error field to the base class, setting it to None by default, if the class's user does not need this field. -- Victor Porton

Found a problem

2021-03-09 Thread Victor Dib
Olá, comunidade do Python! Meu nome é Victor Dib, e sou um estudante brasileiro de programação. Já entrei em contato com vocês hoje, e vocês solicitaram que eu me inscrevesse na lista de e-mails de vocês primeiro. Bom, isso já foi feito, então espero que agora vocês possam dar atenção ao meu

Two variants of class hierachy

2016-11-19 Thread Victor Porton
# diamonds: class A(BitBucketHierarchyLevel, HierarchyLevelWithPagination): ... class B(BitBucketHierarchyLevel, HierarchyLevelWithShortList): ... -- Victor Porton - http://portonvictor.org -- https://mail.python.org/mailman/listinfo/python-list

C3 MRO

2016-11-19 Thread Victor Porton
Do I understand correctly, than C3 applies to particular methods, and thus it does not fail, if it works for every defined method, even if it can fail after addition of a new method? Also, at which point it fails: at definition of a class or at calling a particular "wrong" method?

Re: Two variants of class hierachy

2016-11-19 Thread Victor Porton
Peter Otten wrote: > Victor Porton wrote: > >> I am developing software which shows hierarchical information (tree), >> including issues and comments from BitBucket (comments are sub-nodes of >> issues, thus it forms a tree). >> >> There are two kinds of

Extra base class in hierarchy

2016-11-19 Thread Victor Porton
... -- Victor Porton - http://portonvictor.org -- https://mail.python.org/mailman/listinfo/python-list

Which of two variants of code is better?

2016-11-21 Thread Victor Porton
nt)] obj = construct_subobject(repository, list) (`construct_subobject` is to be defined in such as way that "1" and "2" do the same.) Would you advise me to make such function construct_subobject function or just to use the direct coding as in "1"? -- Victor Porton -

Re: Which of two variants of code is better?

2016-11-21 Thread Victor Porton
Ned Batchelder wrote: > On Monday, November 21, 2016 at 12:48:25 PM UTC-5, Victor Porton wrote: >> Which of two variants of code to construct an "issue comment" object >> (about BitBucket issue comments) is better? >> >> 1. >> >> obj = IssueCo

Re: Python for WEB-page !?

2017-01-05 Thread Victor Porton
t. Consider PyPi. I never used it, but they say, it is faster than usual CPython interpreter. > I waiting with higher interest your feedback. > > Thanks to all members of community for support and advice. > Keep in touch. > Kind regards. -- Victor Porton - http://portonvictor.org --

Re: Python for WEB-page !?

2017-01-06 Thread Victor Porton
t. Consider PyPi. I never used it, but they say, it is faster than usual CPython interpreter. > I waiting with higher interest your feedback. > > Thanks to all members of community for support and advice. > Keep in touch. > Kind regards. -- Victor Porton - http://portonvictor.org --

Recommended format for --log-level option

2018-09-24 Thread Victor Porton
What is the recommended format for --log-level (or --loglevel?) command line option? Is it a number or NOTSET|DEBUG|INFO|WARNING|ERROR|CRITICAL? Or should I accept both numbers and these string constants? -- Victor Porton - http://portonvictor.org -- https://mail.python.org/mailman/listinfo

The next major Python version will be Python 8

2016-03-31 Thread Victor Stinner
d yet. Hopefully, trying to import any module of the standard library fails. Don't hesitate to propose more ideas to make Python 8 more incompatible with Python 3! Note: The change is already effective in the default branch of Python: https://hg.python.org/cpython/rev/9aedec2dbc01 Have fun, Victor -- https://mail.python.org/mailman/listinfo/python-list

Language improvement: Get more from the `for .. else` clause

2016-06-26 Thread Victor Savu
proof-of-concept implementation: repository: https://github.com/Victor-Savu/cpython branch: feat/else_capture Dear members of the Python list, I am writing to discuss and get the community's opinion on the following two ideas: 1. Capture the `StopIteration.value` in the `else` c

Re: "for/while ... break(by any means) ... else" make sense?

2016-06-29 Thread Victor Savu
There are many posts trying to explain the else after for or while. Here is my take on it: There are three ways of getting out of a (for/while) loop: throw, break or the iterator gets exhausted. The question is, how cab we tell which way we exited? For the throw, we have the except clause. This le

Re: Language improvement: Get more from the `for .. else` clause

2016-06-29 Thread Victor Savu
interested in a more concrete case such as a domain-specific application (I can think of progress bars, logging, transfer rate statistics ...). Best, VS On Mon, Jun 27, 2016 at 5:06 PM, Michael Selik wrote: > On Mon, Jun 27, 2016 at 12:53 AM Victor Savu < > victor.nicolae.s...@gmail.c

Idle not opening

2020-05-06 Thread Rance Victor
Hey there, After successfully installing Python 3.8.2(64 bit) on my system(windows 10 64 bit OS), my idle is not opening. I've tried uninstalling and reinstalling it again but still the same result. Looking forward to a fix please. Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: Metaclasses, decorators, and synchronization

2005-09-25 Thread Victor Ng
You could do it with a metaclass, but I think that's probably overkill. It's not really efficient as it's doing test/set of an RLock all the time, but hey - you didn't ask for efficient. :) 1 import threading 2 3 def synchronized(func): 4 def innerMethod(self, *args,

Re: Metaclasses, decorators, and synchronization

2005-09-25 Thread Victor Ng
Hmmm well that's obvious enough.  This is why I shouldn't write code off the cuff on c.l.p :)OTOH - if I just assign the RLock in the base classes initializer, is there any problem?vic On 9/26/05, Jp Calderone <[EMAIL PROTECTED]> wrote: On Sun, 25 Sep 2005 23:30:21 -0400, V

Re: calling a dylib in python on OS X

2005-10-23 Thread Victor Ng
You can use Pyrex which will generate a C module for you. vic On 22 Oct 2005 23:40:17 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi > > Is there something similar to python's windll for calling DLLs on win32 > but meant for calling dylib's on OS X? > > thanks, > > r.s. > > -- > http://

Re: python gui using boa

2005-11-23 Thread Brian Victor
ash wrote: > Thanks Steve, i found out the solution to the problem. but a good > tutorial on sizers is still missing. Try this article I wrote a while back. It should at least help you get started. The code samples are written in C++, but they are trivially translated to python. (Change -> to

Re: python gui using boa

2005-11-24 Thread Brian Victor
ash wrote: > I have another query for you - how can i make a captionless frame > draggable in wxWindows? If you look at the wxPython demo, there's a Shaped Window demo under Miscellaneous that does this. The key portion is on line 86 in my version: #v+ def OnMouseMove(self, evt): if evt.Drag

Re: Wheel-reinvention with Python

2005-08-15 Thread Brian Victor
[EMAIL PROTECTED] wrote: > Torsten Bronger wrote: >> I've been having a closer look at wxPython which is not Pythonic at >> all and bad documented. Probably I'll use it nevertheless. > Aye. Couldn't agree more. You know, whenever someone mentions wxPython being badly documented, I have to wonder

Re: [newbie]search string in tuples

2005-08-20 Thread Brian Victor
Viper Jack wrote: > but i want check on several object inside the tuple so i'm trying this: > > list=["airplane","car","boat"] Note that this is actually a list, not a tuple as your subject suggests. For the difference, take a look at this: http://www.python.org/doc/faq/general.html#why-are-there-

Re: Sizers VS window size

2005-02-22 Thread Brian Victor
Deltones wrote: > However, if I add this part from the tutorial, I get a much smaller > window. Why is there an interference with the result I want when > adding the sizer code? [snip] > self.sizer.Fit(self) As noted in the the docs for Fit(): "Tell the sizer to resize the window to match the size

Is there way to determine which class a method is bound to?

2005-02-25 Thread Victor Ng
I'm doing some evil things in Python and I would find it useful to determine which class a method is bound to when I'm given a method pointer. For example: class Foo(object): def somemeth(self): return 42 class Bar(Foo): def othermethod(self): return 42 Is there some wa

Re: Is there way to determine which class a method is bound to?

2005-02-25 Thread Victor Ng
No - that doesn't work, im_class gives me the current class - in the case of inheritance, I'd like to get the super class which provides 'bar'. I suppose I could walk the __bases__ to find the method using the search routine outlined in: http://www.python.org/2.2/descrintro.html but I was hoping

Re: Is there way to determine which class a method is bound to?

2005-02-25 Thread Victor Ng
Awesome! I didn't see the getmro function in inspect - that'll do the trick for me. I should be able to just look up the methodname in each of the class's __dict__ attributes. vic On Fri, 25 Feb 2005 16:29:25 +0100, Peter Otten <[EMAIL PROTECTED]> wrote: > Victor Ng

Re: Is there way to determine which class a method is bound to?

2005-03-04 Thread Victor Ng
So I went digging through the documentation more and found the following: http://docs.python.org/ref/types.html There's a section titled "User-defined methods" which covers all the im_self, im_class attributes and what they are responsible for. vic On 25 Feb 2005 10:42:06 -0800, [EMAIL PROTECTE

Preserving the argspec of a function after generating a closure

2005-03-11 Thread Victor Ng
Is there a way to preserve the argspec of a function after wrapping it in a closure? I'm looking for a general way to say "wrap function F in a closure", such that inspect.getargspec on the closure would return the same (args, varargs, varkw, defaults) tuple ass the enclosed function. The typica

Where to handle try-except - close to the statement, or in outer loop?

2013-11-11 Thread Victor Hooi
xception? Can anybody recommend any good examples that show current best practices for exception handling, for programs with moderate complexity? (i.e. anything more than the examples in the tutorial, basically). Cheers, Victor -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] Unicode stdin/stdout

2013-11-18 Thread Victor Stinner
Why do you need to force the UTF-8 encoding? Your locale is not correctly configured? It's better to set PYTHONIOENCODING rather than replacing sys.stdout/stderr at runtime. There is an open issue to add a TextIOWrapper.set_encoding() method: http://bugs.python.org/issue15216 Victor --

Using try-catch to handle multiple possible file types?

2013-11-18 Thread Victor Hooi
which wraps libmagic, or I can just rely on file extensions). Other thoughts? Cheers, Victor -- https://mail.python.org/mailman/listinfo/python-list

Re: Using try-catch to handle multiple possible file types?

2013-11-19 Thread Victor Hooi
quot;, from Unix, last modified: Wed Nov 20 10:48:35 2013 I suppose it's enough to just do a? if "gzip compressed data" in results: or is there a better way? Cheers, Victor On Tuesday, 19 November 2013 20:36:47 UTC+11, Mark Lawrence wrote: > On 19/11/2013 07:13, Victor Hoo

Understanding relative imports in package - and running pytest with relative imports?

2013-11-24 Thread Victor Hooi
(Above is just an extract). Assuming I use pytest, where should my tests be in the directory structure, and how should I be running them? Cheers, Victor -- https://mail.python.org/mailman/listinfo/python-list

Python String Formatting - passing both a dict and string to .format()

2013-11-26 Thread Victor Hooi
at(my_dict, foo) "ernie lorem ipsum spot" I'm curious - why does this work? Why don't the dictionary keys need quotes around them, like when you normally access a dict's elements? Also, is this the best practice to pass both a dict and string to .format()? Or is there another way that avoids needing to use positional indices? ({0}, {1} etc.) Cheers, Victor -- https://mail.python.org/mailman/listinfo/python-list

Python and PEP8 - Recommendations on breaking up long lines?

2013-11-27 Thread Victor Hooi
t I can't seem to put in line-breaks inside the comment without triggering a warning. For example, trying to put in another empty line in between lines 6 and 7 above causes a warning. Also, how would I split up the long URLs? Breaking it up makes it annoying to use the URL. Thoughts? Cheers, Victor -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and PEP8 - Recommendations on breaking up long lines?

2013-11-27 Thread Victor Hooi
h.join(root, file)[:-3] not in previously_processed_files: In this case, the 80-character mark is actually partway through "previously processed files" (the first occurrence)... Cheers, Victor On Thursday, 28 November 2013 12:57:13 UTC+11, Victor Hooi wrote: > Hi, > > > > I'm running p

Re: [Python-Dev] [RELEASED] Python 3.4.0 release candidate 1

2014-02-11 Thread Victor Stinner
Hi, It would be nice to give also the link to the whole changelog in your emails and on the website: http://docs.python.org/3.4/whatsnew/changelog.html Congrats for your RC1 release :-) It's always hard to make developers stop addings "new minor" changes before the final vers

Re: [Python-ideas] How the heck does async/await work in Python 3.5

2016-02-24 Thread Victor Stinner
See also Doug Hellmann article on asyncio, from its serie of "Python 3 Module of the Week" articles: https://pymotw.com/3/asyncio/index.html Victor 2016-02-23 22:25 GMT+01:00 Joao S. O. Bueno : > Today I also stumbled on this helpful "essay" from Brett Cannon about >

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Victor Stinner
pika. I read "Pika Python AMQP Client Library". You may take a look at https://github.com/dzen/aioamqp if you would like to play with asyncio. > With those ones ported switching to Python 3 *right now* is not only > possible and relatively easy, but also convenient. Victor --

  1   2   3   4   5   6   7   8   >