Re: to create variable from dict

2010-03-15 Thread hiral
On Mar 12, 8:02 pm, Jean-Michel Pichavant wrote: > Luis M. González wrote: > > On Mar 12, 10:59 am,hiral wrote: > > >> Hi, > > >> Is there any way to create variables which name matches with dict key? > > >> For example: > >> dict1 = {"abc":'1", "def":"2"} > > >> Now I am looking to have variable

Hacker News, Xahlee.Org, and What is Politics?

2010-03-15 Thread Xah Lee
A essay related to the recent discussion of banning, and lisp associated group at ycombinator.com . - Hacker News, Xahlee.Org, and What is Politics? Xah Lee, 2010-03-14 Today, i noticed that someone posted one of my article “Why Emacs is still so usefu

Re: sqlite savepoint problem [solved]

2010-03-15 Thread Laszlo Nagy
No it doesn't. The problem is that using a connection as a context manager doesn't do what you think. It does *not* start a new transaction on __enter__ and commit it on __exit__. As far as I can tell it does nothing on __enter__ and calls con.commit() or con.rollback() on exit. With isola

Re: sqlite savepoint problem [solved]

2010-03-15 Thread Laszlo Nagy
Annotating your example: # entering this context actually does nothing with conn: # a transaction is magically created before this statement conn.execute("insert into a values (1)") # and is implicitly committed before this statement conn.execute("SAVEPOINT sp1")

"Distributed" database in Python

2010-03-15 Thread David Tynnhammar
Greetings. I'm looking for a "distributed" database. (I'm not sure if distributed is the correct terminology though). My problem is this; I have a client application which once in a while needs to sync with a central database. (And of course the client -databases might be updated locally etc). Ar

Re: Hacker News, Xahlee.Org, and What is Politics?

2010-03-15 Thread Brian J Mingus
On Mon, Mar 15, 2010 at 1:16 AM, Xah Lee wrote: > A essay related to the recent discussion of banning, and lisp > associated group at ycombinator.com . Is there some Python related issue I might help you out with? Or perhaps you wish to provide Python assistance to someone on this list. Or perh

Re: Is it possible to use re2 from Python?

2010-03-15 Thread Kev Dwyer
On Sun, 14 Mar 2010 14:40:34 -0700, _wolf wrote: >> There's a recent thread about this on the python-dev list, > > pointers? i searched but didn’t find anything. http://mail.python.org/pipermail/python-dev/2010-March/098354.html -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite savepoint problem [solved]

2010-03-15 Thread Ryan Kelly
On Fri, 2010-03-12 at 09:35 +0100, Laszlo Nagy wrote: > > No it doesn't. The problem is that using a connection as a context > > manager doesn't do what you think. > > > > It does *not* start a new transaction on __enter__ and commit it on > > __exit__. As far as I can tell it does nothing on __

Re: "Distributed" database in Python

2010-03-15 Thread Steven D'Aprano
On Mon, 15 Mar 2010 08:49:34 +0100, David Tynnhammar wrote: > Greetings. I'm looking for a "distributed" database. (I'm not sure if > distributed is the correct terminology though). > > My problem is this; I have a client application which once in a while > needs to sync with a central database.

Re: dll in project?

2010-03-15 Thread Tim Golden
On 15/03/2010 03:43, Alex Hall wrote: I have a dll I am trying to use, but I get a Windows error 126, "the specified module could not be found". Here is the code segment: nvdaController=ctypes.windll.LoadLibrary("nvdaControllerClient32.dll") I have the specified dll file in the same dire

staticmethod and setattr

2010-03-15 Thread Michael.Lausch
Hi, I managed to get confused by Python, which is not such an easy task. The problem i have is rooted in marshalling, JSON and Dojo. I need some static class in function with the name "$ref" i tried: class Foo(object): @staticmethod def _ref(o): pass setattr(Foo, "$ref", Foo._re

Re: iterator/generator

2010-03-15 Thread Mark Lawrence
vsoler wrote: I am working on a script that reads data from an excel workbook. The data is located in a named range whose first row contains the headers. It works!!! I find it superb that python is able to do such things!!! Now my questions. a. My ranges can in practice be quite big, and altho

Re: Hacker News, Xahlee.Org, and What is Politics?

2010-03-15 Thread rantingrick
Bravo!, Bravo! A wonderful post xah, thanks for sharing and i hope it sinks in with the people around here who need a lesson in humility. I was just a few days ago feeling quite passionate about this subject and creating my own draft but than i lost interest because i knew nobody would even care

Re: sqlite savepoint problem [solved]

2010-03-15 Thread Laszlo Nagy
#1. By using isolation_level = None, connection objects (used as a context manager) WON'T automatically commit or rollback transactions. #2. Using any isolation level, connection objects WON'T automatically begin a transaction. #3. Possibly, include your connection manager class code, to show h

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-15 Thread Robin Becker
On 12/03/2010 19:29, "Martin v. Löwis" wrote: Not sure if this is a bug I think it is. It seems that the cross-build support in msvc9compiler has been tested only in a build tree of Python (where there is no Libs directory). This minor patch seems to fix the problem for me (using a PCBuild fo

Re: Reverse engineering CRC?

2010-03-15 Thread Gregory Ewing
I've solved the problem now. It turned out to be a very standard CRC algorithm, complicated by the presence of a few extra bytes of data being checked that didn't appear explicitly in the file anywhere. In the process I developed some very general techniques for solving this kind of problem, whi

Re: dll in project?

2010-03-15 Thread Ulrich Eckhardt
Alex Hall wrote: > I have a dll I am trying to use, but I get a Windows error 126, "the > specified module could not be found". Here is the code segment: > nvdaController=ctypes.windll.LoadLibrary("nvdaControllerClient32.dll") In addition to Alf's answer, this can also happen when the OS can't fin

Re: staticmethod and setattr

2010-03-15 Thread Steven D'Aprano
On Mon, 15 Mar 2010 01:43:02 -0700, Michael.Lausch wrote: > Hi, > > I managed to get confused by Python, which is not such an easy task. > > The problem i have is rooted in marshalling, JSON and Dojo. I need some > static class in function with the name "$ref" i tried: > class Foo(object): >

Re: File existence check with partial filename

2010-03-15 Thread Lan Qing
Or use the regular module: import re import os for filename in os.listdir('.'): if re.match("*HV*", filename): # do something with the file On Mon, Mar 15, 2010 at 12:24 PM, Alf P. Steinbach wrote: > * Sang-Ho Yun: > > I learned that I can check the existence of a file using >>

Re: dll in project?

2010-03-15 Thread Alex Hall
On 3/15/10, Ulrich Eckhardt wrote: > Alex Hall wrote: >> I have a dll I am trying to use, but I get a Windows error 126, "the >> specified module could not be found". Here is the code segment: >> nvdaController=ctypes.windll.LoadLibrary("nvdaControllerClient32.dll") > > In addition to Alf's answer

Re: dll in project?

2010-03-15 Thread Alf P. Steinbach
* Alex Hall: On 3/15/10, Ulrich Eckhardt wrote: Alex Hall wrote: I have a dll I am trying to use, but I get a Windows error 126, "the specified module could not be found". Here is the code segment: nvdaController=ctypes.windll.LoadLibrary("nvdaControllerClient32.dll") In addition to Alf's ans

Re: dll in project?

2010-03-15 Thread Ulrich Eckhardt
Alex Hall wrote: > On 3/15/10, Ulrich Eckhardt wrote: >> Alex Hall wrote: >>> I have a dll I am trying to use, but I get a Windows error 126, "the >>> specified module could not be found". Here is the code segment: >>> nvdaController=ctypes.windll.LoadLibrary("nvdaControllerClient32.dll") >> >> In

Large regular expressions

2010-03-15 Thread Nathan Harmston
Hi, So I m trying to use a very large regular expression, basically I have a list of items I want to find in text, its kind of a conjunction of two regular expressions and a big list..not pretty. However everytime I try to run my code I get this exception: OverflowError: regular expression co

Re: staticmethod and setattr

2010-03-15 Thread Michael.Lausch
On Mar 15, 11:40 am, Steven D'Aprano wrote: > On Mon, 15 Mar 2010 01:43:02 -0700, Michael.Lausch wrote: > > Hi, > > > I managed to get confused by Python, which is not such an easy task. > > > The problem i have is rooted in marshalling, JSON and Dojo. I need some > > static class in function with

Re: Large regular expressions

2010-03-15 Thread Stefan Behnel
Nathan Harmston, 15.03.2010 13:21: So I m trying to use a very large regular expression, basically I have a list of items I want to find in text, its kind of a conjunction of two regular expressions and a big list..not pretty. However everytime I try to run my code I get this exception: Over

Re: Large regular expressions

2010-03-15 Thread Alain Ketterlin
Nathan Harmston writes: [...] > Could anyone suggest other methods of these kind of string matching in > Python? I m trying to see if my swigged alphabet trie is faster than > whats possible in Python! Since you mention using a trie, I guess it's just a big alternative of fixed strings. You may

Re: dll in project?

2010-03-15 Thread Alex Hall
Okay, I got a new copy and all seems well now. The dll is found and loaded. The functions inside the dll are not working, but that is not Python's fault. Thanks to everyone for your help and suggestions! On 3/15/10, Ulrich Eckhardt wrote: > Alex Hall wrote: >> On 3/15/10, Ulrich Eckhardt wrote:

Re: Dreaming of new generation IDE

2010-03-15 Thread catonano
Hello again, people On Feb 11, 6:30 pm, Francis Carr wrote: > > I can't believe the code editing situation today is in a such sorry > > state. > > I can't believe an old coder is feeling so sorry for himself. Ok, I'm feeling sorry; still, I think I made a point. > > Today, I tried to understan

Re: Understanding the CPython dict implementation

2010-03-15 Thread Alex Willmer
On Mar 15, 4:06 am, John Nagle wrote: >     Is this available as a paper? > >                                 John Nagle It doesn't wppear to be, slides are here: http://us.pycon.org/2010/conference/schedule/event/12/ Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: staticmethod and setattr

2010-03-15 Thread Bruno Desthuilliers
Michael.Lausch a écrit : (snip) Now I'm trying to understand why this is the case. How is Foo.__dict__['_ref'] different from Foo._ref? Shouldn't it return the same attribute? It's an application of the descriptor protocol: http://wiki.python.org/moin/FromFunctionToMethod -- http://mail.py

Re: staticmethod and setattr

2010-03-15 Thread Andreas Löscher
Am Montag, den 15.03.2010, 05:42 -0700 schrieb Michael.Lausch: > On Mar 15, 11:40 am, Steven D'Aprano cybersource.com.au> wrote: > > On Mon, 15 Mar 2010 01:43:02 -0700, Michael.Lausch wrote: > > > Hi, > > > > > I managed to get confused by Python, which is not such an easy task. > > > > > The prob

Re: Python for newbies (Pythno users group in Macedonia)

2010-03-15 Thread Дамјан Георгиевски
> If you are all English-speakers then perhaps you could consider > showing a PyCon video - see > > http://pycon.blip.tv That's certainly something I'm considering for the more advanced users > Good luck with the group. I hope to see PyCon Macedonia emerging > before too long! Thanks :) I gue

Re: Python for newbies (Pythno users group in Macedonia)

2010-03-15 Thread Дамјан Георгиевски
>> we are starting with bi-monthly Python User Group meetings in Skopje, >> Macedonia. The meetings are targeted for both beginners and more >> experienced users. >> > ... > http://us.pycon.org/2010/conference/schedule/event/108/ Great resource, exactly what I needed. So, they use this book ht

Re: File existence check with partial filename

2010-03-15 Thread MRAB
Lan Qing wrote: Or use the regular module: import re import os for filename in os.listdir('.'): if re.match("*HV*", filename): # do something with the file The regular expression should be ".*HV.*", although: re.search("HV", filename) would be better and: "HV" in file

EuroPython 2010 - Open for registration and reminder of participation

2010-03-15 Thread Alex Willmer
EuroPython 2010 - 17th to 24th July 2010 EuroPython is a conference for the Python programming language community, including the Django, Zope and Plone communities. It is aimed at everyone in the Python community, of all skill levels, both users and program

Re: Large regular expressions

2010-03-15 Thread MRAB
Nathan Harmston wrote: Hi, So I m trying to use a very large regular expression, basically I have a list of items I want to find in text, its kind of a conjunction of two regular expressions and a big list..not pretty. However everytime I try to run my code I get this exception: OverflowErr

to pass self or not to pass self

2010-03-15 Thread lallous
Hello, Learning Python from the help file and online resources can leave one with many gaps. Can someone comment on the following: # - class X: T = 1 def f1(self, arg): print "f1, arg=%d" % arg def f2(self, arg): print "f2, arg=%d" % arg def f3(self, arg):

Arguments and a return value of a C function call when using setprofile

2010-03-15 Thread Michal Kwiatkowski
Hi, I'm trying to write code that will trace arguments and return values of all function calls. Using sys.settrace with 'call' and 'return' events works great for Python functions, but now I want to extend that to C functions as well. Using sys.setprofile instead in theory gives me what I need ('c

Re: Python for newbies (Pythno users group in Macedonia)

2010-03-15 Thread Steve Holden
Дамјан Георгиевски wrote: >> If you are all English-speakers then perhaps you could consider >> showing a PyCon video - see >> >> http://pycon.blip.tv > > That's certainly something I'm considering for the more advanced users > >> Good luck with the group. I hope to see PyCon Macedonia emerging

Re: Fwd: Some PyCon videos won't play

2010-03-15 Thread Steve Holden
Lan Qing wrote: > In China these video can not watch at all. I must spent 3 days to > download it... > That's a great pity. If they would be useful to a large population perhaps we could consider having copies hosted where they would be available with higher bandwidth? Who could we (the Python So

extract occurrence of regular expression from elements of XML documents

2010-03-15 Thread Martin Schmidt
Hi, I have just started to use Python a few weeks ago and until last week I had no knowledge of XML. Obviously my programming knowledge is pretty basic. Now I would like to use Python in combination with ca. 2000 XML documents (about 30 kb each) to search for certain regular expression within spec

Re: File existence check with partial filename

2010-03-15 Thread Steven Howe
What wrong with glob? --- Help on module glob: NAME glob - Filename globbing utility. FILE /usr/lib64/python2.6/glob.py FUNCTIONS glob(pathname) Return a list of paths matching a pathname pattern. The pattern may contain simple shell-style wildca

Re: extract occurrence of regular expression from elements of XML documents

2010-03-15 Thread Steve Holden
Martin Schmidt wrote: > Hi, > > I have just started to use Python a few weeks ago and until last week I > had no knowledge of XML. > Obviously my programming knowledge is pretty basic. > Now I would like to use Python in combination with ca. 2000 XML > documents (about 30 kb each) to search for ce

subtraction is giving me a syntax error

2010-03-15 Thread Joel Pendery
So I am trying to write a bit of code and a simple numerical subtraction y_diff = y_diff-H is giving me the error Syntaxerror: Non-ASCII character '\x96' in file on line 70, but no encoding declared. Even though I have deleted some lines before it and this line is no longer line 70, I am still

Re: to pass self or not to pass self

2010-03-15 Thread TomF
On 2010-03-15 09:39:50 -0700, lallous said: Hello, Learning Python from the help file and online resources can leave one with many gaps. Can someone comment on the following: # - class X: T = 1 def f1(self, arg): print "f1, arg=%d" % arg def f2(self, arg):

Re: subtraction is giving me a syntax error

2010-03-15 Thread Richard Brodie
"Joel Pendery" wrote in message news:56597268-3472-4fd9-a829-6d9cf51cf...@e7g2000yqf.googlegroups.com... >> y_diff = y_diff-H > > Syntaxerror: Non-ASCII character '\x96' in file on line 70, but no > encoding declared. That's likely an en-dash, not a minus sign. -- http://mail.python.org/ma

Re: subtraction is giving me a syntax error

2010-03-15 Thread Benjamin Kaplan
On Mon, Mar 15, 2010 at 1:37 PM, Joel Pendery wrote: > So I am trying to write a bit of code and a simple numerical > subtraction > > y_diff = y_diff-H > > is giving me the error > > Syntaxerror: Non-ASCII character '\x96' in file on line 70, but no > encoding declared. > > Even though I have dele

Re: subtraction is giving me a syntax error

2010-03-15 Thread Philip Semanchuk
On Mar 15, 2010, at 1:37 PM, Joel Pendery wrote: So I am trying to write a bit of code and a simple numerical subtraction y_diff = y_diff-H is giving me the error Syntaxerror: Non-ASCII character '\x96' in file on line 70, but no encoding declared. Even though I have deleted some lines befo

Re: to pass self or not to pass self

2010-03-15 Thread Rami Chowdhury
On Monday 15 March 2010 10:42:41 TomF wrote: > On 2010-03-15 09:39:50 -0700, lallous said: > > > > Why in test1() when it uses the class variable func_tbl we still need > > to pass self, but in test2() we don't ? > > > > What is the difference between the reference in 'F' and 'func_tbl' ? >

Re: subtraction is giving me a syntax error

2010-03-15 Thread MRAB
Joel Pendery wrote: So I am trying to write a bit of code and a simple numerical subtraction y_diff = y_diff-H is giving me the error Syntaxerror: Non-ASCII character '\x96' in file on line 70, but no encoding declared. Even though I have deleted some lines before it and this line is no longe

Re: subtraction is giving me a syntax error

2010-03-15 Thread Grant Edwards
On 2010-03-15, Philip Semanchuk wrote: > On Mar 15, 2010, at 1:37 PM, Joel Pendery wrote: > >> So I am trying to write a bit of code and a simple numerical >> subtraction >> >> y_diff = y_diff-H >> >> is giving me the error >> >> Syntaxerror: Non-ASCII character '\x96' in file on line 70, but no >

Re: class inheritance

2010-03-15 Thread Jean-Michel Pichavant
JLundell wrote: I've got a subclass of fractions.Fraction called Value; it's a mostly trivial class, except that it overrides __eq__ to mean 'nearly equal'. However, since Fraction's operations result in a Fraction, not a Value, I end up with stuff like this: x = Value(1) + Value(2) where x is

Re: staticmethod and setattr

2010-03-15 Thread Jean-Michel Pichavant
Am Montag, den 15.03.2010, 05:42 -0700 schrieb Michael.Lausch: On Mar 15, 11:40 am, Steven D'Aprano wrote: On Mon, 15 Mar 2010 01:43:02 -0700, Michael.Lausch wrote: Hi, I managed to get confused by Python, which is not such an easy task. The problem i have is root

Re: "Breaking" the __main__ script

2010-03-15 Thread Jean-Michel Pichavant
Steve Holden wrote: pyt...@bdurham.com wrote: Any reason you prefer PDB over WinPDB? http://winpdb.org/ Yes. I don't have Windows except one one PC :P WinPDB runs on non-Windows platforms :) One might reasonably argue that it has a pretty couter-intuitive name, then.

Re: "Breaking" the __main__ script

2010-03-15 Thread Jean-Michel Pichavant
vsoler wrote: Hello, I am still learning python, thus developnig small scripts. Some of them consist only of the main module. While testing them (debugging) I sometimes want to stop the script at a certain point, with something likestop, break, end or something similar. What statement ca

Re: subtraction is giving me a syntax error

2010-03-15 Thread Baptiste Carvello
Joel Pendery a écrit : So I am trying to write a bit of code and a simple numerical subtraction y_diff = y_diff-H is giving me the error Syntaxerror: Non-ASCII character '\x96' in file on line 70, but no encoding declared. Even though I have deleted some lines before it and this line is no lo

Re: "Breaking" the __main__ script

2010-03-15 Thread Jean-Michel Pichavant
Jean-Michel Pichavant wrote: vsoler wrote: Hello, I am still learning python, thus developnig small scripts. Some of them consist only of the main module. While testing them (debugging) I sometimes want to stop the script at a certain point, with something likestop, break, end or somethi

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-15 Thread Astley Le Jasper
Hi Robin, It looks like you've been busy. I'm sorry but you are well over my head at the moment! :-) If you need me to test an install then I'd be happy to help. However, I just received an email from Christoph Gohlke saying: " ... There are 64 bit versions of Reportlab and PIL for Python 2.6 f

[ANN] OpenOpt 0.28, FuncDesigner 0.18, DerApproximator 0.18

2010-03-15 Thread dmitrey
Hi all, I'm glad to inform you about new release of our free (BSD-licensed) soft OpenOpt 0.28 (numerical optimization), FuncDesigner 0.18 (CAS with automatic differentiation), DerApproximator 0.18 (finite- differeces derivatives approximation). More details here: http://forum.openopt.org/viewtopic

Re: Clustering and automated configuration & deployment toolkit with Python

2010-03-15 Thread Philip Semanchuk
On Mar 13, 2010, at 6:21 PM, np map wrote: I'd like to write an open source clustering (for computation and general use) and automation of configuration/deployment in Python. It's main purpose is to be used in academic environments. It would be something like running numpy/simpy code (and other

Re: When to lock data items returned by multiprocessing.Manager?

2010-03-15 Thread Aahz
In article <4428d674-7fa7-4095-a93d-75ea31a81...@15g2000yqi.googlegroups.com>, Veloz wrote: > >So I'm using a multiprocessing.Manager instance in my main app and >asking it to create a dictionary, which I am providing to instances of >the application that I'm forking off with Process. > >The Proc

Re: Reverse engineering CRC?

2010-03-15 Thread jkn
Hi Greg Just to say thanks for taking the time to write up your work on this interesting topic. Cheers J^n -- http://mail.python.org/mailman/listinfo/python-list

Re: Reverse engineering CRC?

2010-03-15 Thread geremy condra
On Mon, Mar 15, 2010 at 6:29 AM, Gregory Ewing wrote: > I've solved the problem now. > > It turned out to be a very standard CRC algorithm, complicated > by the presence of a few extra bytes of data being checked that > didn't appear explicitly in the file anywhere. > > In the process I developed

Re: subtraction is giving me a syntax error

2010-03-15 Thread Steven D'Aprano
On Mon, 15 Mar 2010 18:09:29 +, Grant Edwards wrote: >> Delete the character between "y_diff" and "H" and replace it with a >> plain ASCII subtraction sign. > > I think somebody needs to stop editing his code with MS Word and start > using a programming editor. ;) I've had this error myself

Re: subtraction is giving me a syntax error

2010-03-15 Thread John Machin
On Mar 16, 5:43 am, Baptiste Carvello wrote: > Joel Pendery a écrit : > > So I am trying to write a bit of code and a simple numerical > > subtraction > > > y_diff = y_diff-H > > > is giving me the error > > > Syntaxerror: Non-ASCII character '\x96' in file on line 70, but no > > encoding declare

Re: subtraction is giving me a syntax error

2010-03-15 Thread Grant Edwards
On 2010-03-15, Steven D'Aprano wrote: > On Mon, 15 Mar 2010 18:09:29 +, Grant Edwards wrote: > >>> Delete the character between "y_diff" and "H" and replace it with a >>> plain ASCII subtraction sign. >> >> I think somebody needs to stop editing his code with MS Word and start >> using a prog

Re: class inheritance

2010-03-15 Thread JLundell
On Mar 13, 1:26 pm, Carl Banks wrote: > It's a tad unfortunately Python doesn't make this easier.  If I had to > do it more than once I'd probably write a mixin to do it: > > class ArithmeticSelfCastMixin(object): >     def __add__(self,other): >         return > self.__class__(super(ArithmeticSel

Re: logging: local functions ==> loss of lineno

2010-03-15 Thread Hellmut Weber
Am 11.03.2010 12:14, schrieb Peter Otten: Hellmut Weber wrote: Logging works very well giving the filename and line number of the point where it is called. As long as I use the loggers directly. BUT when I have to wrap the logger call in some other function, I always get file name and line numb

Re: class inheritance

2010-03-15 Thread Carl Banks
On Mar 15, 4:34 pm, JLundell wrote: > It's also unfortunate that Python doesn't have an approximately-equal > operator; it'd come in handy for floating-point applications while > preserving hash. If only there were a ~= or ≈ operator I could > overload. And ~ is unary, so no joy. One problem with

Binary data transfer issue

2010-03-15 Thread Jordan Apgar
Hi all, I'm trying to transfer a binary file over xmlrpclib. My test file is a .jpeg file. I can transfer all the data over but when I go to open the .jpeg I get "Error interpreting JPEG image file (Invalid JPEG file structure: SOS before SOF)" here's the code: ===Various Shared Funct

Re: Binary data transfer issue

2010-03-15 Thread MRAB
Jordan Apgar wrote: Hi all, I'm trying to transfer a binary file over xmlrpclib. My test file is a .jpeg file. I can transfer all the data over but when I go to open the .jpeg I get "Error interpreting JPEG image file (Invalid JPEG file structure: SOS before SOF)" here's the code: =

Build Python with XCode

2010-03-15 Thread moerchendiser2k3
Hi, I would like to build Python with Xcode (but without the makefile). Does anyone know a link where I can get a real xcodeproj with the current Py2.x sources? Thanks in advance!! Bye, donnerCobra -- http://mail.python.org/mailman/listinfo/python-list

Re: converting datetime with tzinfo to unix timestamp

2010-03-15 Thread Gabriel Genellina
En Fri, 12 Mar 2010 20:15:55 -0300, Michael Torrie escribió: On Python 2.5 here. I've searched and searched but I can't find any way to convert a datetime object that includes a timezone (tzinfo) to a unix timestamp. Folks on the net say to simply use the timetuple() method of the object and

Re: result of os.times() is different with 'time' command Options

2010-03-15 Thread Gabriel Genellina
En Mon, 15 Mar 2010 03:51:28 -0300, hiral escribió: On Mar 15, 7:14 am, Tim Roberts wrote: hiral wrote: >Output: >real0.0m0.010002421s >user0.0m0.0s >sys 0.0m0.0s >Command: >$ time ls >Output: >real0m0.007s >user0m0.000s >sys 0m0.000s You can't really do an a

Dynamic Class Creation

2010-03-15 Thread Josh English
I have a large program with lots of data stored in XML. I'm upgrading my GUI to use ObjectListView, but with my data in XML, I don't have regular objects to interact with the OLV. I do have an XML validator that defines the structure of the XML elements, and I'm trying to dynamically create a class

Re: Reverse engineering CRC?

2010-03-15 Thread Gabriel Genellina
En Mon, 15 Mar 2010 07:29:51 -0300, Gregory Ewing escribió: I've solved the problem now. It turned out to be a very standard CRC algorithm, complicated by the presence of a few extra bytes of data being checked that didn't appear explicitly in the file anywhere. In the process I developed s

Re: Dynamic Class Creation

2010-03-15 Thread Chris Rebert
On Mon, Mar 15, 2010 at 11:01 PM, Josh English wrote: > I have a large program with lots of data stored in XML. I'm upgrading > my GUI to use ObjectListView, but with my data in XML, I don't have > regular objects to interact with the OLV. I do have an XML validator > that defines the structure of

Data entry Work available

2010-03-15 Thread Earn money
Data entry works Available At No need to pay DEposite http://trading7000.blogspot.com/ Adposting Jobs Availble http://trading7000.blogspot.com/ No need to work Hard Earn Money From Home 7000 in Minutes http://trading7000.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: time_struct

2010-03-15 Thread Gabriel Genellina
En Sun, 07 Mar 2010 10:50:59 -0300, moerchendiser2k3 escribió: can anyone tell me how to return a time_struct from the timemodule in my own C-Module? Is that possible? I can just find one function in timefuncs.h, but it doesnt return any PyObject. The type is available as the struct_time at