On May 17, 4:17 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote:
> J. Pablo Fernández wrote:
> > I have an XML file that starts with:
>
> >
> >
> >
> > *-a
> >
>
> > out of it, I'd like to extract something like (I'm just showi
27;foo.attr2' and even 'end'. The same happens
for the rest of the breakpoints, so I end up with them set but not
their commands.
What would be the correct way to do this? Is it even possible?
Thanks a lot,
Pablo Torres N.
--
http://mail.python.org/mailman/listinfo/python-list
oding standars [2] and it's very usefull to clean the code.
Thanks in advance!
[1] http://www.python.org/dev/peps/pep-0008/
[2] http://drupal.org/coding-standards
--
Pablo Recio Quijano
Estudiante de Ingeniería Informática (UCA)
Alumno colaborador del Departamento de Lenguajes y Sistemas In
Thanks!
Pylint was what i was loking for
2010/2/7 Gerald Britton
> pylint and pychecker are good options
>
> On Sun, Feb 7, 2010 at 1:36 PM, Pablo Recio Quijano
> wrote:
> > Hi!
> > I'm finishing a project writen in Python, and I realize about the
> document
&
ib',
> 'C:\\WINDOWS\\system32\\python26.zip', 'c:\\Python26\\DLLs',
> 'c:\\Python26\\lib', 'c:\\Python26\\lib\\plat-win',
> 'c:\\Python26\\lib\\lib-tk', 'c:\\Python26',
> 'c:\\Python26\\lib\\site-packages',
>
ny suggestions / pointers to something useful,
>
> thanks,
>
> Matt.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Pablo Recio Quijano
Estudiante de Ingeniería Informática (UCA)
Alumno colaborador del Departamento de Lenguajes y Sistemas Informáticos
Par
list from a while ago:
http://mail.python.org/pipermail/python-list/2004-December/296269.html
I have followed it and it worked.
Pablo Torres N.
--
http://mail.python.org/mailman/listinfo/python-list
ds like it belongs to the python-ideas list. I suggest
posting there for better feedback, since the core developers check
that list more often than this one.
--
Pablo Torres N.
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 2, 9:56 pm, schickb wrote:
> I have fairly often found the need to split a sequence into two groups
> based on a function result. Much like the existing filter function,
> but returning a tuple of true, false sequences. In Python, something
> like:
>
> def split(seq, func=None):
> if fu
filter are faster than iterating with the for statement (and also
faster than list comprehensions). So here is a rewrite:
def split(seq, func=bool):
t = filter(func, seq)
f = filter(lambda x: not func(x), seq)
return list(t), list(f)
The lambda thing is kinda ugly, but I can't think of anything else.
Also, is it ok to return lists? Py3k saw a lot of APIs changed to
return iterables instead of lists, so maybe my function should have
'return t, f' as it's last statement.
--
Pablo Torres N.
--
http://mail.python.org/mailman/listinfo/python-list
icial, so it can be
judged objectively.
--
Pablo Torres N.
--
http://mail.python.org/mailman/listinfo/python-list
the last one.
In fact, I'd let them to realize that a function is convenient, and
base some of the grading in whether they wrote it or not. Just a
thought.
--
Pablo Torres N.
--
http://mail.python.org/mailman/listinfo/python-list
ware development tool that connects programs written in C
and C++ with a variety of high-level programming languages. SWIG is used
with different types of languages including common scripting languages
such as Perl, PHP, Python, Tcl and Ruby. "
---
Pablo Torres N.
--
http://mail.python.org/mailman/listinfo/python-list
nd would
> like to understand the reasoning behind it.
>
> kj
> --
> http://mail.python.org/mailman/listinfo/python-list
>
But...if no code is generated for assertions on some occasions, then the
parameters would go unchecked, potentially breaking your code in said
occasions.
--
Pablo Torres N.
--
http://mail.python.org/mailman/listinfo/python-list
t save your student's sanity and stick to good old
conditionals :-)
As for your initial question, I think, thirty four emails after, that yes, your
function is a bit too clever and you should sacrifice some generality in order
to make it more readable.
--
Pablo Torres N.
--
http://mail.p
reading this file? I mean which function is the
>> first?
>
> I don't really understand the question: what do you mean by 'first'?
> It might help if you tell us what your aims are.
I think he means the entry point, problem is that libraries have many.
--
Pablo Torres N.
--
http://mail.python.org/mailman/listinfo/python-list
I agree that it would be a good idea to make it an
> error, or a warning - "this might not do what you
> think it does", or an "are you sure?" exception.
>
> :-)
>
> - Hendrik
That would be even harder than adding a line to the docs. Besides,
the problem th
tion errors and moving your comments above the
line they reference will attract more help from others in this list
;-)
Also, I'd recommend limiting your line length to 80 chars, since lines
are wrapped anyway.
--
Pablo Torres N.
--
http://mail.python.org/mailman/listinfo/python-list
> nacim
Give this one a try too: http://www.mikeash.com/getting_answers.html
It doesn't talk down to you...as much :P
--
Pablo Torres N.
--
http://mail.python.org/mailman/listinfo/python-list
nd what you mean
by 'page'. Could you tell us about the structure of these
dictionaries?
> Any way to do that with list comprehension? Any other good way to do
> it besides iterating over the list?
>
> Thanks
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Pablo Torres N.
--
http://mail.python.org/mailman/listinfo/python-list
te assembly *with* python.
> Or how to translate python to assembly.
>
> As it turns out, CPython translates Python to byte code and has a dis
> (assembly) module that produces very nice assembly code ;-)
> So that is one answer to his question.
>
>> You'll need to tell
g-Yun "Xavier" Ho, Technical Artist
>
> Contact Information
> Mobile: (+61) 04 3335 4748
> Skype ID: SpaXe85
> Email: cont...@xavierho.com
> Website: http://xavierho.com/
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
--
Pablo Torres N.
--
http://mail.python.org/mailman/listinfo/python-list
turn False
> ...
>> Any ideas how to make that function look nicer? :)
>
> Change the names. Reverse the order of the arguments. Add a docstring.
>
Why reverse the order of the arguments? Is there a design principle there?
I always make a mess out of the order of my arguments
g.
> 00101101 instead of 45) ?
(Python 3)
>>> bin(45)
'0b101101'
>>> int(_, 2)
45
--
Pablo Martí
http://www.linkedin.com/in/pmarti || http://www.warp.es
python -c "print '706d6172746940776172702e6573'.decode('hex')"
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 24, 5:51 am, Iain King wrote:
> On Sep 23, 7:36 pm, David C Ullrich wrote:
>
>
>
> > On Tue, 22 Sep 2009 02:34:53 +, Steven D'Aprano wrote:
> > > On Mon, 21 Sep 2009 13:50:23 -0500, David C Ullrich wrote:
>
> > >> But you actually want to return twice the value. I don't see how to do
>
'm missing?
Regards,
[1]
http://docs.python.org/distutils/setupscript.html#installing-package-data
[2]
http://docs.python.org/install/#alternate-installation-unix-the-prefix-scheme
--
Pablo Recio Quijano
Desarrollador Django
Yaco Sistemas - http://www.yaco.es/
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I'm looking for developing a bluetooth application in python, and I'm
looking for the most suitable python library for it. Googling some
time I found pyBluez (http://code.google.com/p/pybluez/), however, the
library seems to be stopped since end 2009 (latest update Nov 2009)
and not to man
s you like that addresses the following issue:
What is the best way to use the dynamic features of Python to avoid having
to write a poor's man type system?
Thanks!
Juan Pablo
--
https://mail.python.org/mailman/listinfo/python-list
2016-08-09 12:06 GMT-07:00 Paul Rubin :
> Juan Pablo Romero Méndez writes:
> > In online forums sometimes people complain that they end up having to
> > test constantly for None
>
> That's something of a style issue. You can code in a way that avoids a
> lot of
What static checking can actually guarantee varies depending on the
specific type system at hand (C# vs Haskell vs Idris for example). But most
of them can guarantee simple stuff like: "I'm I allowed to invoke this
function at this point?"
If you don't have that, well you can rely on tests to show
2016-08-09 13:18 GMT-07:00 Rob Gaddi :
> Juan Pablo Romero Méndez wrote:
>
> > 2016-08-09 12:06 GMT-07:00 Paul Rubin :
> >
> >> Juan Pablo Romero Méndez writes:
> >> > In online forums sometimes people complain that they end up having to
> >> >
2016-08-09 14:01 GMT-07:00 Michael Selik :
> On Tue, Aug 9, 2016 at 3:22 PM Juan Pablo Romero Méndez <
> jpablo.rom...@gmail.com> wrote:
>
>> I'm actually looking for ways to minimize run time errors, so that would
>> include TypeError and AttributeError.
>>
2016-08-09 18:28 GMT-07:00 Steven D'Aprano :
> On Wed, 10 Aug 2016 04:29 am, Juan Pablo Romero Méndez wrote:
>
> > Hello,
> >
> > In online forums sometimes people complain that they end up having to
> test
> > constantly for None,
>
> Then don'
2016-08-09 23:47 GMT-07:00 Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info>:
> On Wednesday 10 August 2016 15:20, Juan Pablo Romero Méndez wrote:
>
> > Ok, so you suggested 1) catching exceptions at the point where you care,
> 2)
> > preemptively check f
2016-08-09 23:16 GMT-07:00 Gregory Ewing :
> Juan Pablo Romero Méndez wrote:
>
> This is interesting. You are Ok having runtime errors?
>>
>
> You're going to have runtime errors in any case, whether
> they come from code you've put there yourself to check
>
2016-08-09 18:28 GMT-07:00 Steven D'Aprano :
> On Wed, 10 Aug 2016 04:29 am, Juan Pablo Romero Méndez wrote:
>
> > Hello,
> >
> > In online forums sometimes people complain that they end up having to
> test
> > constantly for None,
>
> Then don'
atures of some language are a better solution than static typing. This is
of course more useful in languages that support both paradigms.
Juan Pablo
2016-08-10 13:50 GMT-07:00 Michael Selik :
>
>
> On Wed, Aug 10, 2016, 4:34 PM Juan Pablo Romero Méndez <
> jpablo.rom...@gmail.com>
2016-08-12 1:10 GMT-07:00 Lawrence D’Oliveiro :
> On Thursday, August 11, 2016 at 8:33:41 AM UTC+12, Juan Pablo Romero
> Méndez wrote:
>
> > I've been trying to find (without success so far) an example of a
> situation
> > where the dynamic features of a language
2016-08-14 7:29 GMT-07:00 Steven D'Aprano :
> On Thu, 11 Aug 2016 06:33 am, Juan Pablo Romero Méndez wrote:
>
> > I've been trying to find (without success so far) an example of a
> > situation where the dynamic features of a language like Python provides a
> > c
2016-08-27 21:30 GMT-07:00 Steve D'Aprano :
> On Sun, 28 Aug 2016 12:31 pm, Juan Pablo Romero Méndez wrote:
>
> > 2016-08-14 7:29 GMT-07:00 Steven D'Aprano :
> >
> >> On Thu, 11 Aug 2016 06:33 am, Juan Pablo Romero Méndez wrote:
> >>
> >>
2016-08-27 21:30 GMT-07:00 Steve D'Aprano :
> On Sun, 28 Aug 2016 12:31 pm, Juan Pablo Romero Méndez wrote:
>
> > 2016-08-14 7:29 GMT-07:00 Steven D'Aprano :
> >
> >> On Thu, 11 Aug 2016 06:33 am, Juan Pablo Romero Méndez wrote:
> >>
> >>
2016-08-28 0:04 GMT-07:00 Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info>:
> On Sunday 28 August 2016 15:56, Juan Pablo Romero Méndez wrote:
>
> > 2016-08-27 21:30 GMT-07:00 Steve D'Aprano :
> [...]
> >> Now it is true that speaking in full
Hello,
What do you guys think about adding a method "to_json" to dictionaries
and sequence types? Perhaps through a module import?
Regards,
Juan Pablo
--
http://mail.python.org/mailman/listinfo/python-list
s?
Regards,
Juan Pablo
--
http://mail.python.org/mailman/listinfo/python-list
I've been compiling everything needed by pivy (Coin, Qt,
SoQt, PyQt) with visual c++ 8, I decided to recompile python itself.
Juan Pablo
2008/12/9 Gabriel Genellina <[EMAIL PROTECTED]>:
> En Tue, 09 Dec 2008 11:32:46 -0200, Juan Pablo Romero Méndez
> <[EMAIL PROTECTED]&
In R:
norm = function(v) v/sqrt(sum(v^2))
:)
Juan Pablo
2008/12/10 Arnaud Delobelle <[EMAIL PROTECTED]>:
> "Dotan Cohen" <[EMAIL PROTECTED]> writes:
>
>> 2008/12/10 <[EMAIL PROTECTED]>:
>>> On Dec 5, 9:51 am, Xah Lee <[EMAIL PROTECTE
Finally installed Python 2.6, which is compiled with visual C++ 2008,
and all my problems went away.
Thanks to all,
Juan Pablo
2008/12/10 "Martin v. Löwis" <[EMAIL PROTECTED]>:
>> -
>> ...
>> error: P
f g(k):
return f
g(1)(1,1) ==> 3
Regards,
Juan Pablo
--
http://mail.python.org/mailman/listinfo/python-list
* x**2 - v * y**2 ) )
...
and have the code automatically figure out that w and v are free
variables and generate the right code.
Right now I can catch w and v (using NameError), but can't figure out
how to get python to assign values to w and v (other than declaring
them globals).
My code nee
t;", line 1, in
File "", line 4, in
TypeError: arg 5 (closure) must be tuple
>>>
Strange...
2008/12/17 Peter Otten <__pete...@web.de>:
> Juan Pablo Romero Méndez wrote:
>
>> Suppose this function is given:
>>
>> def f(x,y):
>
Hi there,
I hope this is the rigth place, if not please, tell me which is the
right dicussion place. I apologize in such case.
Ok, I am trying to do a very quick application (is "home based" so is
not a big deal...). My intention is to transfer files from one
computer to another.
I am using seve
PyQt: http://www.riverbankcomputing.co.uk/software/pyqt/intro
All the benefits of Qt: multiplataform, excellent documentation, great
API, visual widget designer, etc, etc.
For the coding itself, I use netbeans + python plugin.
Regards,
Juan Pablo
2009/6/21 Chris Rebert :
> On Sat, Jun
I use OpenInventor (Coin3d) which have a python binding called "pivy".
It works great.
http://pivy.coin3d.org/
Juan Pablo
2009/7/8 Helvin :
> Hi experts!
>
> I'm developing a GUI for a software using PyQT, and need 3D
> visualization. Should I use PyOpenGL or VTK?
&
101 - 153 of 153 matches
Mail list logo