Embedding: Is it possible to limit number of virtual instructions executed?

2008-10-31 Thread juliangrendell
Hi experts- I have a potential use case of embedding Python where it must co- operate with the host c/c++ application in a single thread. That is, the c code and python interpreter need to cooperate and time share, or yield to each other. The main loop would need to do something like: check for

Re: Windows DOS box redirection

2008-10-31 Thread Glenn Linderman
On approximately 10/31/2008 9:22 PM, came the following characters from the keyboard of Dennis Lee Bieber: On Fri, 31 Oct 2008 12:14:36 -0700, Glenn Linderman <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: A little bit ago, I wrote: Creating the registry setting menti

Re: Function Memory Usage

2008-10-31 Thread Terry Reedy
Paulo J. Matos wrote: Hi all, What's the best way to know the amount of memory allocated by a function What do you count? def zeros(n): return [0]*n how much memory is that? -- http://mail.python.org/mailman/listinfo/python-list

remote unzip

2008-10-31 Thread morecowbell
greetings, i got a bunch of zip files on a remote server and need to get to one of the files, an xml file, in each of the archives. fairly simple to do locally with zipfile but i don't seem to be able to combine that local code with the paramiko sftp client. a rather simplified code snippet to il

Re: tcl/tk version confusion with tkinter in Python 2.6, on OS X

2008-10-31 Thread tyuuuu2001
There is already a bug report concerning this matter: http://bugs.python.org/issue4017 -- http://mail.python.org/mailman/listinfo/python-list

ANN: Docpicture 0.2

2008-10-31 Thread André
Docpicture 0.2 has been released. You can download it from http://code.google.com/p/docpicture/ Docpicture's goal is to enable embedding pictures inside Python docstrings using some custom domain specific language (dsl). docpicture includes a plugin architecture enabling users to extend it by add

Re: Finding the instance reference of an object

2008-10-31 Thread Aaron Brady
On Oct 31, 4:23 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Thu, 30 Oct 2008 19:55:57 -0700, Aaron Brady wrote: snip > > After that's established, we > > can proceed to evaluating what 'call by value' would behave like, which > > would then determine if Python behaves lik

Re: Exact match with regular expression

2008-10-31 Thread Shawn Milochik
On Fri, Oct 31, 2008 at 8:57 PM, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > In message <[EMAIL PROTECTED]>, Rob > Williscroft wrote: > >> Read (and bookmark) this: >> >> http://www.python.org/doc/2.5.2/lib/re-syntax.html > > Funny how you never get a thank-you when you tell people to RTFM. >

Re: Optparse object containing generators: only seem to work if given particular names?

2008-10-31 Thread John O'Hagan
On Fri, 31 Oct 2008, Peter Otten wrote: > John O'Hagan wrote: > > Here's a strange one for you: > > > > I have a generator function which produces lists of numbers and takes > > options which influence the output. The generator contains a loop, and to > > enable the options to have a different valu

Re: Finding the instance reference of an object

2008-10-31 Thread greg
Steven D'Aprano wrote: Consequently people who know these other languages come along and ask "So is Python call by value or call by reference?". And if you don't know *exactly* what *they* understand by those terms, you can't answer that directly without running the risk of confusing them in

Re: Decorator for validation - inefficient?

2008-10-31 Thread Steven D'Aprano
On Fri, 31 Oct 2008 11:26:19 -0700, Bryan wrote: > I want my business objects to be able to do this: [snip code] The code you show is quite long and complex and frankly I don't have the time to study it in detail at the moment, but I can make a couple of quick comments. I see by your subject li

Re: Exact match with regular expression

2008-10-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Rob Williscroft wrote: > Read (and bookmark) this: > > http://www.python.org/doc/2.5.2/lib/re-syntax.html Funny how you never get a thank-you when you tell people to RTFM. -- http://mail.python.org/mailman/listinfo/python-list

Re: v4l module

2008-10-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Carl K wrote: > I tried to use ctypes with ghostscript and failed. What is the connection with Ghostscript? > I have a feeling trying to use it with kernel modules would be even > harder ... You don't talk to kernel modules--that's the kernel's job. Surely you'd

Re: Is there a time limit for replies?

2008-10-31 Thread Terry Reedy
Ulrich Eckhardt wrote: Rafe wrote: Can you recommend anything? I would like to avoid 1,000s of emails flooding my account though. I like knode from KDE for browsing the Usenet. The Mozilla suite also contains a newsreader. Other than that, use a webmail account and configure a filter to file e

Re: open a shell prompt froma python program

2008-10-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, gaurav kashyap wrote: > konsole: cannot connect to X server Could be it's not being passed the right DISPLAY setting. Is this under the same username, so it's automatically using the right xauth settings? -- http://mail.python.org/mailman/listinfo/python-list

Re: Restricted Execution of untrusted code

2008-10-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Emanuele D'Arrigo wrote: > I noticed that this issue has been discussed in this newsgroup > periodically over the years and I seem to understand that - > comprehensive- safe/restricted execution of untrusted code in python I think the most reliable solution is to t

Re: split() and string.whitespace

2008-10-31 Thread Steven D'Aprano
On Fri, 31 Oct 2008 12:18:32 -0700, Chaim Krause wrote: > I have arrived here while attempting to break down a larger problem. I > got to this question when attempting to split a line on any whitespace > character so that I could then add several other characters like ';' and > ':'. Ultimately spl

Re: Finding the instance reference of an object

2008-10-31 Thread Steven D'Aprano
On Fri, 31 Oct 2008 16:02:53 +, Duncan Booth wrote: > [EMAIL PROTECTED] wrote: > >>> x = 1 >>> y = x # does assignment make copies? y += 1 >>> assert x == 1 >>> => succeeds, which implies that Python makes a copy when assigning >> >> with lists: >> >>> x = [1] >>> y = x # does assignment

Re: Finding the instance reference of an object

2008-10-31 Thread Steven D'Aprano
On Fri, 31 Oct 2008 08:42:53 -0700, pjacobi.de wrote: > Instead of comparing integers: > >> x = 1 >> y = x # does assignment make copies? y += 1 >> assert x == 1 >> => succeeds, which implies that Python makes a copy when assigning > > with lists: > >> x = [1] >> y = x # does assignment make

Re: mySQL problems

2008-10-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Alfons Nonell-Canals wrote: > _mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL > server on 'HOST' (110)") Error 110 is ETIMEDOUT (Connection timed out). -- http://mail.python.org/mailman/listinfo/python-list

Re: brackets content regular expression

2008-10-31 Thread Matimus
On Oct 31, 11:57 am, netimen <[EMAIL PROTECTED]> wrote: > Thank's but if i have several top-level groups and want them match one > by one: > > text = "a < b < Ó > d > here starts a new group:  < e < f  > g >" > > I want to match first " b < Ó > d " and then " e < f  > g " but not " > b < Ó > d > he

Re: brackets content regular expression

2008-10-31 Thread Pierre Quentel
On 31 oct, 20:38, netimen <[EMAIL PROTECTED]> wrote: > there may be different levels of nesting: > > "a < b < Ó > d > here starts a new group: < 1 < e < f  > g > 2 > > another group: < 3 >" > > On 31 окт, 21:57, netimen <[EMAIL PROTECTED]> wrote: > > > Thank's but if i have several top-level groups

Re: brackets content regular expression

2008-10-31 Thread bearophileHUGS
netimen: > Thank's but if i have several top-level groups and want them match one > by one: > text = "a < b < Ó > d > here starts a new group:  < e < f  > g >" What other requirements do you have? If you list them all at once people will write you the code faster. bye, Bearophile -- http://mail.p

Re: Windows DOS box redirection

2008-10-31 Thread Bill McClain
On 2008-10-31, Bill McClain <[EMAIL PROTECTED]> wrote: > Ok, trying that...works, but the window doesn't stay open, so we can't see the > results. Any way to do that? Sorry for the Windows-101 tutorial. I received an email solution: prepend the shortcut command with "cmd.exe /k". Works great! -B

Re: split() and string.whitespace

2008-10-31 Thread MRAB
On Oct 31, 6:57 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Fri, 31 Oct 2008 11:53:30 -0700, Chaim Krause wrote: > > I am unable to figure out why the first two statements work as I expect > > them to and the next two do not. Namely, the first two spit the sentence > > into its com

Re: Decorator for validation - inefficient?

2008-10-31 Thread Arnaud Delobelle
On Oct 31, 6:26 pm, Bryan <[EMAIL PROTECTED]> wrote: > I want my business objects to be able to do this: > class Person(base): > >     def __init__(self): >         self.name = None > >     @base.validator >     def validate_name(self): >         if not self.name: return ['Name cannot be empty'] >

Re: brackets content regular expression

2008-10-31 Thread netimen
there may be different levels of nesting: "a < b < Ó > d > here starts a new group: < 1 < e < f > g > 2 > another group: < 3 >" On 31 окт, 21:57, netimen <[EMAIL PROTECTED]> wrote: > Thank's but if i have several top-level groups and want them match one > by one: > > text = "a < b < Ó > d > here

Re: python openssl x509 CA

2008-10-31 Thread Michael Ströder
Paul Rubin wrote: > Marcin Jurczuk <[EMAIL PROTECTED]> writes: >> I want to create pure python implementation without use of openssl >> wrapped with python code. > > There was a CA written in Python quite a while back, http://pyca.de . That was the usual approach with invoking the openssl command

Re: CAD.py

2008-10-31 Thread skip
r> I am currently looking to create a small CAD program with python. Instead of starting from scratch how about extending PythonCAD instead: http://www.pythoncad.org/ Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: split() and string.whitespace

2008-10-31 Thread Chaim Krause
On Oct 31, 2:12 pm, Chaim Krause <[EMAIL PROTECTED]> wrote: > The documentation I am referencing states... > > The sep argument may consist of multiple characters (for example, "'1, > 2, 3'.split(', ')" returns "['1', '2', '3']"). > > So why doesn't the latter two split on *any* whitespace characte

Re: split() and string.whitespace

2008-10-31 Thread Chaim Krause
I have arrived here while attempting to break down a larger problem. I got to this question when attempting to split a line on any whitespace character so that I could then add several other characters like ';' and ':'. Ultimately splitting a line on any char in a union of string.whitespace and som

Re: convert string literal to object attribute

2008-10-31 Thread BiraRai
On Oct 31, 3:00 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Fri, 31 Oct 2008 11:40:02 -0700, BiraRai wrote: > > def getAttributeForProperty(self,rollnumber,attribute): > >    # attribute have the value _ward > >    ''' > >    If year is null then use current year. Returns the value

Re: split() and string.whitespace

2008-10-31 Thread Chaim Krause
The documentation I am referencing states... The sep argument may consist of multiple characters (for example, "'1, 2, 3'.split(', ')" returns "['1', '2', '3']"). So why doesn't the latter two split on *any* whitespace character, and is instead looking for the sep string as a whole? -- http://mai

Re: Exec and Scope

2008-10-31 Thread Emanuele D'Arrigo
Ahh... before you guys reply: I found the way. Between you James sounding the horn of alarm and you Rafe pointing me in the right direction I sorted it out. Eventually I didn't end up using getAttr but looking into it I learned the difference between myResult = instance.method() and myMethod =

Re: Windows DOS box redirection

2008-10-31 Thread Glenn Linderman
A little bit ago, I wrote: Creating the registry setting mentioned in this kb article didn't (immediately) solve the problem. Next time I reboot, I'll try to remember to test this again. It occurred to me to create a new CMD Prompt (yes, it is not a "DOS box" in these versions of Windows) a

Re: Windows DOS box redirection

2008-10-31 Thread Bill McClain
On 2008-10-31, Shawn Milochik <[EMAIL PROTECTED]> wrote: > Easy. Make a desktop shortcut which includes the parameters, etc. > People do that all the time, including for GUI apps such as Internet > Explorer which have some optional command-line shortcuts. > The only thing you have to do is make su

Re: convert string literal to object attribute

2008-10-31 Thread Marc 'BlackJack' Rintsch
On Fri, 31 Oct 2008 11:40:02 -0700, BiraRai wrote: > def getAttributeForProperty(self,rollnumber,attribute): > # attribute have the value _ward > ''' > If year is null then use current year. Returns the value of the > attribute for the given roll number ''' > print 'S

Re: split() and string.whitespace

2008-10-31 Thread Chris Rebert
On Fri, Oct 31, 2008 at 11:53 AM, Chaim Krause <[EMAIL PROTECTED]> wrote: > I am unable to figure out why the first two statements work as I > expect them to and the next two do not. Namely, the first two spit the > sentence into its component words, while the latter two return the > whole sentence

Re: split() and string.whitespace

2008-10-31 Thread Tim Chase
I am unable to figure out why the first two statements work as I expect them to and the next two do not. Namely, the first two spit the sentence into its component words, while the latter two return the whole sentence entact. import string from string import whitespace mytext = "The quick brown f

Re: split() and string.whitespace

2008-10-31 Thread Marc 'BlackJack' Rintsch
On Fri, 31 Oct 2008 11:53:30 -0700, Chaim Krause wrote: > I am unable to figure out why the first two statements work as I expect > them to and the next two do not. Namely, the first two spit the sentence > into its component words, while the latter two return the whole sentence > entact. > > imp

Re: brackets content regular expression

2008-10-31 Thread netimen
Thank's but if i have several top-level groups and want them match one by one: text = "a < b < с > d > here starts a new group: < e < f > g >" I want to match first " b < с > d " and then " e < f > g " but not " b < с > d > here starts a new group: < e < f > g " On 31 окт, 20:53, Matimus <[E

split() and string.whitespace

2008-10-31 Thread Chaim Krause
I am unable to figure out why the first two statements work as I expect them to and the next two do not. Namely, the first two spit the sentence into its component words, while the latter two return the whole sentence entact. import string from string import whitespace mytext = "The quick brown fo

Re: Windows DOS box redirection

2008-10-31 Thread Glenn Linderman
On approximately 10/31/2008 5:06 AM, came the following characters from the keyboard of Bill McClain: On 2008-10-31, Glenn Linderman <[EMAIL PROTECTED]> wrote: The problem with stdin/stdout is on Windows 2000 (and maybe the earlier NT?). But not on XP or AFAIK Vista. It only occurs when

convert string literal to object attribute

2008-10-31 Thread BiraRai
def getAttributeForProperty(self,rollnumber,attribute): # attribute have the value _ward ''' If year is null then use current year. Returns the value of the attribute for the given roll number ''' print 'Searching for attribute', attribute for

Function Memory Usage

2008-10-31 Thread Paulo J. Matos
Hi all, What's the best way to know the amount of memory allocated by a function and the time it took to run? While the latter is simple to implement using a wrapper function, the former is striking me as something that needs to be primitive to python. Any tips? Cheers, -- Paulo Jorge Matos - p

Re: Testing dictionary results with doctest

2008-10-31 Thread Paul Rubin
Joe Strout <[EMAIL PROTECTED]> writes: > >>> t.match( "The rain in Spain falls mainly on the train." ) > {'object': 'rain', 'location': 'Spain', 'subloc': 'train'} You can compare dictionaries for equality: >>> t.match( "The rain in Spain falls mainly on the train." ) == \ {'o

Re: python openssl x509 CA

2008-10-31 Thread Paul Rubin
Marcin Jurczuk <[EMAIL PROTECTED]> writes: > I want to create pure python implementation without use of openssl > wrapped with python code. There was a CA written in Python quite a while back, http://pyca.de . I don't know if it's maintained these days. -- http://mail.python.org/mailman/listinfo/p

Re: Windows DOS box redirection

2008-10-31 Thread Shawn Milochik
On Fri, Oct 31, 2008 at 2:14 PM, Bill McClain <[EMAIL PROTECTED]> wrote: > On 2008-10-31, Stef Mientki <[EMAIL PROTECTED]> wrote: >> Well I don't know any Windows users that still use DOS-boxes ;-) >> cheers, > > What do they do when they want to run a cross-platform command-line script > with para

Re: Windows DOS box redirection

2008-10-31 Thread Tim Golden
Bill McClain wrote: On 2008-10-31, Stef Mientki <[EMAIL PROTECTED]> wrote: Well I don't know any Windows users that still use DOS-boxes ;-) cheers, What do they do when they want to run a cross-platform command-line script with parameters and redirection? I think it's a slight dig at the no

Decorator for validation - inefficient?

2008-10-31 Thread Bryan
I want my business objects to be able to do this: class Person(base): def __init__(self): self.name = None @base.validator def validate_name(self): if not self.name: return ['Name cannot be empty'] p = Person() print p.invalid # Prints ['Name cannot be empty'] p.name

Re: Windows DOS box redirection

2008-10-31 Thread Bill McClain
On 2008-10-31, Stef Mientki <[EMAIL PROTECTED]> wrote: > Well I don't know any Windows users that still use DOS-boxes ;-) > cheers, What do they do when they want to run a cross-platform command-line script with parameters and redirection? I suppose they could install cygwin and run bash, but tha

Selecting multiple directories (TKinter)

2008-10-31 Thread Fabian Svara
Hi, I'm currently using tkFileDialog.askdirectory() to select a single directory. I would like to be able to select multiple directories. tkFileDialog.askopenfilenames() seems to do this for files. What can I do in my situation? Are there alternative classes that provide file dialogs bette

Re: brackets content regular expression

2008-10-31 Thread Matimus
On Oct 31, 10:25 am, netimen <[EMAIL PROTECTED]> wrote: > I have a text containing brackets (or what is the correct term for > '>'?). I'd like to match text in the uppermost level of brackets. > > So, I have sth like: ' 123 < 1 aaa < t bbb < a ff > > 2 > > b'. How to match text between the

Re: brackets content regular expression

2008-10-31 Thread Paul McGuire
On Oct 31, 12:25 pm, netimen <[EMAIL PROTECTED]> wrote: > I have a text containing brackets (or what is the correct term for > '>'?). I'd like to match text in the uppermost level of brackets. > > So, I have sth like: ' 123 < 1 aaa < t bbb < a ff > > 2 > > b'. How to match text between the

Re: brackets content regular expression

2008-10-31 Thread Alex_Gaynor
On Oct 31, 1:25 pm, netimen <[EMAIL PROTECTED]> wrote: > I have a text containing brackets (or what is the correct term for > '>'?). I'd like to match text in the uppermost level of brackets. > > So, I have sth like: ' 123 < 1 aaa < t bbb < a ff > > 2 > > b'. How to match text between the

Re: Windows DOS box redirection

2008-10-31 Thread Stef Mientki
Bill McClain wrote: On 2008-10-31, Tim Golden <[EMAIL PROTECTED]> wrote: You've got a few options. Ok, thanks! It is a small hobbyist community. I'll just document it and tell them "life is hard for Windows users." Well I don't know any Windows users that still use DOS-boxes ;-) c

Re: how to run python file from the python IDLE editor

2008-10-31 Thread r
On Oct 31, 1:33 am, "Seid Mohammed" <[EMAIL PROTECTED]> wrote: > Greetins all > 1. I can easily run python file from a comand prompt just typing > "python filname.py". > How can I do this from the python IDLE shell > 2. How to create EXE in python. > thanks all for making me to be more copnfortable

brackets content regular expression

2008-10-31 Thread netimen
I have a text containing brackets (or what is the correct term for '>'?). I'd like to match text in the uppermost level of brackets. So, I have sth like: ' 123 < 1 aaa < t bbb < a ff > > 2 > b'. How to match text between the uppermost brackets ( 1 aaa < t bbb < a ff > > 2 )? P.S. sorry

CAD.py

2008-10-31 Thread r
Hello I am currently looking to create a small CAD program with python. This has been a major challenge for some like myself with very limited math skills, and only a year of self taught programming experience. But being the kind of hard headed, determined person I am, I won't give up. ;^) A lit

Can I build Python with lthread instead of pthread?

2008-10-31 Thread Akira Kitada
Hi, I'm running Python 2.5 on FreeBSD 4. pthread on FreeBSD 4 has some problems so I would like to build python with lthread (linuxthreads) instead of BSD's pthread. So I looked at configure options but couldn't find any options for it. Python support lthread? and how can I build python with it?

Re: Finding the instance reference of an object

2008-10-31 Thread Douglas Alan
greg <[EMAIL PROTECTED]> writes: > Douglas Alan wrote: >> greg <[EMAIL PROTECTED]> writes: > >>> This holds for *all* languages that I know about, both static and >>> dynamic. > >> Then you don't know about all that many languages. There are >> languages that use call-by-name, and those that use

Re: Exec and Scope

2008-10-31 Thread Emanuele D'Arrigo
On Oct 31, 4:38 am, Rafe <[EMAIL PROTECTED]> wrote: > If you are just looking to execute an attribute (be it a property, > module-level function, instance or class method, or anything else > which is an attribute of an object), just use getattr(). I must check this out. My understanding is that ge

Re: IDLE stopped working

2008-10-31 Thread Tal Einat
On Oct 27, 2:31 am, brianrpsgt1 <[EMAIL PROTECTED]> wrote: > OSX 10.5.5 > Python 2.5.1 > > I started upIDLEtoday and the bottom of the window was off of the > screen.  I could not find a way to resize it.  I closed all apps and > rebooted.  After rebooting,IDLEwill not start.  Below is the > Traceb

Re: Finding the instance reference of an object

2008-10-31 Thread Duncan Booth
[EMAIL PROTECTED] wrote: >> x = 1 >> y = x # does assignment make copies? >> y += 1 >> assert x == 1 >> => succeeds, which implies that Python makes a copy when assigning > > with lists: > >> x = [1] >> y = x # does assignment make copies? >> y += [1] >> assert x == [1] >> => fails, which impl

Re: Finding the instance reference of an object

2008-10-31 Thread pjacobi . de
Instead of comparing integers: > x = 1 > y = x # does assignment make copies? > y += 1 > assert x == 1 > => succeeds, which implies that Python makes a copy when assigning with lists: > x = [1] > y = x # does assignment make copies? > y += [1] > assert x == [1] > => fails, which implies that P

Extend Google docs?

2008-10-31 Thread bdbull
Is it possible to extend google docs or create a new project in GAE and use the google docs editor and all of its functionality? -- http://mail.python.org/mailman/listinfo/python-list

Re: Exec and Scope

2008-10-31 Thread Emanuele D'Arrigo
On Oct 31, 3:56 am, "James Mills" <[EMAIL PROTECTED]> wrote: > Good lord man, what are you trying to solve ? > Describe your "actual problem" you're attempting > to solve... This looks really really ugly and I would > advise against any solution that relies on exec() I knew I was going to get some

Re: Testing dictionary results with doctest

2008-10-31 Thread MRAB
On Oct 31, 2:43 pm, Joe Strout <[EMAIL PROTECTED]> wrote: > I love doctest -- the way it combines documentation with verification   > seems elegant and useful, and most of the time it's simple and easy to   > use. > > But I've run into a bit of a snag trying to test a method that returns   > a dict

Re: Testing dictionary results with doctest

2008-10-31 Thread bearophileHUGS
Joe Strout: > What's the standard solution for this? I don't know of any standard solution, I generally sort the items in some ways, or add the result, that has to be equal: >>> r = foo() >>> r == {'object': 'rain', 'location': 'Spain', 'subloc': 'train'} True > Does doctest have some special wa

Re: Testing dictionary results with doctest

2008-10-31 Thread Duncan Booth
Joe Strout <[EMAIL PROTECTED]> wrote: > What's the standard solution for this? Should I iterate over the > sorted keys and print those out instead? Is there some built-in > method somewhere that will print a dictionary in a reliable order? > Does doctest have some special way to tell it t

indexing arrays in extensions created with ext_tools (scipy.weave)

2008-10-31 Thread Soren
Hi, I'm trying to make a weave python extension to use in my program. I already did it in inline, but that doesn't work with py2exe (needs compiler), so I'm creating extensions instead using ext_tools. Is there a way I can use blitz with ext_tools? so that I can refer to arrays like a(x,y) in the

Re: Restricted Execution of untrusted code

2008-10-31 Thread Emanuele D'Arrigo
On Oct 30, 8:50 pm, Aaron Brady <[EMAIL PROTECTED]> wrote: > Otherwise, you might be able to remove access to it by modifying > however it is the 'cust' list is obtained.  Perhaps you can use the > technique that's used to change the value of integers.  Keep us > posted.  Does this give you any ide

Re: How to make money with Python!

2008-10-31 Thread Grant Edwards
On 2008-10-31, Duncan Booth <[EMAIL PROTECTED]> wrote: > If that subject line didn't trip everyone's killfiles, see > > http://pythonide.blogspot.com/2008/10/how-to-make-money-with-free-software.html > for a fantastic story involving Python. Doh! The very clever pun went right past me several t

Re: Windows DOS box redirection

2008-10-31 Thread Bill McClain
On 2008-10-31, Tim Golden <[EMAIL PROTECTED]> wrote: > You've got a few options. Ok, thanks! It is a small hobbyist community. I'll just document it and tell them "life is hard for Windows users." -Bill -- Sattre PressThe King in Yellow http://sattre-press.com/

Pyodbc and minimock with doctest

2008-10-31 Thread dj
Hello, I have just started working with minimock in doctest. I want to create a mock pyodbc object which returns a string value when the method execute is called. Here is my doctest: >>> from minimock import Mock >>> import pyodbc >>> def database_response() ... ServerName = 'test_server'

Testing dictionary results with doctest

2008-10-31 Thread Joe Strout
I love doctest -- the way it combines documentation with verification seems elegant and useful, and most of the time it's simple and easy to use. But I've run into a bit of a snag trying to test a method that returns a dictionary, because (of course) the order in which the dictionary pair

ctypes for Jython?

2008-10-31 Thread dudeja . rajat
Hi All, Is ctypes or something like this available for Jython? -- Regards, Rajat -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding the instance reference of an object

2008-10-31 Thread Dale Roberts
On Oct 31, 2:27 am, greg <[EMAIL PROTECTED]> wrote: > Dale Roberts wrote: > > Are you > > saying that C++ is capable of using the Call By Reference idiom, but C > > is not, because C does not have a reference designation for formal > > function parameters? > > Call by reference is not an "idiom", i

How to make money with Python!

2008-10-31 Thread Duncan Booth
If that subject line didn't trip everyone's killfiles, see http://pythonide.blogspot.com/2008/10/how-to-make-money-with-free-software.html for a fantastic story involving Python. -- Duncan Booth http://kupuguy.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a time limit for replies?

2008-10-31 Thread Grant Edwards
On 2008-10-31, Ulrich Eckhardt <[EMAIL PROTECTED]> wrote: > Rafe wrote: > >> I tried to post some follow-ups to some issues I posted in the >> hopes of helping others, but I only get "reply to author" and >> "forward", but no "reply" option (using GoogleGroups). Is >> there some kind of time limit

Re: Finding the instance reference of an object

2008-10-31 Thread Dale Roberts
On Oct 31, 3:15 am, greg <[EMAIL PROTECTED]> wrote: > Dale Roberts wrote: > > Just as the Pass By Reference idiom deserves a unique name to > > distinguish it from Pass By Value (even though it is often Pass By > > (address) Value internally), so Pass By Object Reference deserves a > > unique name

Re: Finding the instance reference of an object

2008-10-31 Thread Grant Edwards
On 2008-10-31, greg <[EMAIL PROTECTED]> wrote: > Dale Roberts wrote: > >> Just as the Pass By Reference idiom deserves a unique name to >> distinguish it from Pass By Value (even though it is often Pass By >> (address) Value internally), so Pass By Object Reference deserves a >> unique name (even t

Re: Is there a time limit for replies?

2008-10-31 Thread Duncan Booth
Paul Boddie <[EMAIL PROTECTED]> wrote: > On 31 Okt, 10:38, Rafe <[EMAIL PROTECTED]> wrote: >> I tried to post some follow-ups to some issues I posted in the hopes >> of helping others, but I only get "reply to author" and "forward", but >> no "reply" option (using GoogleGroups). Is there some kind

Re: open a new terminal window from another terminal window in linux/unix system

2008-10-31 Thread Grant Edwards
On 2008-10-31, gaurav kashyap <[EMAIL PROTECTED]> wrote: > Can this be achieved. If yes,please provide a tested solution Rude much? -- Grant Edwards grante Yow! Hmmm ... A hash-singer at and a cross-eyed guy were

[ANN] FOSS Project for grabbing contacts from gmail, yahoo, rediff etc.

2008-10-31 Thread Sanjay
Hi All, Glad to announce a python open source project named ContactGrabber to grab the contact emails from gmail, yahoo, rediff etc. The project is hosted at http://code.google.com/p/pycontactgrabber/ and is also available at cheeseshop. It is now working fine for 'gmail', 'yahoo' and 'rediff'. I

Re: Is there a time limit for replies?

2008-10-31 Thread Ulrich Eckhardt
Rafe wrote: > Can you recommend anything? I would like to avoid 1,000s of emails > flooding my account though. I like knode from KDE for browsing the Usenet. The Mozilla suite also contains a newsreader. Other than that, use a webmail account and configure a filter to file everything Pythonic into

Re: Is there a time limit for replies?

2008-10-31 Thread Paul Boddie
On 31 Okt, 10:38, Rafe <[EMAIL PROTECTED]> wrote: > I tried to post some follow-ups to some issues I posted in the hopes > of helping others, but I only get "reply to author" and "forward", but > no "reply" option (using GoogleGroups). Is there some kind of time > limit to reply? Probably not for

Re: Windows DOS box redirection

2008-10-31 Thread Tim Golden
Bill McClain wrote: On 2008-10-31, Glenn Linderman <[EMAIL PROTECTED]> wrote: The problem with stdin/stdout is on Windows 2000 (and maybe the earlier NT?). But not on XP or AFAIK Vista. It only occurs when a program is executed indirectly using the file associations instead of directly via

Re: open a new terminal window from another terminal window in linux/unix system

2008-10-31 Thread Paul Boddie
On 31 Okt, 10:50, Tino Wildenhain <[EMAIL PROTECTED]> wrote: > gaurav kashyap wrote: > > I am using Microsoft Windows XP.Using putty.exe,I connected to LINUX > > server  and a terminal window gets opened.Here i logeed in as root. As pointed out already, root privileges should be used with caution,

Windows DOS box redirection (was: Code not work - DESPERATE HELP)

2008-10-31 Thread Bill McClain
On 2008-10-31, Glenn Linderman <[EMAIL PROTECTED]> wrote: > The problem with stdin/stdout is on Windows 2000 (and maybe the earlier > NT?). But not on XP or AFAIK Vista. > It only occurs when a program is executed indirectly using the file > associations instead of directly via the command lin

Re: Is there a time limit for replies?

2008-10-31 Thread Rafe
On Oct 31, 5:21 pm, Ulrich Eckhardt <[EMAIL PROTECTED]> wrote: > Rafe wrote: > > I tried to post some follow-ups to some issues I posted in the hopes > > of helping others, but I only get "reply to author" and "forward", but > > no "reply" option (using GoogleGroups). Is there some kind of time > >

Re: modifying locals

2008-10-31 Thread Tino Wildenhain
M.-A. Lemburg wrote: On 2008-10-31 09:08, Tino Wildenhain wrote: ... Ah thats interesting. I would not know because I usually avoid such ugly hacks :-) It doesn't even work for already defined local variables: def foo(): ... x = 1 ... locals()['x'] = 2 ... print x ... foo()

Re: python openssl x509 CA

2008-10-31 Thread M.-A. Lemburg
On 2008-10-31 11:10, Marcin Jurczuk wrote: > Hello, > I'm fighting with Certificate Authority functionality with python > I stuck on following problem: How to sign CSR using CA key and write > resulted certificate. > > You can do it using following openssl cmd: > openssl ca -cert CA/cert.pem -keyf

Re: Is there a time limit for replies?

2008-10-31 Thread Ulrich Eckhardt
Rafe wrote: > I tried to post some follow-ups to some issues I posted in the hopes > of helping others, but I only get "reply to author" and "forward", but > no "reply" option (using GoogleGroups). Is there some kind of time > limit to reply? Two things: 1. Google Groups is by far not the best int

Re: modifying locals

2008-10-31 Thread M.-A. Lemburg
On 2008-10-31 09:08, Tino Wildenhain wrote: > Hi, > > Steven D'Aprano wrote: >> On Fri, 31 Oct 2008 07:10:05 +0100, Tino Wildenhain wrote: >> >>> Also, locals() already returns a dict, no need for the exec trickery. >>> You can just modify it: >>> >>> >>> locals()["foo"]="bar" >>> >>> foo >>> 'b

python openssl x509 CA

2008-10-31 Thread Marcin Jurczuk
Hello, I'm fighting with Certificate Authority functionality with python I stuck on following problem: How to sign CSR using CA key and write resulted certificate. You can do it using following openssl cmd: openssl ca -cert CA/cert.pem -keyfile CA/private/cakey.pem -policy policy_anything -out us

Re: Python suitable for Midi ?

2008-10-31 Thread Chuckk Hubbard
On Tue, Oct 28, 2008 at 7:13 PM, Derek Martin <[EMAIL PROTECTED]> wrote: > On Tue, Oct 28, 2008 at 06:54:57PM +0200, Chuckk Hubbard wrote: >> The problem I've run into is that I can't set the audio to a higher >> priority than the GUI (Tkinter). If I move the mouse over the app, no >> matter what,

Re: how to use logging module to log an object like print()

2008-10-31 Thread Vinay Sajip
On Oct 30, 4:34 am, Steve Holden <[EMAIL PROTECTED]> wrote: > > Vinay, please tell me whether I was right or wrong ... > What Tim Roberts has already said is right ... my post was highlighting how to mitigate any overhead which is typically (or at least in general terms) higher than the cost of fo

Re: open a new terminal window from another terminal window in linux/unix system

2008-10-31 Thread Tino Wildenhain
Hi, gaurav kashyap wrote: Dear all, I am using Microsoft Windows XP.Using putty.exe,I connected to LINUX server and a terminal window gets opened.Here i logeed in as root. What i want to do is open another terminal window from already opened terminal window. Ugh. As others said and I alread

Re: How to open a shell prompt from an existing shell prompt

2008-10-31 Thread Tino Wildenhain
Hi, gaurav kashyap wrote: Dear Tino, There is no subprocess module in python 2.3.5. My goal is: 1.Open a terminal window and login as root. 2.Issue some command in the terminal window that will open another terminal,similar to the onealready opened. Am i clear now. Not at all. All yo

  1   2   >