Re: python33.lib missing for build_ext in venv environment

2013-10-14 Thread Marco Buttu
local/bin include-system-site-packages = false version = 3.4.0 In this case (default), the site-package directory is not included in the PYTHONPATH. If you want to include it, set: include-system-site-packages = true -- Marco Buttu -- https://mail.python.org/mailman/listinfo/python-list

Re: Could not find any downloads that satisfy the requirement novaclient

2015-04-08 Thread marco . nawijn
On Tuesday, April 7, 2015 at 9:55:58 PM UTC+2, kurt_...@symantec40.com wrote: > Hi- > > While trying to install an OpenStack client on Mac OSX, I get the following: > > SymMacToolkit-C02N4H9DG3QD:/ kurt_heiss$ sudo pip install novaclient > Password: > The directory '/Users/kurt_heiss/Library/Logs

Re: Creating a reliable sandboxed Python environment

2015-05-26 Thread marco . nawijn
avid What about launching the Python process in a Docker container? Spinning up a new container is pretty quick and it might provide you with enough isolation. Probably not a perfect solution, but I do believe that it would be easier than trying to sandbox Python itself. Marco -- https://mail.python.org/mailman/listinfo/python-list

Re: Everything is an object in python - object class and type class

2015-05-31 Thread Marco Buttu
lasses and non-classes, but it is a non-sense to differentiate between classes and objects. If it could be useful: http://marco-buttu.github.io/pycon_objmodel/ As can be attested by using type() function as below : >>>type(int) >>>type(list) ... >From my understan

Re: Everything is an object in python - object class and type class

2015-06-03 Thread Marco Buttu
): ... AttributeError: 'tuple' object has no attribute 'foo' -- Marco Buttu INAF-Osservatorio Astronomico di Cagliari Via della Scienza n. 5, 09047 Selargius (CA) Phone: 070 711 80 217 Email: mbu...@oa-cagliari.inaf.it -- https://mail.python.org/mailman/listinfo/python-list

Re: Classic OOP in Python

2015-06-18 Thread Marco Buttu
are that you will not write a test after fixing the bug, i.e. because you may have other priorities, so you will miss a regression test -- Marco Buttu INAF-Osservatorio Astronomico di Cagliari Via della Scienza n. 5, 09047 Selargius (CA) Phone: 070 711 80 217 Email: mbu...@oa-cagliari.inaf.it --

Re: how to determine for using c extension or not ?

2015-08-03 Thread Marco Buttu
es, as mentioned by Skip, we say that the term "buit-in function" is also referred to a function written in C: https://docs.python.org/3/library/types.html#types.BuiltinFunctionType By using the same word (built-in) to indicate either objects written in C or objects who live in the

Re: Most Pythonic way to store (small) configuration

2015-08-04 Thread marco . nawijn
On Sunday, August 2, 2015 at 12:14:51 PM UTC+2, Cecil Westerhof wrote: > There are a lot of ways to store configuration information: > - conf file > - xml file > - database > - json file > - and possible a lot of other ways > > I want to write a Python program to display cleaned log files. I do >

Re: How to import a function from another module...

2015-08-04 Thread marco . nawijn
On Tuesday, August 4, 2015 at 3:11:41 PM UTC+2, Dwight GoldWinde wrote: > Thank you, Steven. > I am a newbie with Python? so I really want to learn how to do it the easy > way. > Yes, could you tell me how to put the py.file that contains the function > in the Python search path??? > > > > BIG S

Re: Most Pythonic way to store (small) configuration

2015-08-04 Thread marco . nawijn
asy to inject code into your application) > > Irmen Yes, I am aware of the security risk, but right now I am not too worried about it. To be honest, JSON would be my preferred configuration file format, but as others already mentioned, there is no standard way of adding comments to a JSON

Re: From logging to files to a better solution: syslog, Sentry, Logstash, ....

2015-09-11 Thread marco . nawijn
> > Good to know that I am not the only one running servers in remote intranets. > > Regards, > Thomas Güttler So, if logging to json is on the horizon anyway, why don't you create something like a MongoDb handler in the standard Python logging framework and run a MongoDb server in the client intranet? You could then connect over VPN to MongoDb, filter the warning/error messages there on the server side and fetch them to your local systems for analysis. Marco -- https://mail.python.org/mailman/listinfo/python-list

Re: Packaging and deployment of standalone Python applications?

2015-09-15 Thread marco . nawijn
t, I would seriously consider using Docker. I makes it pretty straightforward to move your deployments around from your development machine, to a test setup, to a cloud provider (e.g. AWS) etc. Lack or incomplete support on Windows systems is a little bit a deal breaker, but this situation is improving quickly. Marco -- https://mail.python.org/mailman/listinfo/python-list

Re: Python, convert an integer into an index?

2015-09-23 Thread marco . nawijn
On Wednesday, September 23, 2015 at 1:27:51 AM UTC+2, MRAB wrote: > On 2015-09-22 23:21, Laura Creighton wrote: > > In a message of Tue, 22 Sep 2015 14:43:55 -0700, Chris Roberts writes: > >> > >> > >>(How do I make it into an index? ) > >>Preferably something fairly easy to understand as I am new

Re: Python PNG Viewer(Browser Based)

2015-11-03 Thread marco . nawijn
On Tuesday, November 3, 2015 at 12:55:09 PM UTC+1, Arshpreet Singh wrote: > Hello Everyone, > > I am looking for Browser-based PNG file viewer written in > Python.(Flask framework preferably) > > Following project(Flask-Based) provides many things(File manager as > well as file viewer) but it do

Re: Using tuple as parameter to a function

2015-11-09 Thread marco . nawijn
On Monday, November 9, 2015 at 2:58:21 PM UTC+1, Chris Angelico wrote: > On Tue, Nov 10, 2015 at 12:40 AM, Cecil Westerhof wrote: > > I was thinking about something like: > > values = (( 1, 100), ( 2, 100), ( 5, 100), > >10, 100), (20, 100), (40, 100)) > > for value in valu

Re: Python While loop Takes too much time.

2014-06-30 Thread marco . nawijn
atil Hi Jaydeep, I agree with Peter. I would avoid moving from cell to cell through the EXCEL interface if you can avoid. If possible, I would try to read ranges from EXCEL into a python list (or maybe numpy arrays) and do the processing in Python. In the past I even dumped an EXCEL sheet as a

Re: Standard library Help

2014-07-11 Thread marco . nawijn
On Friday, July 11, 2014 10:32:32 AM UTC+2, Nicholas Cannon wrote: > Hey i would like to know alot more about the standard library and all of its > functions and so on and i know it is huge and i would basically like to learn > only the useful stuff that i could use and all of those features. i h

Re: how can i get "body" values?

2014-07-11 Thread marco . nawijn
ions on why it doesn't work or how to proceed. In case of your particular problem, the answer is "it depends". Do you use the Python standard library, or a webserver framework like tornado or cherrypy? If you still have a choice, I would recommend to use a framework

Re: dict to boolean expression, how to?

2014-08-01 Thread marco . nawijn
operator.or_ (notice the trailing underscore to avoid clashing with normal "and" and "or" statements. Marco -- https://mail.python.org/mailman/listinfo/python-list

Re: Marco's atexit issue was: Re: ANN: wxPython 3.0.1.1

2014-09-15 Thread Marco Prosperi
all the code addressed by the exception is out of my source. I don't have any atexit.register in my code Marco On Friday, September 12, 2014 6:33:09 PM UTC+2, Nathan McCorkle wrote: > > > > On Friday, September 12, 2014 1:14:41 AM UTC-7, Marco Prosperi wrote: >> >

Re: how to parse standard algebraic notation

2014-10-01 Thread Marco Buttu
implify("x**3 + x**2 + x + 1") >>> equation x**3 + x**2 + x + 1 >>> diff(equation) 3*x**2 + 2*x + 1 -- Marco Buttu INAF-Osservatorio Astronomico di Cagliari Via della Scienza n. 5, 09047 Selargius (CA) Phone: 070 711 80 217 Email: mbu...@oa-cagliari.inaf.it -- https://mail.python.org/mailman/listinfo/python-list

Re: how to parse standard algebraic notation

2014-10-01 Thread Marco Buttu
implify("x**3 + x**2 + x + 1") >>> equation x**3 + x**2 + x + 1 >>> diff(equation) 3*x**2 + 2*x + 1 -- Marco Buttu -- https://mail.python.org/mailman/listinfo/python-list

Re: Clearing globals in CPython

2014-10-02 Thread Marco Buttu
t the current session and restart it, but as a challenge, can we recover from this state? >>> [].__class__.__module__ # It is a string... '__builtin__' So, I do not have any idea about how to get a module without importing something. Thanks for sharing :) -- Marco

Re: Recommended hosting

2014-10-03 Thread marco . nawijn
g Doug, Also don't forget "the new kid on the block" Docker! So, you can build your webapp locally on your machine, deploy it (also locally) in a Docker container. Test it and then deploy it in the cloud. You have lots of options for this. I am the process of doing this myself and I like it a lot! Marco -- https://mail.python.org/mailman/listinfo/python-list

Muddleheaded use of the "built-in" term

2014-10-07 Thread Marco Buttu
t live in the builtin namespace :/ By using the same word (built-in) to indicate either objects written in C or objects referenced by the builtin namespace could be a bit muddler for everyone, beginner or not. Is it too late for changing the name of the `builtin` namespace in something like, fo

Muddleheaded use of the "built-in" term

2014-10-07 Thread Marco Buttu
thing like, for instance, `root` namespace, or using the name "core" (inspect.iscore(), types.CoreFunctionType, ecc.) to indicate "written in C or whatever underlying language"? -- Marco Buttu INAF-Osservatorio Astronomico di Cagliari Via della Scienza n. 5, 09047 Selargius (CA) Phone: 070 711 80 217 Email: mbu...@oa-cagliari.inaf.it -- https://mail.python.org/mailman/listinfo/python-list

Re: operator module functions

2014-10-08 Thread marco . nawijn
t;> a = 2 >> a.__add__(3) 5 >> import operator >> operator.add(2,3) # Fine I also think operator.add versus .__add__ is equivalent to the global getattr() and .__getattr__. Marco -- https://mail.python.org/mailman/listinfo/python-list

Re: Python ORMs Supporting POPOs and Substituting Layers in Django

2011-11-05 Thread Marco Nawijn
penalty > for crossing process boundaries... but any insights would be > appreciated. > > Thanks, > Travis Parks Hello Travis, I am not an expert in the field, but I have used SQLAlchemy (www.sqlalchemy.org) for a while and was very happy with it. It should be able to scale up to pretty complex applications and large amounts of data. Regards, Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: Execute a command on remote machine in python

2011-11-15 Thread Marco Nawijn
terface. I used it several times now and for me this works perfectly. XML-RPC is part of the Python standard library, so it should work out of the box on windows and linux. It also supports mixed programming languages (maybe C# on windows to get the info you want and python on linux on the cli

Re: Multiprocessing bug, is my editor (SciTE) impeding my progress?

2011-12-06 Thread Marco Nawijn
pe error, but keep the context. At this point you should be able to evaluate task. As a side comment to your IDE remarks. I keep switching between VIM and Aptana/Pydev. The more I learn about VIM the more I feel comfortable and productive. In combination with ipython it is quite a solid development environment. On the other hand Pydev is very user friendly, powerfull and easy to learn. Debugging in Pydev is excellent. Regards, Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: Insert trusted timestamp to PDF

2011-12-07 Thread marco . rucci
timestamping process in a python app, be patient, we will release an API and a command line version very soon. -- Marco Rucci securo.it -- http://mail.python.org/mailman/listinfo/python-list

Re: Insert trusted timestamp to PDF

2011-12-08 Thread marco . rucci
ication and then add the required authentication process. Can I contact you privately by email? Thanks for your interest, Marco. -- http://mail.python.org/mailman/listinfo/python-list

Re: PyHtmlGUI Project is looking for developers

2005-12-27 Thread Marco Aschwanden
A good idea... but I would prefer it being abstracted from Zope... -- http://mail.python.org/mailman/listinfo/python-list

Extending & Embedding Python

2006-01-12 Thread Marco Meoni
ss is attached. Thanks all. Marco Attached files: -- #ifndef _PACKETMANAGER_H_ #define _PACKETMANAGER_H_ #include "Cipher/Cipher.h" #define PAYLOAD_LENGHT 5000 //the our defined pac

Re: Extending & Embedding Python

2006-01-12 Thread Marco Meoni
> i'm not sure what tutorial you mean. are you talking about the > Extending and Embedding section of the python manual? > > http://docs.python.org/ext/ext.html Yes, this section. Is there in one-file version? (pdf, ps, dvi, all in 1 html, etc...) -- http://mail.python.org/mailman/listinfo/pyth

Re: Extending & Embedding Python

2006-01-12 Thread Marco Meoni
About SWIG: This program has a lot of commands... In your opinion what is the best settings for my use? Thanks... Marco -- http://mail.python.org/mailman/listinfo/python-list

XML Writer in wxPython

2006-01-12 Thread Marco Meoni
Have you ever write an XML Writer in wxPython? A Writer that from a GUI can compose XML Files. Thanks. Marco. -- http://mail.python.org/mailman/listinfo/python-list

Re: XML Writer in wxPython

2006-01-16 Thread Marco Meoni
Could you post an example please? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Socket Programming HOWTO example

2006-01-16 Thread Marco Meoni
nnessione socket interrotta" msg = msg + chunk return msg How can i use this? Thanks all! Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: XML Writer in wxPython

2006-01-18 Thread Marco Meoni
i have to put the XML in a string. Is there a module with the XML writing funcion? -- http://mail.python.org/mailman/listinfo/python-list

Re: dicts vs classes

2006-07-25 Thread Marco Wahl
usage point of view? I recommend you to measure the time and memory usage for the two alternatives. That could give you the answer you want. HTH -- Marco Wahl http://visenso.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for an intellisense with good help IDE for Python

2006-08-09 Thread Marco Aschwanden
Profession: 180 USD) - you can download a fully fuctional version and prolong it a few times... try it out, if you are willing to pay a few bucks. Cheers, Marco -- http://mail.python.org/mailman/listinfo/python-list

Pickling an instance of a class containing a dict doesn't work

2006-10-12 Thread Marco Lierfeld
protocols (0, 1, 2), but none of them worked for me. I hope somebody knows what to do ;) Thanks for reading Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: Pickling an instance of a class containing a dict doesn't work

2006-10-12 Thread Marco Lierfeld
h! Thank you Jon and Paul, you both were 100% right :) But I still don't understand, why the list was saved and the dict was not... confusing ;) Bye, Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: Pickling an instance of a class containing a dict doesn't work

2006-10-13 Thread Marco Lierfeld
t;hunt", "kill", "cook"] # creates an instance attribute Yes, now I see. That's the way I filled the dict and the list. Thank you for the explanation :) Marco -- http://mail.python.org/mailman/listinfo/python-list

Printing file with printer dialog

2006-10-25 Thread Marco Bonifazi
pen a dialog without PyGtk is also good), I would know all methods to do it. Thanks also if you don't answer! Marco Bonifazi http://www.bonifazi.eu -- http://mail.python.org/mailman/listinfo/python-list

Re: Initializing an attribute that needs the object

2006-06-02 Thread Marco Giusti
On Fri, Jun 02, 2006 at 06:15:28PM -0300, David Pratt wrote: >Hi. I want to have different handlers to do perform logic. The problem >is the Handler requires an instance of the factory since it will use its >own methods in conjunction with methods of the factory. > >Once I have got a Factory inst

Using "external" vars on module load time

2006-06-14 Thread Marco Aschwanden
_init_module__() This is not really satisfying. I would like: Load a module and hand in already the server_api. How can I achieve this? Thanks for any suggestions, Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: Using "external" vars on module load time

2006-06-14 Thread Marco Aschwanden
Marvelous that was the solution I was looking for. > I think you should consider a class instead of a module, though. What I don't get: Why should I consider using a class? Greetings from sunny Switzerland, Marco -- http://mail.python.org/mailman/listinfo/python-list

Where is documentation for +=

2006-06-14 Thread Marco Wahl
Hello, by accident I found that += exists in python. E.g. >>> a = 0 >>> a += 42 >>> a 42 >>> a += 0.42 >>> a 42.422 >>> But I can't find any documentation for +=. Any hints? Best wishes -- http://mail.python.org/mailman/listinfo/python-list

Re: Where is documentation for +=

2006-06-14 Thread Marco Wahl
> > [...] I can't find any documentation for +=. > > Any hints? > http://docs.python.org/ref/augassign.html That's it. Thank you very much. -- http://mail.python.org/mailman/listinfo/python-list

Re: global name is not defined - error

2006-06-27 Thread Marco Wahl
"a" <[EMAIL PROTECTED]> writes: > What I want > --- > I want to create a list of items from a function operating on an array > of strings Ok. > What I did > - > list=["s0","s1","s2"] > l=len(list) > for i in range(l): > d_list[i]=f.

Re: a class variable question

2006-06-27 Thread Marco Wahl
Hi, just some lines added below. hth [EMAIL PROTECTED] wrote: > hi > i have define a class like this > > class A: > _var1 = 0 > def __init__(self): > ## some initialization > self.func1() > > def func1(): se

Detupleize a tuple for argument list

2006-07-05 Thread Marco Wahl
e is that I take the functions from a library that I cannot modify. On the other side in my code I use the tuples. Best wishes -- Marco Wahl http://visenso.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Detupleize a tuple for argument list

2006-07-05 Thread Marco Wahl
> Marco Wahl enlightened us with: > > >>> foo(t) > > Traceback (most recent call last): > >File "", line 1, in ? > > TypeError: foo() takes exactly 2 arguments (1 given) > > Call foo(*t) Thank you very much Luke Plant, Steven D&#x

Re: XML-RPC server-client communication

2006-07-06 Thread Marco Aschwanden
> server = SimpleXMLRPCServer.SimpleXMLRPCServer(("xxx.xxx.xxx.xxx", > 22999)) Could it be that xxx.xxx.xxx.xxx stands for '127.0.0.1'? If so... rename it to 'localhost'. If you bind a port to 127.0.0.1 it will be found only on the same machine. Greeting

pyExcelerator - Can I read and modify an existing Excel-WorkBook?

2006-07-11 Thread Marco Aschwanden
uot; but I would like to keep the "formatting" in the template. Did I miss a "load", "read" or "open" function in pyExcelerator that would hand me back a WorkBook? Greetings, Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: unit test for a printing method

2006-08-28 Thread Marco Wahl
> [OP] What is the proper way to test (using unit test) a method that print > information? > [...] Fredrik Lundh <[EMAIL PROTECTED]> writes: > > Scott David Daniels wrote: > >> For silly module myprog.py: >> def A(s): >> print '---'+s+'---' >> in test_myprog.py: >> import unitte

Re: unit test for a printing method

2006-08-29 Thread Marco Wahl
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: >>> >>> why are you trying to reinvent doctest ? >> >> The OP asked for unit test. This could be read that >> the OP wants to use module unittest. > > http://docs.python.org/lib/doctest-unittest-api.html Ahh, that's good to know that doctests can be

The del statement

2006-12-05 Thread Marco Aschwanden
(and I think, this is what happens in the backend). The same discussion was done for the "external" len-function (list.len() vs. len(list)). I don't dare to say that the del-keyword is superflous, but I would like to know the pros and cons of the external keyword approach. G

Re: The del statement

2006-12-05 Thread Marco Aschwanden
hoping people like you can enlighten me about the language decision taken. > for the curious, guido's rationale for len() can be found here: > >http://preview.tinyurl.com/y6vavp Thanks for the hint. Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: The del statement

2006-12-05 Thread Marco Aschwanden
: x.getitem(i) would be a viable (in this case clumsy) way but here I find the introduced syntax justified. del on the other hand is used sparingly througout my code. If no del keyword would exist, it wouldn't disturb me. Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: The del statement

2006-12-06 Thread Marco Aschwanden
ks for the enlighting answers, Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: Class and instance question

2006-12-17 Thread Marco Wahl
rzed <[EMAIL PROTECTED]> writes: To simplify take > class T(object): > def __new__(self): > self.a = 1 and t = T() and then you get >>> print t.a > Traceback (most recent call last): > File "", line 1, in > AttributeError: 'NoneType' object has no attribute 'a' While T.a is 1.

Incorrect Decimal-Float behaviour in comparison tests

2006-03-03 Thread Cassiano, Marco
e: print a,b,'b is greater than a - CORRECT' ... 3.7 6.3 a is greater than b - NOT TRUE Have you ever encountered this behaviour ? It seems a bug to me... Do you konw if there is any patch available for this? Thank you very much Marco Cassiano Manifatture del Nord srl

Re: [ANN] new version of rur-ple (0.8.5)

2005-05-10 Thread Marco Aschwanden
need > wxPython. You can learn more about RUR-PLE or you can go to the download > page. Surrender to Python - Resistance is futile! This is a fine piece of introduction! Thanks for your efforts, Marco -- http://mail.python.org/mailman/listinfo/python-list

Sleepycat Bsdbd 4.3.27 and Python 2.4.1

2005-05-12 Thread Cassiano, Marco
in _openDBEnv    e.open('.', db.DB_PRIVATE | db.DB_CREATE | db.DB_THREAD | db.DB_INIT_LOCK | db.DB_INIT_MPOOL)  DBError: (156471272, 'Unknown error 156471272')     Any hint or suggestion is welcom Thnx   Marco Cassiano       -- http://mail.python.org/mailman/listinfo/python-list

embedded function body

2005-05-20 Thread Marco Colombo
Hi, I need to embed an user-supplied python function body in a C program. That is, the user has no control over the function definition: def afunction(): Now, the problem is that I can't just append the supplied string, because I need to properly indent it which isn't trivial - just adding a

Garbage collection with QT

2005-06-07 Thread Marco Bartel
Marco -- http://mail.python.org/mailman/listinfo/python-list

Basic Auth for simple web server

2007-06-05 Thread Marco Aloisio
Hi, I'm a Python newbie; I have to write a simple webserver, and I need to implement a basic authentication as specified in the RFC2617. I wonder if there is a Python library for doing that. Thanks! -- Marco Aloisio -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic Auth for simple web server

2007-06-07 Thread Marco Aloisio
Thanks -- Marco Aloisio -- http://mail.python.org/mailman/listinfo/python-list

ANN: new Python magazine looking for authors

2007-07-09 Thread Marco Tabini
] and for suggestions on topics that you would like covered. We also offering a special deal on subscription pre-orders [3], including a contest to win a new MacBook. Thanks! Marco Tabini [1] http://www.pythonmagazine.com [2] http://www.pythonmagazine.com/c/p/write_for_us [3] http

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-14 Thread Marco Colombo
I suggest we keep focused on the main issue here, which is "shoud non- ascii identifiers be allowed, given that we already allow non-ascii strings literals and comments?" Most arguments against this proposal really fall into the category "ascii-only source files". If you want to promote code-shari

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Marco Colombo
On 13 Mag, 17:44, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > - should non-ASCII identifiers be supported? why? Yes. For the same reason non-ASCII source files are supported. > - would you use them if it was possible to do so? in what cases? Yes. In the same cases I'd use: 1) non-English comm

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Marco Colombo
On 15 Mag, 15:44, George Sakkis <[EMAIL PROTECTED]> wrote: > After 175 replies (and counting), the only thing that is clear is the > controversy around this PEP. Most people are very strong for or > against it, with little middle ground in between. I'm not saying that > every change must meet 100%

Re: Pickled objects over the network

2007-07-25 Thread Marco Mariani
Hendrik van Rooyen ha scritto: > But more seriously - is there any need for a simple serialiser that will > be able to be used to transfer a subset of the built in types over an > open network in a safe manner, for the transfer of things like lists of > parameters? Yes, there seems to be a need f

porting vc++ project to python?

2007-08-22 Thread marco Starglider
hi, i have a very large project in visual studio2005->visual c++ in windowsxp. i'd like to port it, or my next project, over to python. is this possible without rewriting all my code? are there multiple options to do this? my project is so large, that entirely rewriting it is actually no option.

Re: Haskell like (c:cs) syntax

2007-08-29 Thread Marco Mariani
Ricardo Aráoz ha scritto: > L = ['one', 'two', 'three', 'four', 'five'] > > print L[0]# This would be 'head' > print L[1:] # This would be 'tail' > > Caution : L[0] and L[1:] are COPIES of the head and tail of the list. This might surprise people who see L[1:] = [], since changing a copy

Code design problem

2007-08-29 Thread Marco Nawijn
forwarding each call in the Application class looks a little bit redundant and I would like to get rid of it. Does anyone have any comments or suggestions? Can metaclass programming come to rescue? Kind regards, Marco Nawijn -- http://mail.python.org/mailman/listinfo/python-list

Re: Code design problem

2007-08-29 Thread Marco Nawijn
On Aug 29, 3:03 pm, "Marshall T. Vandegrift" <[EMAIL PROTECTED]> wrote: > Marco Nawijn <[EMAIL PROTECTED]> writes: > > The problem I face is that the implementation of the application class > > is completely different for the local and remote case. Th

String manipulation

2007-04-04 Thread marco . minerva
quot;_". For example, the text Yours sincerely, Marco. Must be transformated in: Yours_sincerely, Marco. Now I have written this code: filemw = codecs.open(sys.argv[1], "r", "iso-8859-1").readlines() filein = codecs.open(sys.argv[2], "r", "iso-

Re: String manipulation

2007-04-04 Thread marco . minerva
; > regard" and "yours sincerely". I must create a phyton script that > > checks if a text contains one or more of these expressions and, in > > this case, replaces the spaces in the expression with the character > > "_". For example, the text > > &g

Re: String manipulation

2007-04-05 Thread marco . minerva
thing along the lines of > > set_phrase.replace(' ', r'\w+') > > 'as Hi! Thanks again... But where must I insert this instruction? -- Marco Minerva, [EMAIL PROTECTED] http://blogs.ugidotnet.org/marcom -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and RTF

2007-09-20 Thread Marco Bonifazi
On 20 Set, 09:01, Rufman <[EMAIL PROTECTED]> wrote: > Does anyone have a good rtf library for python, have exprience with > pyRTF or a link to a good tutorial? > > thx Stephane I have just used PyRtf to create a "report" with table and simple images. What is your qu

Re: Python and RTF

2007-09-20 Thread Marco Bonifazi
> -- > Grant Edwards grante Yow! Uh-oh!! I'm having > at TOO MUCH FUN!! >visi.com Oh, wonderful! Is licensed with the GPL and LGPL as like the previous versions are? Then, can I pu

Re: Iteration for Factorials

2007-10-22 Thread Marco Mariani
Py-Fun wrote: > I'm stuck trying to write a function that generates a factorial of a > number using iteration and not recursion. Any simple ideas would be > appreciated. As opposed to what, a complicated one? -- http://mail.python.org/mailman/listinfo/python-list

Re: Iteration for Factorials

2007-10-22 Thread Marco Mariani
Py-Fun wrote: > def itforfact(n): > while n<100: > print n > n+1 > n = input("Please enter a number below 100") You function should probably return something. After that, you can see what happens with the result you get. -- http://mail.python.org/mailman/listinfo/python-list

Re: Iteration for Factorials

2007-10-22 Thread Marco Mariani
From the cookbook, this time. It satisfies the requirements nicely ;) http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496691 def tail_recursion(g): ''' Version of tail_recursion decorator using no stack-frame inspection. ''' loc_vars ={"in_loop":False,"cnt":0}

Re: Check File Change Every 10 Seconds

2007-10-22 Thread Marco Mariani
Robert Rawlins - Think Blue wrote: > That certainly looks to be the type of thing that I'm looking to achieve, > however, I forgot to mention I'm running this on a Linux platform and not a > Win32 one :-( Sorry. Did you try python-gamin? "Gamin is a file and directory monitoring system defined

Re: Iteration for Factorials

2007-10-22 Thread Marco Mariani
Tim Golden wrote: >> From the cookbook, this time. >> It satisfies the requirements nicely ;) >> >> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496691 > > [... snip the ultimate general-purpose answer to the OP's question ... > > I really

Re: Iteration for Factorials

2007-10-23 Thread Marco Mariani
Tim Chase wrote: fact = lambda i: i > 1 and reduce(mul, xrange(1, i+1)) or not > i and 1 or None > > Stunts like this would get a person fired around here if they > were found in production code :) eheh, indeed. def fact(n): try: return eval('*'.join(str(x) for x in range(1,

Re: Iteration for Factorials

2007-10-23 Thread Marco Mariani
Roberto Bonvallet wrote: > import urllib > import re > urllib.URLopener.version = "Mozilla/4.0" > > def fact(x): > r = re.compile(r"%d ! = (\d+)" % x) > for line in urllib.urlopen("http://www.google.cl/search?q=%d%%21"; % x): > m = r.search(line) > if m: > retu

Re: Iteration for Factorials

2007-10-23 Thread Marco Mariani
[EMAIL PROTECTED] wrote: > Needs work. Uh... ok.. this one gives an exception ;-) def fact(n): try: return eval('*'.join(str(x) for x in range(1,n+1))) except: return n>=0 or ValueError print fact(-1) -- http://mail.python.org/mailman/listinfo/python-list

Re: Iteration for Factorials

2007-10-26 Thread Marco Mariani
[EMAIL PROTECTED] wrote: > class fact_0(object): > value = 1 [... > def __new__(self, n_): > class spanish_inquisition(object): > __metaclass__ = fact_meta > n = n_ > return spanish_inquisition() You wrote lots o

Re: Iteration for Factorials

2007-10-30 Thread Marco Mariani
Nick Craig-Wood wrote: > Note you can write your middle loop as > > for i in range(I): > number = myNumer[:] > random.shuffle(number) > if number == myNumer: > count+=1 Nice. Try 'em all, then count 'em. Another wtfery would be a SQLAlchemy solution, gene

Re: Explanation about pickle module

2007-01-30 Thread Marco Wahl
n(c__main__\nFoo\np1\nc__builtin__\nobject\np2\nNtp3\nRp4\n(dp5\nS'bar'\np6\nI1\nsb.") >>> b.bar 1 >>> b <__main__.Foo object at 0x402ae68c> >>> There is also pickle.dumps and pickle.loads to work directly with files. Further there is module cpickle which

Re: How to find all the same words in a text?

2007-02-10 Thread Marco Giusti
45324' > >there is only one occurrence of 324 word but string.find() finds 2 >occurrences ( in 45324 too) >>> '45 324 45324'.split().count('324') 1 >>> ciao marco -- reply to `python -c "print '[EMAIL PROTECTED]'

Re: How to find all the same words in a text?

2007-02-10 Thread Marco Giusti
On Sat, Feb 10, 2007 at 06:00:05AM -0800, Johny wrote: >On Feb 10, 2:42 pm, Marco Giusti <[EMAIL PROTECTED]> wrote: >> On Sat, Feb 10, 2007 at 05:29:23AM -0800, Johny wrote: >> >I need to find all the same words in a text . >> >What would be the best idea to do th

Re: Pythonic ORM with support for composite primary/foreign keys?

2007-11-06 Thread Marco Mariani
Wolfgang Keller wrote: > so far it seems to me as if the only ORM module for Python which > supports composite primary/foreign keys was SQLAlchemy. Which looks a > little bit "overbloated" for my needs: I "just" need to be able to > define a "logical model" (à la UML) in Python and have the ORM

Re: easy 3D graphics for rendering geometry?

2007-11-08 Thread Marco Nawijn
exported to FEA packages. Another possibility is www.salome-platform.org which is build on top of OpenCascade. It has a nice Python interface which makes the learning curve probably a little more acceptable. A downside is that, I think there are no Windows binaries yet. Regards, Marco Nawijn -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   >