Re: Bugs/issues in tkinter.simpledialog!!

2011-01-30 Thread alex23
rantingrick wrote: > Actually i see you point but there is a good reason behind me bringing > this up here. I want to bring to the attention of everyone how little > interest there is for Tkinter. Right. You have no interest in resolving this issue and instead want to use it as more ammunition in

Re: Useing the processor clock, or get time in Femptoseconds

2011-01-30 Thread John Nagle
On 1/30/2011 8:14 PM, Littlefield, Tyler wrote: If you are on windows, you can use high-resolution timers. What you are trying is physically impossible though: lets say you have a processor that runs at 2.5 GHz. that's 2.5 billion cycles per second, give or take a few. So, the lowest you can go i

Re: Limit on entries in dictionary data structure

2011-01-30 Thread Dan Stromberg
On Sun, Jan 30, 2011 at 6:43 PM, Shruti Sanadhya wrote: > Hi, > I am running a script that uses dictionaries on Python 2.6.4 on Ubuntu 9.10. > I notice that my script crashes with a MemoryError when my dictionary > reaches 44739243th entry. My system has 3GB RAM (32-bit). I noticed that > changing

Re: WxPython versus Tkinter.

2011-01-30 Thread alex23
rantingrick wrote: > To be honest, i would sacrifice all the functionality of > wxWidgets if we could get pyGUI into the stdlib. Why? Well because > pyGUI would be under OUR complete control. "You" would need to contribute something other than bullshit and vitriol in order to be able to use the w

Re: Useing the processor clock, or get time in Femptoseconds

2011-01-30 Thread Littlefield, Tyler
If you are on windows, you can use high-resolution timers. What you are trying is physically impossible though: lets say you have a processor that runs at 2.5 GHz. that's 2.5 billion cycles per second, give or take a few. So, the lowest you can go is nanoseconds. You're trying to time like 10x

Re: Limit on entries in dictionary data structure

2011-01-30 Thread MRAB
On 31/01/2011 02:43, Shruti Sanadhya wrote: Hi, I am running a script that uses dictionaries on Python 2.6.4 on Ubuntu 9.10. I notice that my script crashes with a MemoryError when my dictionary reaches 44739243th entry. My system has 3GB RAM (32-bit). I noticed that changing the key or value ty

Useing the processor clock, or get time in Femptoseconds

2011-01-30 Thread Garland Fulton
Does anyone have any suggestions? -- http://mail.python.org/mailman/listinfo/python-list

Re: Understanding def foo(*args)

2011-01-30 Thread rusi
On Jan 31, 12:35 am, rantingrick wrote: > > Also, can the terms method and function be used interchangeably? > > Can the terms cars and truck be used interchangeably? Oooff! A load of meaning in that one line -- I wonder though if the OP will understand... -- http://mail.python.org/mailman/listi

Re: multiple values for keyword argument

2011-01-30 Thread Patty
Well - this is all timely email. I just spent the day configuring my HP mini netbook running Windows 7 with all the right software based on recomendations from folks on this list, from the Python Tutor list and an email group of former colleagues where I spelled out exactly all the programming

Re: homedir, file copy

2011-01-30 Thread Dave Angel
On 01/-10/-28163 02:59 PM, ecu_jon wrote: On Jan 30, 7:19 pm, Dave Angel wrote: On 01/-10/-28163 02:59 PM, ecu_jon wrote: ok now i get permission denied import os homedir =s.path.expanduser('~') try: from win32com.shell import shellcon, shell homedir =hell.SHGetFolderPath(0

Re: Style question: Nicknames for deeply nested objects

2011-01-30 Thread Stephen Hansen
On 1/30/11 1:13 PM, rantingrick wrote: > On Jan 30, 12:53 pm, Stephen Hansen wrote: >> OH MY GOD. How can someone be expected to understand what a function does! > > Yes, and also how decorators word and generators work, and ... > >> Be serious! You can't expect that of them. > > I don't. I don

Re: homedir, file copy

2011-01-30 Thread ecu_jon
On Jan 30, 8:25 pm, MRAB wrote: > On 31/01/2011 00:18, ecu_jon wrote: > > > > > On Jan 30, 7:09 pm, MRAB  wrote: > >> On 30/01/2011 23:43, ecu_jon wrote: > > >>> ok now i get permission denied > > >>> import os > >>> homedir = os.path.expanduser('~') > >>> try: > >>>       from win32com.shell

Limit on entries in dictionary data structure

2011-01-30 Thread Shruti Sanadhya
Hi, I am running a script that uses dictionaries on Python 2.6.4 on Ubuntu 9.10. I notice that my script crashes with a MemoryError when my dictionary reaches 44739243th entry. My system has 3GB RAM (32-bit). I noticed that changing the key or value types also did not help my code. For simplicity

Re: Is it possible to pass CSV Reader Object As Argument to another Python File ???

2011-01-30 Thread rusi
On Jan 30, 10:35 pm, rusi wrote: > On Jan 30, 6:31 pm, bansi wrote: > > Isn't it possible to implement your suggestion without installing > > Visual C++ 2008 . > > http://code.google.com/p/pyodbc/wiki/Building#Windows Well... This is what the official site says... On second thoughts I wonder: Wo

Re: homedir, file copy

2011-01-30 Thread MRAB
On 31/01/2011 00:18, ecu_jon wrote: On Jan 30, 7:09 pm, MRAB wrote: On 30/01/2011 23:43, ecu_jon wrote: ok now i get permission denied import os homedir = os.path.expanduser('~') try: from win32com.shell import shellcon, shell homedir = shell.SHGetFolderPath(0, shellcon.CSI

Re: homedir, file copy

2011-01-30 Thread Westley Martínez
It seems like you are trying to copy directories with shutil.copy. Use shutil.copytree instead. On Sun, 2011-01-30 at 16:43 -0800, ecu_jon wrote: > On Jan 30, 7:34 pm, rantingrick wrote: > > On Jan 30, 5:43 pm, ecu_jon wrote: > > > > > ok now i get permission denied > > > > [...] > > > > >

Re: homedir, file copy

2011-01-30 Thread ecu_jon
On Jan 30, 7:34 pm, rantingrick wrote: > On Jan 30, 5:43 pm, ecu_jon wrote: > > > ok now i get permission denied > > [...] > > > shutil.copy (backupdir1, backupdir2) > > I must stress the importance of proper testing before ever running > code that manipulates files! So many things can go wro

Re: homedir, file copy

2011-01-30 Thread rantingrick
On Jan 30, 5:43 pm, ecu_jon wrote: > ok now i get permission denied [...] > shutil.copy (backupdir1, backupdir2) I must stress the importance of proper testing before ever running code that manipulates files! So many things can go wrong. Of course you are just copying files here and not del

Re: homedir, file copy

2011-01-30 Thread ecu_jon
On Jan 30, 7:19 pm, Dave Angel wrote: > On 01/-10/-28163 02:59 PM, ecu_jon wrote: > > > ok now i get permission denied > > > import os > > homedir = os.path.expanduser('~') > > try: > >      from win32com.shell import shellcon, shell > >      homedir = shell.SHGetFolderPath(0, shellcon.CSIDL_A

MS Access table values as input into a formula in another table-need help!!

2011-01-30 Thread Cathy James
Dear Python Community, Table1: Prop_codeR_Value GC 0.8 CI 0.6 LDR 0.4 HDR 0.6 TR 0.65 CR 0.35 Table 2: O_ID PROP_CODE AI TArea R_Value Pre_R_Value IR MER02006 LDR 38.19235 132.3178 0.4 0.115456 0.555143 MER02006 TR 20.78983 132.3178 0.65 0.102128 0.555143 MER02006 UO 1.850129 132.3178 0.25 0.00

Re: homedir, file copy

2011-01-30 Thread Dave Angel
On 01/-10/-28163 02:59 PM, ecu_jon wrote: ok now i get permission denied import os homedir = os.path.expanduser('~') try: from win32com.shell import shellcon, shell homedir = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0) except ImportError: homedir = os.path.expandus

Re: homedir, file copy

2011-01-30 Thread ecu_jon
On Jan 30, 7:09 pm, MRAB wrote: > On 30/01/2011 23:43, ecu_jon wrote: > > > ok now i get permission denied > > > import os > > homedir = os.path.expanduser('~') > > try: > >      from win32com.shell import shellcon, shell > >      homedir = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0

Re: homedir, file copy

2011-01-30 Thread MRAB
On 30/01/2011 23:43, ecu_jon wrote: ok now i get permission denied import os homedir = os.path.expanduser('~') try: from win32com.shell import shellcon, shell homedir = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0) except ImportError: homedir = os.path.expanduser("~"

Re: WxPython versus Tkinter.

2011-01-30 Thread rantingrick
On Jan 28, 9:15 am, "Littlefield, Tyler" wrote: > > If you want to rant and scream about accessibility, yell at the > people charging an arm and a leg to make things accessible. > You make a good point as we could always use more opensource, free, and reasonably priced software. However unless th

Re: homedir, file copy

2011-01-30 Thread ecu_jon
ok now i get permission denied import os homedir = os.path.expanduser('~') try: from win32com.shell import shellcon, shell homedir = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0) except ImportError: homedir = os.path.expanduser("~") print homedir print os.listdir(homedir+

Re: homedir, file copy

2011-01-30 Thread rantingrick
On Jan 30, 5:13 pm, ecu_jon wrote: > what does this mean?  Use os.path.join(x,y, z*) > what is the x,y,z? x,y, and z in this case are just generic variables. Consider x+y=10. x and y could both equal 5 or any number of combinations of two numbers who sum equals ten. Anyway see the link chris pos

Re: homedir, file copy

2011-01-30 Thread Chris Rebert
On Sun, Jan 30, 2011 at 3:13 PM, ecu_jon wrote: > On Jan 30, 3:55 pm, r wrote: >> On Jan 30, 2:44 pm, ecu_jon wrote: >> >> > shutil.copy (homedir+"\\backup\\", homedir+"\\backup2\\") >> >> TIP: Use os.path.join(x,y, z*) >> >> > why is there still two \\ in the pathfor the copy command? >> >> I a

Re: homedir, file copy

2011-01-30 Thread ecu_jon
On Jan 30, 3:55 pm, r wrote: > On Jan 30, 2:44 pm, ecu_jon wrote: > > > shutil.copy (homedir+"\\backup\\", homedir+"\\backup2\\") > > TIP: Use os.path.join(x,y, z*) > > > why is there still two \\ in the pathfor the copy command? > > I always convert my paths to use a single '/' instead of '\\'.

Re: Understanding def foo(*args)

2011-01-30 Thread Ben Finney
sl33k_ writes: > I am struggling to grasp this concept about def foo(*args). Also, what > is def bar(*args, *kwargs)? Please work through the Python Tutorial from start to finish http://docs.python.org/tutorial/>, performing each exercise and experimenting with it until you understand. You will

Re: WxPython versus Tkinter.

2011-01-30 Thread Littlefield, Tyler
>Are you a representative voice for all the screen reader users? (Even though >most of them use JAWS that you don't seem to like) Newsflash: I didn't say I didn't like Jaws, and I'm using Jaws -right now-. I don't like jaws and see a lot of future for NVDA as it is both free and open source. I

Re: Style question: Nicknames for deeply nested objects

2011-01-30 Thread Steven D'Aprano
On Sun, 30 Jan 2011 12:51:20 -0500, Gerald Britton wrote: > Hi all, > > Today I was thinking about a problem I often encounter.  Say that I have > (seems I often do!) a deeply nested object, by which I mean object > within object with object, etc. > > For example: > >    x = >    some.deeply.ne

Re: Style question: Nicknames for deeply nested objects

2011-01-30 Thread Jerry Hill
> > I don't. I don't expect anyone to write 10 lines of obfuscation code > when just two will suffice. Maybe you should join the perl group as > they would proud! But Stephen's 10 lines of somewhat obscure code actually works, and your two lines of code doesn't. I know which one I would prefer.

Re: Style question: Nicknames for deeply nested objects

2011-01-30 Thread rantingrick
On Jan 30, 12:53 pm, Stephen Hansen wrote: > On 1/30/11 10:35 AM, rantingrick wrote: > > > Well congratulations Stephen, you win the obfuscation prize of the > > year! > > Yes, > > On 1/30/11 10:09 AM, rantingrick wrote: > > > Here is how a pythonic local block would look > > > with this as localv

Re: homedir, file copy

2011-01-30 Thread Chris Rebert
On Sun, Jan 30, 2011 at 12:44 PM, ecu_jon wrote: > hello, > i am trying to work with windows homedirectory as a starting point for > some kind of file copy command. i'm testing this on a win7 box so my > home is c:\Users\jon\ > here is the code snippet i am working on: > > import os > > homedir =

Re: homedir, file copy

2011-01-30 Thread r
On Jan 30, 2:44 pm, ecu_jon wrote: > shutil.copy (homedir+"\\backup\\", homedir+"\\backup2\\") TIP: Use os.path.join(x,y, z*) > why is there still two \\ in the pathfor the copy command? I always convert my paths to use a single '/' instead of '\\'. Just makes life that much easier! -- http:

homedir, file copy

2011-01-30 Thread ecu_jon
hello, i am trying to work with windows homedirectory as a starting point for some kind of file copy command. i'm testing this on a win7 box so my home is c:\Users\jon\ here is the code snippet i am working on: import os homedir = os.path.expanduser('~') try: from win32com.shell import shellc

Re: Style question: Nicknames for deeply nested objects

2011-01-30 Thread Ian
On 30/01/2011 17:51, Gerald Britton wrote: Hi all, Today I was thinking about a problem I often encounter. Say that I have (seems I often do!) a deeply nested object, by which I mean object within object with object, etc. For example: x = some.deeply.nested.object.method(some.other.deeply

Re: Understanding def foo(*args)

2011-01-30 Thread Ulrich Eckhardt
sl33k_ wrote: > Isnt it like self must be the first parameter to the method/function? "self" is just customary as first parameter to memberfunctions, the language itself doesn't impose this convention, as e.g. C++ does with its "this". > Also, can the terms method and function be used intercha

Re: Understanding def foo(*args)

2011-01-30 Thread Chris Rebert
On Sun, Jan 30, 2011 at 11:26 AM, sl33k_ wrote: > Hi, > > I am struggling to grasp this concept about def foo(*args). The interactive interpreter is your friend! Try experimenting with it next time! http://docs.python.org/tutorial/controlflow.html#arbitrary-argument-lists That `def` defines a va

Re: Understanding def foo(*args)

2011-01-30 Thread Mel
sl33k_ wrote: > Hi, > > I am struggling to grasp this concept about def foo(*args). Also, what > is def bar(*args, *kwargs)? > > Isnt it like self must be the first parameter to the method/function? > If not what are the exceptions? > > Also, can the terms method and function be used interchang

Re: Understanding def foo(*args)

2011-01-30 Thread rantingrick
On Jan 30, 1:26 pm, sl33k_ wrote: > Hi, > > I am struggling to grasp this concept about def foo(*args). Also, what > is def bar(*args, *kwargs)? FYI: the python intepretor is your friend! py> def foo(*args): print args py> foo(1) (1,) py> foo(1,2,3) (1, 2, 3) py> foo(1,[1,23], {'hat':

Re: Understanding def foo(*args)

2011-01-30 Thread sl33k_
Sorry that parameter is **kwargs. -- http://mail.python.org/mailman/listinfo/python-list

Understanding def foo(*args)

2011-01-30 Thread sl33k_
Hi, I am struggling to grasp this concept about def foo(*args). Also, what is def bar(*args, *kwargs)? Isnt it like self must be the first parameter to the method/function? If not what are the exceptions? Also, can the terms method and function be used interchangeably? TIA -- http://mail.pytho

Re: Style question: Nicknames for deeply nested objects

2011-01-30 Thread Stephen Hansen
On 1/30/11 10:35 AM, rantingrick wrote: > Well congratulations Stephen, you win the obfuscation prize of the > year! Yes, On 1/30/11 10:09 AM, rantingrick wrote: > Here is how a pythonic local block would look > > with this as localvar: > localvar.do_something() verses with my(this) as loca

Re: Style question: Nicknames for deeply nested objects

2011-01-30 Thread rantingrick
On Jan 30, 12:23 pm, Stephen Hansen wrote: > --- start > from contextlib import contextmanager > > class Item(object): pass > > deeply = Item() > deeply.nested = Item() > deeply.nested.thing = Item() > > @contextmanager > def my(thing): >     yield thing > > with my(deeply.nested.thing) as o: >  

Re: Style question: Nicknames for deeply nested objects

2011-01-30 Thread Stephen Hansen
On 1/30/11 9:51 AM, Gerald Britton wrote: > 1. If you had to choose between approaches 1 and 2, which one would > you go for, and why? Neither. Ideally, I'd tweak the API around so the deeply nested structure isn't something I need to access regularly. But! If you can't do that, I'd do something l

Re: Style question: Nicknames for deeply nested objects

2011-01-30 Thread Roy Smith
In article , Gerald Britton wrote: > 1. You need to call this thing many times with different arguments, so > you wind up with: > >    x = > some.deeply.nested.object.method(some.other.deeply.nested.object.value1) >    y = > some.deeply.nested.object.method(some.other.deeply.nested.object.val

Re: how to modify axis tick values exponential value location in matplotlib

2011-01-30 Thread Rajendra prasad Gottipati
it seems relevant to my issue. http://stackoverflow.com/questions/3677368/matplotlib-format-axis-offset-values-to-whole-numbers-or-specific-number On Sun, Jan 30, 2011 at 9:45 AM, Rajendra prasad Gottipati < rajendra4li...@gmail.com> wrote: > Hi, > > I am plotting the graph for long values like(

Re: Style question: Nicknames for deeply nested objects

2011-01-30 Thread rantingrick
On Jan 30, 11:51 am, Gerald Britton wrote: [...] > that I might confuse with the first.  To make it look better I might do this: > >    _o = some.deeply.nested.object >    _o.method(_o.value) > > which is fine, I suppose. It is very fine. And you "supposed" correctly! > Then, putting on my co

Style question: Nicknames for deeply nested objects

2011-01-30 Thread Gerald Britton
Hi all, Today I was thinking about a problem I often encounter.  Say that I have (seems I often do!) a deeply nested object, by which I mean object within object with object, etc. For example:    x = some.deeply.nested.object.method(some.other.deeply.nested.object.value) Well, that's extreme bu

how to modify axis tick values exponential value location in matplotlib

2011-01-30 Thread Rajendra prasad Gottipati
Hi, I am plotting the graph for long values like(267838484) so that its printing the tick lables on axes as 2.6 , 2.8 and at the top its having a text like e07 something like this, I want to move the display location of this exponent (e07) as i am having trouble in having multiple y-axis as they a

Re: Is it possible to pass CSV Reader Object As Argument to another Python File ???

2011-01-30 Thread rusi
On Jan 30, 6:31 pm, bansi wrote: > On Jan 28, 4:22 pm, Benjamin Kaplan wrote: > > > You'll need to have Visual C++ 2008 (not 2010) installed for this to > > work. You can get it for free > > fromhttp://www.microsoft.com/express/Downloads/if > > you don't already have it. > > > Thanks Benjamin. W

Re: Use the Source Luke

2011-01-30 Thread rusi
On Jan 30, 6:19 pm, David Boddie wrote: > You might find this page useful: > > http://www.wikinfo.org/index.php/Comparison_of_desktop_search_software > > David Thanks for that link David I note particularly the disclaimer that it was removed from wikipedia [Like when censors stuff you know it

Re: Use the Source Luke

2011-01-30 Thread rantingrick
On Jan 30, 2:53 am, Steven D'Aprano wrote: > In fact, Google > themselves offer a desktop app that does just that: > > http://desktop.google.com/features.html Yes, but at the expense of your privacy! How much private information is being sent back to Google plex an used to flash more click ads a

Re: Use the Source Luke

2011-01-30 Thread Tim Wintle
On Sat, 2011-01-29 at 21:17 -0800, Raymond Hettinger wrote: > My thesis is that we can do even better than that by adding > direct links from the docs to the relevant code with nice > syntax highlighting. +1 - I think the source links are very useful (and thanks for pushing them). However I thin

Re: Is it possible to pass CSV Reader Object As Argument to another Python File ???

2011-01-30 Thread bansi
On Jan 28, 4:22 pm, Benjamin Kaplan wrote: > On Fri, Jan 28, 2011 at 3:42 PM, bansi wrote: > > On Jan 28, 1:52 pm, Benjamin Kaplan wrote: > >> On Fri, Jan 28, 2011 at 1:33 PM, bansi wrote: > >> > On Jan 28, 9:46 am, bansi wrote: > >> >> On Jan 26, 8:31 pm, MRAB wrote: > > >> >> > On 27/01/201

Re: Use the Source Luke

2011-01-30 Thread David Boddie
On Sunday 30 January 2011 05:21, Steven D'Aprano wrote: > If I *wanted* to index my files, I could do so, although in > fairness I'm not aware of any Linux tools which do this -- I know of > `locate`, which indexes file *names* but not content, and `grep`, which > searches file content but doesn't

Re: multiple values for keyword argument

2011-01-30 Thread Steven D'Aprano
On Sat, 29 Jan 2011 10:39:49 -0800, patty wrote: > I am glad you said this. I have been avoiding understanding this > 'self', just accepting it :} For the time being, since my programs I am > creating are for my own use, I think I will make my own names up, that > are descriptive to me as the pr

Re: Use the Source Luke

2011-01-30 Thread Steven D'Aprano
On Sat, 29 Jan 2011 20:50:20 -0800, rusi wrote: > On Jan 30, 9:21 am, Steven D'Aprano +comp.lang.pyt...@pearwood.info> wrote: >> >> > I think this is a fairly accurate description of (one aspect of) the >> > problem. >> > If you dont see it as a problem how do you explain that google can >> > sea

Re: Looking for Remote Python Project

2011-01-30 Thread Ben Finney
joy99 writes: > But do you know whether it would be a paying one, I am looking to be a > freelancer. You might find the Python Job Board useful http://www.python.org/community/jobs/>. -- \“Choose mnemonic identifiers. If you can't remember what | `\mnemonic means