Re: getmtime differs between Py2.5 and Py2.4

2007-05-08 Thread Martin v. Löwis
>> that you are mistaken: There is NO difference between the outcome >> of os.path.getmtime between Py2.5 and Py2.4. It always did return >> UTC, and always will. > > Different results are indeed obtained, as others have demonstrated > (other than the irrelevant float/int distinction). The follow

Re: getmtime differs between Py2.5 and Py2.4

2007-05-08 Thread Martin v. Löwis
> the difference (rounding to an int number of seconds) is just about one > hour; in certain parts of the world (Europe and Africa), that could > indeed be a timezone issue. With the help of Tony Meyer, we rediscovered the explanation: because of a bug in the Microsoft C run-time library, the UTC

Re: Windows, subprocess.Popen & encodage

2007-05-08 Thread Martin v. Löwis
> But, I don't found anything, in any documentations, on this. > > Sombody can confirm? Am I misled? Am I right? You are right, and you are misled. The encoding of the data that you get from Popen.read is not under the control of Python: i.e. not only you don't know, but Python doesn't know, e

Re: Windows, subprocess.Popen & encodage

2007-05-08 Thread MC
Thank you. -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Getting a function name from string

2007-05-08 Thread Cesar Härdfeldt
" It has been my experience that, more often than not, any time you think you want to evaluate strings, you don't need to. For instance, instead of passing around the name of the function as a string: s = "someFunction" eval(s)() you can pass around the function as an object: s = someFunction

Re: change of random state when pyc created??

2007-05-08 Thread Steven D'Aprano
On Tue, 08 May 2007 02:12:27 +, Alan Isaac wrote: > "Steven D'Aprano" <[EMAIL PROTECTED]> wrote in > message > news:[EMAIL PROTECTED] >> If you want to send me the modules, I will have a look at them as well. >> Many eyes make for shallow bugs... > > Dustan and John Machin have confirmed the

Download FireFox with the New Google Toolbar

2007-05-08 Thread Leisure . 208
http://www.mysearchenginewatch.com/ - Bookmark us for your search needs and keep informed on all the new occurances in the Search Industry Updated Daily. Try the new Google Firefox with Google PageRank toolbar. -- http://mail.python.org/mailman/listinfo/python-list

Re: how do you implement a reactor without a select?

2007-05-08 Thread Antoon Pardon
On 2007-05-08, Michele Simionato <[EMAIL PROTECTED]> wrote: > On May 8, 4:53 am, [EMAIL PROTECTED] (Alex Martelli) wrote: >> What do you expect from "timers on Linux" that you could not get with a >> simple "sleep for the next N milliseconds"? A timer (on Linux or >> elsewhere) can jog your proces

Re: Simulating simple electric circuits

2007-05-08 Thread Dave Baum
In article <[EMAIL PROTECTED]>, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > Hello all, > > I'm trying to simulate simple electric logic (asynchronous) > circuits. By "simple" I mean that I only want to know if I > have "current" or "no current" (it's quite digital) and the only > elements

Re: how do you implement a reactor without a select?

2007-05-08 Thread Michele Simionato
On May 8, 11:23 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: > I once played with the following module to do something similar. That looks interesting, I will have a look at it. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Binding

2007-05-08 Thread STiAT
Hello, I've basically had plans on just extending python for the wrapper. That basically works fine, i just don't get along by the types provided (http://docs.python.org/ext/ext.html). Anyway, i want to extend python for types. The problem i currently experience is the following. Guess what - i

Re: Specification for win32com.client package

2007-05-08 Thread Tim Golden
Peter Fischer wrote: > Hello, (sorry, the first message bounced; because it is urgent and I wait > since > yesterday, here it's again): > > > I am searching for documentation about the interface the win32com > package > provides, especially win32com.client. I searched the web and Mark Ham

Re: Can Python Parse an MS SQL Trace?

2007-05-08 Thread Tim Golden
[EMAIL PROTECTED] wrote: > On May 7, 8:34 am, Tim Golden <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >>> Can Python parse a trace file created with MS SQL's profiler? There >>> are a few thousand lines in the trace file and I need to find the >>> insert statements and the stored procedur

Re: msbin to ieee

2007-05-08 Thread revuesbio
On 7 mai, 23:38, John Machin <[EMAIL PROTECTED]> wrote: > On May 7, 11:37 pm, revuesbio <[EMAIL PROTECTED]> wrote: > > > > > On 7 mai, 14:56, John Machin <[EMAIL PROTECTED]> wrote: > > > > On May 7, 10:00 pm, revuesbio <[EMAIL PROTECTED]> wrote: > > > > > On 7 mai, 13:21, John Machin <[EMAIL PROTEC

Designing a graph study program

2007-05-08 Thread andrea
I'm studying some graphs algorithm (minumum spanning tree, breath search first topological sort etc etc...) and to understand better the theory I'm implementing them with python... I made my own graph class, the constructor is simply this: class graph: "in forma di matrice e' una matrice n

Re: interesting exercise

2007-05-08 Thread James Stroud
sherry wrote: > On May 8, 9:31 am, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: >> On Mon, 07 May 2007 20:45:52 -0700, Michael Tobis wrote: >>> I have a reasonably elegant solution but it's a bit verbose (a couple >>> dozen lines which I'll post later if there is interest). Is there some >>> clever

File Name Format

2007-05-08 Thread Anand
Greetings, How do I convert programmatically the file names from WIN32 to UNIX format? A code snippet would be of great help. We are new to python! :) Thanks. Best regards, Anand -- http://mail.python.org/mailman/listinfo/python-list

Re: File Name Format

2007-05-08 Thread Diez B. Roggisch
Anand wrote: > Greetings, > > How do I convert programmatically the file names from WIN32 to UNIX > format? > > A code snippet would be of great help. > We are new to python! :) unix_name = win_name.replace("\\", "/") But this of course won't work for anything that starts with a drive letter f

Re: File Name Format

2007-05-08 Thread rishi pathak
One thing you could do is to create assign dir for c drive d drive etc as /c , /d etc then this would work unix_name = win_name.replace("\\","/").replace("c:","/c").replace("d:","/d") On 5/8/07, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: Anand wrote: > Greetings, > > How do I convert programm

Re: long lists

2007-05-08 Thread Merrigan
On May 7, 10:21 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 07 May 2007 09:14:34 -0300, Merrigan <[EMAIL PROTECTED]> > escribió: > > > The Script it available at this url : > >http://www.lewendewoord.co.za/theScript.py > > I understand this as a learning exercise, since there are l

Re: Newbie prob: How to write a file with 3 threads?

2007-05-08 Thread est
On May 8, 2:13 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On 7 May 2007 18:22:07 -0700, est <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: > > > > > I guess I will write multiple files, one thread one file, and after > > all threads terminates, I combine the files. That'

Re: Designing a graph study program

2007-05-08 Thread Diez B. Roggisch
> > Well then I wanted to draw graphs and I found that pydot is working > really nicely. > BUT I'd like to do this, an interactive program to see ho the > algorithms works... > For example in the breath search first, every time the algorithm > colors a node, the program should redraw the graphs. W

Re: Designing a graph study program

2007-05-08 Thread andrea
On 8 Mag, 13:02, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > Well then I wanted to draw graphs and I found that pydot is working > > really nicely. > > BUT I'd like to do this, an interactive program to see ho the > > algorithms works... > > For example in the breath search first, every time

Specification for win32com.client package?

2007-05-08 Thread Peter Fischer
Hello, I am searching for documentation about the interface the win32com package provides, especially win32com.client. I searched the web and Mark Hammond’s homepage but only found example code using Dispatch() and DispatchEx() etc. Isn’t there a full list of the functions win32.com.clien

Specification for win32com.client package

2007-05-08 Thread Peter Fischer
Hello, (sorry, the first message bounced; because it is urgent and I wait since yesterday, here it's again): I am searching for documentation about the interface the win32com package provides, especially win32com.client. I searched the web and Mark Hammond’s homepage but only found example

Re: Muzzle Velocity (was: High resolution sleep (Linux)

2007-05-08 Thread Hendrik van Rooyen
"Dennis Lee Bieber" <[EMAIL PROTECTED],..m.com> wrote: > On Sun, 6 May 2007 10:15:26 +0200, "Hendrik van Rooyen" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > A rifle bullet can travel at around 5000 feet per second. > > You've got some fast rifles over there... LO

__getattr__ and __getattribute__

2007-05-08 Thread km
Hi all, i find it difficult to understand the difference between the magic methods __getattr__ and __getattribute__ and so donot know when to use former or later. can someone brief me on it ? regards, KM -- http://mail.python.org/mailman/listinfo/python-list

replacing string in xml file

2007-05-08 Thread saif . shakeel
Hi, I need to replace a string in xml file with something else.Ex - rate rate - Here i have opened an xml file(small part is pasted here).I want to replace the word 'localId' with 'dataPackageID' wherever it comes in xml file.I tried this b

Re: Designing a graph study program

2007-05-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, andrea wrote: > But I have some design doubts, I'd like to keep the algorithm (for > example bfs) as clean as possible, being independent from the drawing > methods. > And how could I make it step through algorithms without having a more > complicated code? Maybe using thre

Re: replacing string in xml file

2007-05-08 Thread Stefan Behnel
[EMAIL PROTECTED] schrieb: > Hi, > I need to replace a string in xml file with something else.Ex > > - > rate > rate > > > > - > > Here i have opened an xml > file(small part is pasted here).I want to replace the word 'localId' > with 'data

Re: replacing string in xml file

2007-05-08 Thread Carsten Haese
On Tue, 08 May 2007 13:30:59 +0200, Stefan Behnel wrote > [EMAIL PROTECTED] schrieb: > [...] > > file_input = raw_input("Enter The ODX File Path:") > > input_xml = open(file_input,'r') > > This should say > > input_xml = open(file_input,'r').read() ...and then it still won't work because the O

Re: replacing string in xml file

2007-05-08 Thread saif . shakeel
On May 8, 4:30 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > > > > > Hi, > > I need to replace a string in xml file with something else.Ex > > > - > > rate > > rate > > > > > > > > - > > > Here i have opened

Re: Getting a function name from string

2007-05-08 Thread Carsten Haese
On Tue, 8 May 2007 09:38:48 +0200, Cesar Härdfeldt wrote > [...]   > I now have 'module' and 'function' as strings and 'parms' normally as a list > of strings. I can import the module by __import__(module) but is there > another way to call: > module.function(parms) than using eval()? function_t

Re: Designing a graph study program

2007-05-08 Thread Diez B. Roggisch
> Ok thank you very much I'll try with that. > But I have some design doubts, I'd like to keep the algorithm (for > example bfs) as clean as possible, being independent from the drawing > methods. > And how could I make it step through algorithms without having a more > complicated code? Maybe usin

changing a var by reference of a list

2007-05-08 Thread Jorgen Bodde
Hi, I am trying to simplify my code, and want to automate the assigning of variables I get back from a set. I was thinking of putting the variables I want changed in a list: L = [self._varA, self._varB ] self._varA is a variable I want to change when I pass L to a function. I know doing this; L

Re: Specification for win32com.client package

2007-05-08 Thread Peter Fischer
Hello Tim, thank you for your answer and sorry for the multiple e-mails. Thank you also for the hint on the book. I already read into it in our local library. Its good, but a little outdated (Jan. 2000) as I mentioned in http://mail.python.org/pipermail/python-list/2007-May/438800.html Do you k

Re: Specification for win32com.client package

2007-05-08 Thread Tim Golden
Peter Fischer wrote: > Hello Tim, > > thank you for your answer and sorry for the multiple e-mails. Thank you also > for > the hint on the book. I already read into it in our local library. Its good, > but a > little outdated (Jan. 2000) as I mentioned in > > http://mail.python.org/pipermail/py

Gui thread and async jobs.

2007-05-08 Thread king kikapu
Hi, i am reading the book "Python Cookbook, 2nd edition" and i encountered a very handy recipe, the one that is called "Combining GUIs and Asynchronous I/O with Threads" It is talking about retain a main GUI thread, doing async work with worker threads and have both talk through a Queue object to

Re: interesting exercise

2007-05-08 Thread Carsten Haese
On Mon, 2007-05-07 at 22:20 -0700, sherry wrote: > On May 8, 9:31 am, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: > > [snip Steven's response about a programming exercise...] > > [snip Sherrybove's spam about physical exercise...] And today's award for the most conspicuous failure of the Turing

Re: Gui thread and async jobs.

2007-05-08 Thread Diez B. Roggisch
king kikapu wrote: > Hi, i am reading the book "Python Cookbook, 2nd edition" and i > encountered a very handy recipe, the one that is called "Combining > GUIs and Asynchronous I/O with Threads" > > It is talking about retain a main GUI thread, doing async work with > worker threads and have both

Re: No module named urllib

2007-05-08 Thread HMS Surprise
On May 7, 6:54 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Mon, 2007-05-07 at 16:24 -0700, HMS Surprise wrote: > > Since sys.path = ['.', 'C:\\maxq\\lib\\Lib', 'C:\\maxq\\jython'] I > > copied urllib to c:\maxq\lib\Lib. > > > Now I get the error - > > > Traceback (innermost last): > > File

Re: changing a var by reference of a list

2007-05-08 Thread Larry Bates
Jorgen Bodde wrote: > Hi, > > I am trying to simplify my code, and want to automate the assigning of > variables I get back from a set. I was thinking of putting the > variables I want changed in a list: > > L = [self._varA, self._varB ] > > self._varA is a variable I want to change when I pass

Re: changing a var by reference of a list

2007-05-08 Thread Diez B. Roggisch
Jorgen Bodde wrote: > Hi, > > I am trying to simplify my code, and want to automate the assigning of > variables I get back from a set. I was thinking of putting the > variables I want changed in a list: > > L = [self._varA, self._varB ] > > self._varA is a variable I want to change when I pass

Re: changing a var by reference of a list

2007-05-08 Thread Jorgen Bodde
Ok thanks, I will try this approach. The idea was that I could give a list to the SQL execute command, so that the results coming back would automatically be assigned to variables. With regards, - Jorgen On 5/8/07, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > Jorgen Bodde wrote: > > > Hi, > > >

CPU usage

2007-05-08 Thread Navid Parvini
Dear All, I want to get the CPU usage in my code. Is there any module in Python to get it? Would you please help me? Thank you in advance. Navid - Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games.-- http:

Re: BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-08 Thread David Bostwick
In article <[EMAIL PROTECTED]>, James Stroud <[EMAIL PROTECTED]> wrote: [...] > >Conspiracy theorists at least have thought behind their crazy ideas--but >you just come up with monkey talk insults. Good job monkey. > >Monkey can't think of something to say but monkey talk? That's ok, >here's a

Re: No module named urllib

2007-05-08 Thread Carsten Haese
On Tue, 2007-05-08 at 06:19 -0700, HMS Surprise wrote: > Thanks for posting. How does one ensure (or even detect) that their > libraries are compatible? You ensure that by taking the library from the version of Python that you're running. > I loaded this library as part of Python 2.5. That's too

Re: Gui thread and async jobs.

2007-05-08 Thread king kikapu
On May 8, 4:00 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > king kikapu wrote: > > Hi, i am reading the book "Python Cookbook, 2nd edition" and i > > encountered a very handy recipe, the one that is called "Combining > > GUIs and Asynchronous I/O with Threads" > > > It is talking about retai

Setting up python socket server with non-standard termination string.

2007-05-08 Thread indy1000
Hi, I'm trying to create a tcp/ip port listening socket server for various cellular devices that don't use the standard "\r\n" termination string at the end of their message. Instead, they use "-ND-". Do you know how I can setup such a server, preferably using either 'socket.py', 'serversocket.p

Re: getmtime differs between Py2.5 and Py2.4

2007-05-08 Thread Josef Dalcolmo
Martin v. Löwis wrote: >> the difference (rounding to an int number of seconds) is just about one >> hour; in certain parts of the world (Europe and Africa), that could >> indeed be a timezone issue. > > With the help of Tony Meyer, we rediscovered the explanation: because > of a bug in the Micros

Re: No module named urllib

2007-05-08 Thread HMS Surprise
> To summarize the summary, are you sure you need to use Jython instead of > standard CPython? > Thanks for all your help Carsten, you have been more than patient with me. To answer your question I must admit I do not know. I am trying to use a tool called maxq (maxq.tigris.org) that has limited

Re: changing a var by reference of a list

2007-05-08 Thread Carsten Haese
On Tue, 2007-05-08 at 15:40 +0200, Jorgen Bodde wrote: > Ok thanks, > > I will try this approach. The idea was that I could give a list to the > SQL execute command, so that the results coming back would > automatically be assigned to variables. It's not possible to do that exactly as stated. A f

ipython environment question

2007-05-08 Thread Shane Geiger
""" I'm trying to import ipython shell (which works great!) to set some variables and then run a function (which doesn't work). It seems like such a simple thing. Here's an example script to show what I'm trying to do. Run the script and then try to change the variable project_name from the

Re: No module named urllib

2007-05-08 Thread HMS Surprise
On May 8, 9:13 am, HMS Surprise <[EMAIL PROTECTED]> wrote: > > To summarize the summary, are you sure you need to use Jython instead of > > standard CPython? > > Thanks for all your help Carsten, you have been more than patient with > me. > > To answer your question I must admit I do not know. I am

Re: Gui thread and async jobs.

2007-05-08 Thread Diez B. Roggisch
>> It depends on the toolkit you use. Qt has thread-safe custom events in >> 3.x, and afaik signal/slots (and thus events) are generally thread-safe >> in 4.x. So, no problems there. >> >> Diez > > Aha...So you do not use polling there (in Qt), correct ? You don't need to, no. Diez -- http://m

Re: CPU usage

2007-05-08 Thread Tim Golden
Navid Parvini wrote: > I want to get the CPU usage in my code. > Is there any module in Python to get it? What Operating System are you on? TJG -- http://mail.python.org/mailman/listinfo/python-list

Re: Gui thread and async jobs.

2007-05-08 Thread king kikapu
On May 8, 5:52 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >> It depends on the toolkit you use. Qt has thread-safe custom events in > >> 3.x, and afaik signal/slots (and thus events) are generally thread-safe > >> in 4.x. So, no problems there. > > >> Diez > > > Aha...So you do not use pol

Re: ipython environment question

2007-05-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Shane Geiger wrote: > Run the script and then try to change the variable project_name from the > ipython prompt and then type create() > and the new value you assigned will *not* be used. I tried to use "def > create(project_name = project_name):" Even that didn't work.

Re: File Name Format

2007-05-08 Thread Grant Edwards
On 2007-05-08, Anand <[EMAIL PROTECTED]> wrote: > How do I convert programmatically the file names from WIN32 to UNIX format? You don't need to. AFAIK, all legal WIN32 filenames are legal UNIX file names. > A code snippet would be of great help. As would an example of what you're trying to do.

pymacs

2007-05-08 Thread Grant
Hi there. Does anyone out there know what's going on with pymacs currently? Thanks, Grant. -- http://mail.python.org/mailman/listinfo/python-list

Re: interesting exercise

2007-05-08 Thread Steven D'Aprano
On Tue, 08 May 2007 10:22:05 +, James Stroud wrote: > This takes annoying past annoying to some new level of hell to which > even satan himself wouldn't venture. And thank you for sharing that piece of spam with us again. It was so much less enjoyable to see it the second time. Seriously Ja

XLRD Python 2.51 Question

2007-05-08 Thread [EMAIL PROTECTED]
I am trying to read an Excel book with XLRD and I am getting the following error Traceback (most recent call last): File "C:\temp\ReadGoldmanExcelFiles.py", line 62, in startRow = 0, sh_idx = 0, path2 = '//otaam.com/root/SharedFiles/ GlobeOp/Risk/Cal Projects/temp/') File "C:\temp\ReadGol

Re: Emacs and pdb after upgrading to Ubuntu Feisty

2007-05-08 Thread levander
Okay, thanks Alexander and Bernstein. I'll lookinto Emacs 23, but I'm worried about compatibility with modes. Does all the stuff that works in Emacs 21 work in 23? Like even that ipython.el file, does it work in Emacs 23? And, I probably will report a bug to either Ubuntu's Launchpad or to Debi

Re: tkinter - label widget text selection

2007-05-08 Thread rahulnag22
On May 6, 2:24 pm, Rob Wolfe <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] writes: > > Hi, > > I guess this is a very trivial question -- > > I am using a label widget to display text (black font in a white > > background color). I am trying to use my mouse to scroll over the > > displayed text to

Re: XLRD Python 2.51 Question

2007-05-08 Thread Carsten Haese
On Tue, 2007-05-08 at 08:26 -0700, [EMAIL PROTECTED] wrote: > CompDocError: MSAT extension: accessing sector 1717046 but only 2887 > in file > > I am not sure what this means at all At least superficially that sounds like the file you're trying to open is truncated or otherwise corrupted to the p

sys.path

2007-05-08 Thread HMS Surprise
Is sys.path setup differnently in jython vs python? I have environment variables pythonpath and jythonpath set to include C:\python22 but the initial printout indicates it is being ignored. Also when I used sys.path.extend, the added pathname shows up as a series of single characters. Have I misus

Re: Can Python Parse an MS SQL Trace?

2007-05-08 Thread kyosohma
On May 8, 5:18 am, Tim Golden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On May 7, 8:34 am, Tim Golden <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] wrote: > >>> Can Python parse a trace file created with MS SQL's profiler? There > >>> are a few thousand lines in the trace file a

Re: sys.path

2007-05-08 Thread Klaus Alexander Seistrup
HMS Surprise wrote: > Have I misused .extend? The .extend() method expects an iterable, try .append() instead. Cheers, -- Klaus Alexander Seistrup http://klaus.seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Towards faster Python implementations - theory

2007-05-08 Thread John Nagle
Some faster Python implementations are under development. JPython has been around for a while, and PyPy and ShedSkin continue to move forward. It's worth thinking about what slows down Python implementations. It isn't the dynamism, really. As others have pointed out in the Python litera

Re: Towards faster Python implementations - theory

2007-05-08 Thread Paul Boddie
On 8th May, 17:53, John Nagle <[EMAIL PROTECTED]> wrote: > Some faster Python implementations are under development. > JPython Ahem: Jython! > has been around for a while, and PyPy and ShedSkin > continue to move forward. It's worth thinking about what slows > down Python implementations.

Atttribute error

2007-05-08 Thread HMS Surprise
The snippet below causes an attribute error. AttributeError: module 'urllib' has no attribute 'urlopen' I am using python 2.2.3. According to the documentation at C: \Python22\Doc\lib urllib has a function called urlopen. #~~~ import urllib class logi

Re: Atttribute error

2007-05-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, HMS Surprise wrote: > The snippet below causes an attribute error. > > AttributeError: module 'urllib' has no attribute 'urlopen' > > I am using python 2.2.3. According to the documentation at C: > \Python22\Doc\lib urllib has a function called urlopen. Do you have a fil

Re: sys.path

2007-05-08 Thread HMS Surprise
On May 8, 10:40 am, Klaus Alexander Seistrup <[EMAIL PROTECTED]> wrote: > HMS Surprise wrote: > > Have I misused .extend? > > The .extend() method expects an iterable, try .append() instead. > > Cheers, > > -- > Klaus Alexander Seistruphttp://klaus.seistrup.dk/ Thanks Klaus. That certainly cleane

Re: Atttribute error

2007-05-08 Thread HMS Surprise
On May 8, 11:37 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, HMS Surprise > wrote: > > > The snippet below causes an attribute error. > > > AttributeError: module 'urllib' has no attribute 'urlopen' > > > I am using python 2.2.3. According to the documentation a

Re: BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-08 Thread James Beck
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > On Mon, 7 May 2007 10:55:55 -0400, James Beck > <[EMAIL PROTECTED]> wrote: > > >In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > >says... > >> On Sat, 05 May 2007 07:54:50 +0100, Eeyore > >> <[EMAIL PROTECTED]> wrote: > >> > >> > >

Re: changing a var by reference of a list

2007-05-08 Thread Duncan Booth
"Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > I will try this approach. The idea was that I could give a list to the > SQL execute command, so that the results coming back would > automatically be assigned to variables. > Don't forget that in Python a function can return multiple results (or rathe

Re: Atttribute error

2007-05-08 Thread HMS Surprise
PS > Add this directly after the ``import`` to see what's happening: > > print urllib.__file__ > print dir(urllib) > C:\maxq\bin\testScripts\.\urllib.py ['__doc__', '__file__', '__name__', 'string'] -- http://mail.python.org/mailman/listinfo/python-list

Re: Towards faster Python implementations - theory

2007-05-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Paul Boddie wrote: >> On the typing front, the neatest way to express typing is via >> initialization. With the Shed Skin restrictions, if all variables are >> initialized before use (preferably in __init__), there's no need to >> maintain an "undefined" flag for a var

Re: File Name Format

2007-05-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Grant Edwards wrote: > On 2007-05-08, Anand <[EMAIL PROTECTED]> wrote: > >> How do I convert programmatically the file names from WIN32 to UNIX format? > > You don't need to. AFAIK, all legal WIN32 filenames are legal > UNIX file names. Doesn't this depend more on the f

Re: Crypto plaintext padding (SOLVED)

2007-05-08 Thread David Clymer
On Sun, 2007-05-06 at 11:39 -0400, David Clymer wrote: > I'm using pycrypto's AES module, and am attempting to automate the > padding of the plaintext (the size of the text to be encrypted must be a > multiple of 16). However, my padding scheme sometimes fails to calculate > the necessary padding c

Crypto plaintext padding

2007-05-08 Thread David Clymer
I'm using pycrypto's AES module, and am attempting to automate the padding of the plaintext (the size of the text to be encrypted must be a multiple of 16). However, my padding scheme sometimes fails to calculate the necessary padding correctly, and I'm not sure why. Using the text 'foo bar', it

Re: Python Binding

2007-05-08 Thread Stefan Behnel
STiAT wrote: > Why do you all suggest other things than the way suggested by python? Because going to Paris is not the only way to get french bread? Why would you want to write all that ugly glue code by hand that Pyrex generates for free? Module descriptors? Class descriptors? Method descriptors

1.#QNAN Solution

2007-05-08 Thread Greg Corradini
Hello all, I'm running descriptive stats on mileages from a database (float numbers, about a million records). My sum returns 1.#QNAN, which I understand from searching this forum is an error. While I'm looking for help in solving this problem, I'm more interested in a general explanation about t

Re: File Name Format

2007-05-08 Thread Grant Edwards
On 2007-05-08, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, Grant Edwards wrote: > >> On 2007-05-08, Anand <[EMAIL PROTECTED]> wrote: >> >>> How do I convert programmatically the file names from WIN32 to UNIX format? >> >> You don't need to. AFAIK, all legal WIN3

Re: 1.#QNAN Solution

2007-05-08 Thread Grant Edwards
On 2007-05-08, Greg Corradini <[EMAIL PROTECTED]> wrote: > I'm running descriptive stats on mileages from a database > (float numbers, about a million records). My sum returns > 1.#QNAN, which I understand from searching this forum is an > error. Not necessarily. You've ended up with a floating

Re: change of random state when pyc created??

2007-05-08 Thread Alan Isaac
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > My testing suggests the bug is *not* to do with pyc files at all. I'm > getting different results when running the files, even when the directory > is read-only (and therefore no pyc files can be created). > > My resul

Re: Emacs and pdb after upgrading to Ubuntu Feisty

2007-05-08 Thread Alexander Schmolck
levander <[EMAIL PROTECTED]> writes: > Okay, thanks Alexander and Bernstein. I'll lookinto Emacs 23, but I'm > worried about compatibility with modes. Does all the stuff that works > in Emacs 21 work in 23? I've switched from 21 to 23 a few weeks ago and don't recall any particular issues (an

Re: No module named urllib

2007-05-08 Thread HMS Surprise
Great idea Dennis, I will look into that. Thanks, jh -- http://mail.python.org/mailman/listinfo/python-list

fminbound

2007-05-08 Thread darkside
Hello everyone: I'm new using scipy, so I'm sorry if any of my questions are silly. I'm trying to find the maxima, absolut and local, of a function, in order to fit an exponencial curve and get de exponecial argument. My function if the soluction of a couple equations system: def derivs3(x,t,ga

Re: Setting up python socket server with non-standard termination string.

2007-05-08 Thread Jean-Paul Calderone
On 8 May 2007 06:59:26 -0700, [EMAIL PROTECTED] wrote: >Hi, > >I'm trying to create a tcp/ip port listening socket server for various >cellular devices that don't use the standard "\r\n" termination string >at the end of their message. Instead, they use "-ND-". Do you know >how I can setup such

tkinter get widget option value

2007-05-08 Thread rahulnag22
Hi, If I have a button widget w = Button(root, text = "Button", state = 'disabled') How can I get the value of option 'state' from the widget 'w'. I want something like -- print w.state >> to print out >> 'disabled' Thanks Rahul -- http://mail.python.org/mailman/listinfo/python-list

Suggestions for how to approach this problem?

2007-05-08 Thread John Salerno
I figured I might give myself a little project to make my life at work easier, so here's what I want to do: I have a large list of publication citations that are numbered. The numbers are simply typed in with the rest of the text. What I want to do is remove the numbers and then put bullets ins

Re: BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-08 Thread Michael A. Terrell
James Beck wrote: > > Yep, you must have access to better drugs than I do. > You get to hallucinate your stuff up. > Don't forget to adjust your tin beanie! Its not a beanie. He had his head tin plated. :( -- Service to my country? Been there, Done that, and I've got my DD214 to prove it.

Re: 1.#QNAN Solution

2007-05-08 Thread Greg Corradini
Thanks for you help Grant Grant Edwards wrote: > > On 2007-05-08, Greg Corradini <[EMAIL PROTECTED]> wrote: > >> I'm running descriptive stats on mileages from a database >> (float numbers, about a million records). My sum returns >> 1.#QNAN, which I understand from searching this forum is an >

Re: Suggestions for how to approach this problem?

2007-05-08 Thread John Salerno
John Salerno wrote: > typed, there are often line breaks at the end of each line Also, there are sometimes tabs used to indent the subsequent lines of citation, but I assume with that I can just replace the tab with a space. -- http://mail.python.org/mailman/listinfo/python-list

Re: After the Deletion of Google Answers, . U Got Questions Fills the Gap Answering and Asking the Tough Questions

2007-05-08 Thread MMM
On 7 May 2007 10:45:51 -0700, [EMAIL PROTECTED] wrote: >My friend asked some tough questions >http://ugotquestions.blogspot.com/2007_05_01_archive.html >unlike yahoo answers ( Which Generates Content with Answers ) U got >questions picks only the best, Real Person Questions.,yeah so there is >thi

Re: Suggestions for how to approach this problem?

2007-05-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, John Salerno wrote: > I have a large list of publication citations that are numbered. The > numbers are simply typed in with the rest of the text. What I want to do > is remove the numbers and then put bullets instead. Now, this alone > would be easy enough, with a littl

chdir()

2007-05-08 Thread HMS Surprise
Tried executing os.chdir("c:\twill") from a python Tk shell and got the error message: WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: 'c:\twill'. I have the directory exists as I copied the name from the explorer window that was open to it. What is

Re: chdir()

2007-05-08 Thread Necmettin Begiter
On Tuesday 08 May 2007 22:54:39 HMS Surprise wrote: > WindowsError: [Error 123] The filename, directory name, or volume > label syntax is incorrect: 'c:\twill'. > > What is wrong with the syntax? Try 'c:\\twill' because the '\' character is the escape character. Eg: \n is new-line (aka crlf) \t is

Re: Suggestions for how to approach this problem?

2007-05-08 Thread John Salerno
Marc 'BlackJack' Rintsch wrote: > I think I have vague idea how the input looks like, but it would be > helpful if you show some example input and wanted output. Good idea. Here's what it looks like now: 1. Levy, S.B. (1964) Isologous interference with ultraviolet and X-ray irradiated bacteri

  1   2   >