Call for Participation: Python devroom @ FOSDEM 2025

2024-10-28 Thread Marc-Andre Lemburg via Python-list
or question: * Marc-André Lemburg: mal+fosdem [at] egenix.com * Rosie Wood: rwood [at] turing.ac.uk * Ludo -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Oct 28 2024) Python Projects, Coaching and Support ...https://www.egenix.com/ P

FOSDEM 2024: Call for Proposals - Python Devrooom

2023-11-23 Thread Marc-Andre Lemburg via Python-list
azoni and Marc-Andre Lemburg -- https://mail.python.org/mailman/listinfo/python-list

EuroPython 2021: All edited videos now available

2021-10-12 Thread Marc-Andre Lemburg
We’re happy to release another batch of 41 cut videos of EuroPython 2021 covering the third day sessions of the conference and a number of edited videos for the previous days. In total, we now have 118 videos waiting for you. You can watch them on our YouTube channel. We have created a EuroPython 2

EuroPython Society: Launching the EuroPython Society Fellow Grant

2021-10-08 Thread Marc-Andre Lemburg
We are excited to announce the new EuroPython Society Fellow Grant. The grant is intended to honor and show gratitude towards members of the EuroPython Society (EPS) and the EuroPython Workgroups who have contributed significantly towards our mission, the EuroPython conference and the Society as a

EuroPython 2021: Edited videos of the second day available

2021-10-04 Thread Marc-Andre Lemburg
We’re happy to release another batch of 35 cut videos of EuroPython 2021 covering most of the second day sessions of the conference. Together with the first day videos, we now have 77 videos waiting for you. You can watch them on our YouTube channel: * EuroPython 2021 Playlist

EuroPython 2021: Edited videos of the first day available

2021-09-27 Thread Marc-Andre Lemburg
We’re happy to release the first 42 cut videos of EuroPython 2021 covering the first day sessions of the conference. You can watch them on our YouTube channel: * EuroPython 2021 Playlist * https://www.youtube.com/playlist?list=PL8uoeex94UhHgMD9GOCbEHWku7pEPx9fW Over the next

Re: c extension finding the module in object initialization

2021-09-27 Thread Marc-Andre Lemburg
Hi Robin, seeing that no one replied to your question, I'd suggest to ask this on the Python C-API ML: https://mail.python.org/mailman3/lists/capi-sig.python.org/ That's where the experts are, including the ones who implemented the mutli-phase logic. Cheers, -- Marc-Andre Lemburg

EuroPython Society: General Assembly 2021

2021-09-25 Thread Marc-Andre Lemburg
As last year, we are holding the General Assembly (GA) of the EuroPython Society (EPS) online for this year. General Assembly In accordance with our bylaws, we are calling for the EuroPython Society General Assembly to be held on Sunday, October 10th 2020, from 19:00 - 21:00 CEST

EuroPython 2021: Data Science Mini-Conference

2021-07-22 Thread Marc-Andre Lemburg
It has become a tradition at EuroPython to include a special data science track. * EuroPython 2021 Data Science Mini-Conference * https://ep2021.europython.eu/events/data-science/ This year, we have expanded on the theme and included more data science related content than ever be

EuroPython 2021: Full-Day Workshops

2021-07-20 Thread Marc-Andre Lemburg
This year's edition of EuroPython begins with two days of training sessions as outlined in the schedule. Many of these last 3 hours, however, we would like to highlight two specific workshops available to those who want a deeper dive. They are most valuable for people new to the Python language and

EuroPython 2021: Keynotes and Booklet

2021-07-19 Thread Marc-Andre Lemburg
EuroPython 2021 begins next week. We are proud to present the keynote speakers and our conference booklet. Keynotes The following keynotes will take place on Wednesday, Thursday and Friday. Tickets are still available. If you want to find out more about our keynote speakers, please head

EuroPython 2021: Conference Organisers & Community Discounts

2021-07-16 Thread Marc-Andre Lemburg
The EuroPython Society (EPS) exists not only to run the EuroPython Conference, but also to support the wider Python community in Europe. It accomplishes this in many ways; here are two of them! * EuroPython Society supporting the community * https://blog.europython.eu/europython-202

EuroPython 2021: Opening our Merchandise Shop

2021-07-08 Thread Marc-Andre Lemburg
We’re very happy to announce our merchandise shop for EuroPython 2021, with a fabulous new design for the attendee t-shirts: * EuroPython 2021 Merch Shop * https://ep2021.europython.eu/europython/europython-merchandise-shop/ You can find the shop under the "EuroPython

EuroPython 2021: Trainings and Workshops

2021-07-06 Thread Marc-Andre Lemburg
Have you ever wanted to build an image search system, take a deep dive into pytest or learn about algorithmic trading? Then we have a treat for you! The EuroPython conference will start with two full training and workshop days on Monday, July 26th, and Tuesday, July 27th: * Eu

EuroPython 2021: Volume Discount for Company Teams

2021-06-29 Thread Marc-Andre Lemburg
EuroPython 2021 offers special discounts on business tickets for company teams. * EuroPython Volume Discounts * https://ep2021.europython.eu/sponsor/packages/#Volume-Discount If you are going to attend the conference as a team, we offer the following volume discounts

EuroPython 2021: Free tickets for Python Core Developers

2021-06-25 Thread Marc-Andre Lemburg
In 2019, we have set up the Guido van Rossum Core Developer Grant, to make it easy for Python Core Developers to attend EuroPython, but also to give something back to the core team and add a perk to make core development more attractive. If you are a core developer, please check our grant page for

EuroPython 2021: Schedule published

2021-06-17 Thread Marc-Andre Lemburg
After two weeks of hard work by our program workgroup, we are very excited to announce the EuroPython 2021 schedule: * EuroPython 2021 Schedule * https://ep2021.europython.eu/schedule/ Seven full days of Python - EuroPython 2021 will

EuroPython 2021: Session List Available

2021-05-31 Thread Marc-Andre Lemburg
Our program work group (WG) has been working hard over the last week to select sessions for EuroPython 2021, based on your talk voting and our diversity criteria. We’re now happy to announce the initial list with more than 100 sessions, brought to you by more than 100 speakers.

EuroPython 2021: Talk Voting is Open

2021-05-17 Thread Marc-Andre Lemburg
Talk voting is your chance to tell us what you’d like to see at EuroPython 2021. We will leave talk voting open until: Sunday, May 23, 23:59:59 CEST In order to vote, please log in to the website and navigate to the talk voting page: * EuroPython 2021 Talk

Re: recommends of redesign OO feature of python !!!

2018-10-25 Thread Andre Müller
Troll detected! If you don't like Python, don't use it. Very simple. The concept of Python is good as it is. -- https://mail.python.org/mailman/listinfo/python-list

Re: help me ?

2018-02-27 Thread Andre Müller
tion is to learn and understand Python. You just want to finish your homework, which bother you. Greetings Andre -- https://mail.python.org/mailman/listinfo/python-list

Re: "Programs" folder not found.

2018-02-15 Thread Andre Müller
Look in %localappdata%\Programs\Python Enerel Amgalan via Python-list schrieb am Do., 15. Feb. 2018 um 14:05 Uhr: > > Hello! So I downloaded “Python” program in C:>Users>(my > name)>AppData>Local>Programs>Python.And then in “Local” folder I can’t find > “Programs” folder,but it says it downloade

Re: Regex on a Dictionary

2018-02-15 Thread Andre Müller
Hello, this question also came up there: https://python-forum.io/Thread-Working-with-Dict-Object Greetings Andre -- https://mail.python.org/mailman/listinfo/python-list

Re: Old format with %

2018-02-15 Thread Andre Müller
It can be escaped: "test %d %%" % 7 Terry Reedy schrieb am Mi., 14. Feb. 2018 um 20:53 Uhr: > On 2/14/2018 7:54 AM, ast wrote: > > Le 14/02/2018 à 13:46, ast a écrit : > >> Hello > >> > >> It seems that caracter % can't be escaped > >> > >> >>>"test %d %" % 7 > >> ValueError: incomplete format

Re: Why no '|' operator for dict?

2018-02-05 Thread Andre Müller
__or__(self, other): if not isinstance(other, (self.__class__, dict)): raise ValueError('Is not a dict!') return {**self, **other} __ror__ = __or__ >>> UDict({'foo': 1, 'bar': 1337}) | UDict({'bar': 43}) {'bar':

Re: Regular expression

2017-07-26 Thread Andre Müller
fname = 'first-324-True-rms-kjhg-Meterc639.html' # with string manipulation stem, suffix = fname.rsplit('.', 1) print(stem[-4:]) # oo-style with str manipulation import pathlib path = pathlib.Path(fname) print(path.stem[-4:]) -- https://mail.python.org/mailman/listinfo/python-list

Re: pyserial and end-of-line specification

2017-07-15 Thread Andre Müller
Random(ser), newline='yourline_ending') If it's readonly: sio = io.TextIOWrapper(io.BufferedReader(ser), newline='yourline_ending') I never tried it, but your question leads me to take a look into this cool features of the io module. Greetings Andre -- https://mail.python.org/mailman/listinfo/python-list

Re: why are these 2 fucking clowns in here ?

2017-06-30 Thread Andre Müller
Just don't read it. Calm down. -- https://mail.python.org/mailman/listinfo/python-list

Re: A Good Tutorial on Python Decorators

2017-06-27 Thread Andre Müller
Activate JavaScript, then you can see the content. I had the same problem. Peter Pearson schrieb am Di., 27. Juni 2017 um 18:35 Uhr: > On Tue, 27 Jun 2017 15:10:53 + (UTC), Saurabh Chaturvedi wrote: > > https://opensource.google.com/projects/py-decorators-tutorial > > "No Results found." > >

Re: "Python launcher" required to run *.py scripts on Windows?

2017-06-27 Thread Andre Müller
Double Post: https://python-forum.io/Thread-Python-launcher-required-to-run-py-scripts-on-Windows Pleas don't do this. It's not a nice behavior. Thanks. Andre -- https://mail.python.org/mailman/listinfo/python-list

Re: os.walk the apostrophe and unicode

2017-06-24 Thread Andre Müller
Can os.fsencode and os.fsdecode help? I've seen it somewhere. I've never used it. To fix encodings, sometimes I use the module ftfy Greetings Andre -- https://mail.python.org/mailman/listinfo/python-list

Re: Standard lib version of something like enumerate() that takes a max count iteration parameter?

2017-06-16 Thread Andre Müller
Am 15.06.2017 um 07:09 schrieb Jussi Piitulainen: > Andre Müller writes: > >> I'm a fan of infinite sequences. Try out itertools.islice. >> You should not underestimate this very important module. >> >> Please read also the documentation: >> https://d

Re: How do you use Python 3.5 and Python 3.6 in production

2017-06-14 Thread Andre Müller
Hi, I'm using Arch Linux. There is currently Python 3.6 the standard interpreter. But I think it's not good to use this in production. Hm, maybe pyenv can be an distribution independent solution: https://github.com/pyenv/pyenv If you're using pyenv, then you'll have some build dependencies. One t

Re: Converting epoch to string in format yyyy-mm-dd, or maybe it is not necessary

2017-06-14 Thread Andre Müller
;s a datetime object. Greetings Andre -- https://mail.python.org/mailman/listinfo/python-list

Re: API Help

2017-06-14 Thread Andre Müller
e': 0.0, 'warehouseCode': 'WA-1-US'}, #{'quantityAvailable': 0.0, 'warehouseCode': 'PO-1-CA'}], #'itemNumber': '75-5044'}] # the interesting part for items in inventory: # get the elements in from the list #

Re: Standard lib version of something like enumerate() that takes a max count iteration parameter?

2017-06-14 Thread Andre Müller
lazy evaluated object # using this just as a dummy # if you're using legacy Python (2.x), then use the xrange function for it # or you'll get a memory error max_count = 10 step = 1 for i, element in enumerate(islice(iterable, 0, max_count, step), start=1): print(i, element)

Re: Hello from a super noob!

2017-06-08 Thread Andre Müller
Hello, you can refactor your code a little bit and learn more about exceptions: def get_numbers(): first = None second = None while True: try: if first is None: first = int(input('Enter your first number: ')) if second is None:

Re: Referring to a module by a string without using eval()

2017-05-17 Thread Andre Müller
at(key, self._name)) return Module(ret) else: print('Attribute {} is not a module. It\'s a {}'.format(key, type(ret))) return ret def __getitem__(self, key): return self.__getattr__(key) os_wrapped = Module(os) sub1 =

Re: Practice Python

2017-05-10 Thread Andre Müller
Am 10.05.2017 um 14:18 schrieb Chris Angelico: > On Wed, May 10, 2017 at 10:11 PM, Andre Müller wrote: >> 1.) a short example for Python 3, but not exactly what they want. >> >> def square(numbers): >> yield from sorted(n**2 for n in numbers) >> >

Re: Practice Python

2017-05-10 Thread Andre Müller
hon 3 is ;-) Python 2.7 feels old... it is old. Please learn Python 3. Greetings Andre Am 08.05.2017 um 08:52 schrieb gyrhgyrh...@gmail.com: > Python - Exercise 5 > 1. Write a function that gets a list (list) of numbers. The function returns > a new list of ordered square numbers from t

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Andre Müller
ed up about politics, war and hate? Then just make a new constitution. Greetings Andre Müller signature.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

Re: write arrays to disk

2017-04-17 Thread Andre Müller
mpy.fromfile(fd, dtype=numpy.int) What you should not do: arr = [1, 2, 3, 4] with open('plain.txt', 'wt') as fd: fd.write(repr(arr)) with open('plain.txt') as fd: arr = eval(fd.read()) If you need to store more data, you should think about a database.

Re: Merging multiple sorted sequences.

2017-04-17 Thread Andre Müller
Hi, when you have lists with different lengths and want to zip them, you should look at itertools.zip_longest Greetings Andre -- https://mail.python.org/mailman/listinfo/python-list

TemplateError

2016-11-20 Thread iivri . andre
THIS error is constantly showing up when I run my python script eloiim:build iivri.andre$ python run.py * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) [2016-11-21 01:15:26,561] ERROR in app: Exception on / [GET] Traceback (most recent call last): File "/usr/local/lib/python2.7/sit

Re: How to create python web framework for ERP

2014-09-09 Thread Andre Duarte
Vimal, Django is a more generic framework(was built initialy for content management). Odoo is a valid sugestion but take some time to see Frappe.io. ERPNext was built on top of this framework and is a great application for small bussiness. []'s André -- https://mail.python.org/mailman/listinfo

Re: Embedding numpy works once, but not twice??

2014-06-04 Thread Andre
Any Solution? -- AL Barbieri http://scholar.google.com/citations?user=tylaKAMJ -- https://mail.python.org/mailman/listinfo/python-list

Re: Send commands to USB device in Python

2014-05-26 Thread andre . miras
Hi, I saw your thread on SourceFourge (http://sourceforge.net/p/pyusb/mailman/message/31969943/), but I don't have an account. I also have MTI RU-824 reader. I sniffed the USB communication in the Windows demo program and I saw that the header should be written backward. So rather than: HEADER

Re: Intermediate Python user needed help

2012-08-05 Thread Andre Ramaciotti
On 08/05/2012 06:12 PM, MRAB wrote: On 05/08/2012 22:03, Tim Chase wrote: On 08/05/12 15:52, John Mordecai Dildy wrote: Current Problem at the moment Traceback (most recent call last): File "ex26.py", line 66, in beans, jars, crates = secret_formula(start-point) NameError: name 'start'

Re: Function declarations ?

2011-06-12 Thread Andre Majorel
On 2011-06-10, Asen Bozhilov wrote: > Andre Majorel wrote: > >> Is there a way to keep the definitions of the high-level >> functions at the top of the source ? I don't see a way to >> declare a function in Python. > > Languages with variable and function

Function declarations ?

2011-06-08 Thread Andre Majorel
Is there a way to keep the definitions of the high-level functions at the top of the source ? I don't see a way to declare a function in Python. Thanks in advance. -- André Majorel http://www.teaser.fr/~amajorel/ J'ai des droits. Les autres ont des devoirs. -- http://mail.python.org/mailman/lis

Language & lib reference in man format ?

2011-04-20 Thread Andre Majorel
If someone has ever written a script to convert the Python Language Reference and Library Reference to man format, I'm interested. Thanks in advance. -- André Majorel http://www.teaser.fr/~amajorel/ "The object of this year's expedition is to see if we can find trace of last year's expedition."

Re: simple games w/o pygame

2010-12-22 Thread Andre Alexander Bell
l I can find is more complex games using > Pygame. Can anyone help me out here? Recently someone posted this link on the list, which might be interesting: http://inventwithpython.com/index.html Regards Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic list name from a string

2010-12-20 Thread Andre Alexander Bell
s[my_dynamic_list] = [] Maybe you tell us some more what you want to achieve... Regards Andre -- http://mail.python.org/mailman/listinfo/python-list

RE: Kind of plugin system

2010-11-27 Thread Marc-Andre Belzile
I guess you could just define an entry-point in your source provider files that would return a specific instance of an InformationProvider class. This entry-point would be called by your main app (maybe at startup time or during an update phase). There are plenty of articles on the web about py

Python OGL package

2010-11-16 Thread Marc-Andre Belzile
Hi list, could someone recommend a good python ogl package (open source is preferred) ? I found these ones so far: http://pyopengl.sourceforge.net/ http://wiki.wxpython.org/wxOGL thanks -mab -- http://mail.python.org/mailman/listinfo/python-list

Re: How to write pbm file in Python 3?

2010-10-30 Thread Andre Roberge
On Sun, Oct 31, 2010 at 1:32 AM, Chris Rebert wrote: > On Sat, Oct 30, 2010 at 9:21 PM, André wrote: > > On Oct 31, 1:11 am, Chris Rebert wrote: > >> On Sat, Oct 30, 2010 at 8:32 PM, André wrote: > >> > I'm trying to create pbm (portable bitmap) files using Python 3 and > >> > have run into a

Re: is list comprehension necessary?

2010-10-26 Thread Andre Alexander Bell
On 10/26/2010 07:22 PM, Ian Kelly wrote: > >>> i = 5 > >>> l = [i**2 for i in range(3)] > >>> i > 2 > > > This has been corrected in Python 3. Sorry. You're right. I forgot to mention that... Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: is list comprehension necessary?

2010-10-26 Thread Andre Alexander Bell
Hello, I occasionally use LCs, if they seem useful. However, what I don't like about LCs is that they 'look-like' being a closed scope, while actually they are in the scope of there call. Example: >>> i = 5 >>> l = [i**2 for i in range(3)] >>> i 2

Re: isnan

2010-10-12 Thread Andre Alexander Bell
On 10/12/2010 06:22 PM, Ian Kelly wrote: > That's the inverse of what the OP wanted. The full solution: > >>>> A[~isnan(B)] > array([2, 3]) Indeed, you are right Ian. Thanks for pointing that out. :) Sorry for the mistake. Regards Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: isnan

2010-10-11 Thread Andre Alexander Bell
How about this: >>> from numpy import NAN >>> A = np.array([1,2,3,4,5]) >>> B = np.array([NAN,2,3,NAN,NAN]) >>> A = A[isnan(B)] >>> A array([1, 4, 5]) Regards Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: Numpy: Multiplying arrays of matrices

2010-09-15 Thread Andre Alexander Bell
On 09/16/2010 08:24 AM, Andre Alexander Bell wrote: or you could write the loop >>> m1m2 = np.empty_like(m1) >>> for i in range(m1m2.shape[0]): ... m1m2[i] = np.dot(m1, m2) This should have been ... m1m2[i] = np.dot(m1[i], m2[i]) Sorry for the typo. Andre -- http

Re: Numpy: Multiplying arrays of matrices

2010-09-15 Thread Andre Alexander Bell
1inv[i] = np.linalg.inv(m1[i]) Once again, I'm not sure whether or not it is acceptable to have the overhead of treating the array as a list. Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: String formatting with the format string syntax

2010-09-15 Thread Andre Alexander Bell
name Pretty cool. Thanks a lot. Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: String formatting with the format string syntax

2010-09-15 Thread Andre Alexander Bell
be used. So if using this method is completely ok, why does it start with _, why is it almost undocumented? Or did I miss something, some docs somewhere? Best regards Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: String formatting with the format string syntax

2010-09-14 Thread Andre Alexander Bell
ble2} placeholders.' I'm seeking a way to extract the named placesholders, i.e. the names 'variable1' and 'variable2' from the template. I'm not trying to put in values for them. I hope this is clearer. Thanks again Andre -- http://mail.python.org/mailman/listinfo/python-list

String formatting with the format string syntax

2010-09-14 Thread Andre Alexander Bell
pend(key) Is there a more elegant solution? What are a, c, d? Where can I find additional information on this method? Should one use a method that actually starts with an _? Couldn't this one change any time soon? Thanks for any help Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: Accumulate function in python

2010-07-19 Thread Andre Alexander Bell
cummulative_sum(value): global current current += value return current >>> map(cummulative_sum, x) [0, 1, 3, 4, 5, 5, 5, 7, 10] Weird: def cummulative_sum_reducer(x, y): x.append(x[-1] + y) return x >>> reduce(cummulative_sum_reducer, x, [0]) [0, 0, 1, 3, 4, 5

Re: create dynamic instance

2010-07-16 Thread Andre Alexander Bell
ain__': test_objects = [Test() for i in range(10)] print test_objects[0].value Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: Naming Conventions, Where's the Convention Waldo?

2010-07-11 Thread Andre Alexander Bell
ble name reflect it's purpose instead of it's type? E.g. name = 'rantingrick' counter = 1 ... as compared to str = 'rantingrick' int = 1? Regards Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: python app development

2010-07-03 Thread Andre Alexander Bell
g You might want to read through the tutorials given in the documentation at the Nokia site and possibly take a look at the examples provided with, e.g. PyQt. I'm sure other will add in more valuable links and suggestions. Best regards Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: Python dynamic attribute creation

2010-06-30 Thread Andre Alexander Bell
On 06/29/2010 06:46 PM, WANG Cong wrote: > On 06/29/10 17:48, Andre Alexander Bell wrote: >>>>> var a >>>>> a >> -> should raise an variable 'unset' exception >> >> Keep in mind that the module you are writing in is just an object a

Re: Python dynamic attribute creation

2010-06-29 Thread Andre Alexander Bell
nary would need the ability to store keys (variable names) without values. This approach increases the code length considerably, just to catch the typos. Keep in mind that the module you are writing in is just an object as is any function or method. So using local variables therein you are doing exactly what you want to abandon from the OOP part. Regards Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: Second attempt WAS: From Dict to Classes yes or no and how

2010-06-22 Thread Andre Alexander Bell
object in the other index dict. Modifying users['jdoe'] would modify secnums[12345]! This is what you actually want from an index... > How do I iterate through and access an individual user record! You iterate over the index... Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: From Dict to Classes yes or no and how

2010-06-22 Thread Andre Alexander Bell
t to use classes if the dict approach works great? Regards Andre -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwgo10ACgkQnuHMhboRh6QpCACePUckiiafgAM/h65/THfFQNgZ RmwAn35of1VvLTNALA/pTme5gKA8g683

Re: From Dict to Classes yes or no and how

2010-06-22 Thread Andre Alexander Bell
interested in the csv module http://docs.python.org/library/csv.html Regards Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: plac 0.5 is out!

2010-06-21 Thread Andre Alexander Bell
d this is already possible and covered in the advanced document. > See the section containers of commands: > > http://micheles.googlecode.com/hg/plac/doc/plac_adv.html#containers-of-commands Great. :) I'll read it... Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: plac 0.5 is out!

2010-06-20 Thread Andre Alexander Bell
is is already possible but just not covered by the first link I've read by now. Anyway, I very much like this package and it seems like I have a new friend at my disposal. Thanks and best regards Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: plac 0.5 is out!

2010-06-20 Thread Andre Alexander Bell
ge output? Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: pythonize this!

2010-06-19 Thread Andre Alexander Bell
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/18/2010 05:53 PM, Mark Lawrence wrote: > Andre, looks like a really bad day for you then, *TWO* nights out with > me *AND* (looking at your email address) Germany loosing in the world > cup. :( There are days one looses and there are

Re: pythonize this!

2010-06-18 Thread Andre Alexander Bell
lution through cython. As Steven D'Aprano already pointed out this then will make me receive the second price of two nights out? Cheers Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: pythonize this!

2010-06-18 Thread Andre Alexander Bell
de) >>> S = lambda k: (50*k**3 - 165*k**2 - 47*k) / 6 >>> S(2010/5) 536926141 However, this only works for full cycles of (1,1,1,-1,-1) and you would have to add/subtract the modulus parts yourself. (e.g. if you are interested in your sum from 1..2011... Cheers Andre -- http://

Re: pythonize this!

2010-06-15 Thread Andre Alexander Bell
type=numpy.int) >>> signs[3::5] = -1 >>> signs[4::5] = -1 >>> numpy.sum(signs*squares) 536926141 Cheers Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: solve a newspaper quiz

2010-05-09 Thread Andre Engels
On Sun, May 9, 2010 at 11:31 AM, Xavier Ho wrote: > On Sun, May 9, 2010 at 7:20 PM, superpollo wrote: >> >> "if a b c are digits, solve ab:c=a*c+b" > > Sorry, what does the notation ab:c mean? The number ab divided by c. -- André Engels, andreeng...@gmail.com -- http://mail.python.org/mailma

Re: Teaching Programming

2010-05-04 Thread Andre Engels
On Tue, May 4, 2010 at 4:35 PM, James Mills wrote: > On Wed, May 5, 2010 at 12:21 AM, Ed Keith wrote: >> To deal with indentation I had to >> >>   1) keep track of indentation of all chunks of code embedded in the >>      document and indent inserted chunks to the sum of all the >>      indentati

Re: Where can i reference the "regular expressions"

2010-03-24 Thread Andre Engels
On Wed, Mar 24, 2010 at 10:34 AM, John Smithury wrote: > ==source > the > is > name > ==source end= > > First, get the word only(discard the "" and ""), it can use > regular expression, right? > > the > is > name > Second, get a charactor in each word an

Re: Where can i reference the "regular expressions"

2010-03-24 Thread Andre Engels
On Wed, Mar 24, 2010 at 10:07 AM, John Smithury wrote: > Dear pythoners, > > I'm a new member to studay the python, i wan't to studay the "regular > expressions" handle like below: > > ==source > the > is > name > ==source end= > > > after convert, the r

Re: Can't define __call__ within __init__?

2010-03-11 Thread Andre Engels
On Thu, Mar 11, 2010 at 2:30 PM, Steve Holden wrote: >> The example I showed was just a toy problem.  The real problem is >> I expect to call a function many times, and I want to avoid the overhead of >> the 'if blah' everytime. >> > This is a premature optimization. First, make it work. Then (if

Re: Interest check in some delicious syntactic sugar for "except:pass"

2010-03-03 Thread Andre Engels
On Wed, Mar 3, 2010 at 10:27 AM, Oren Elrad wrote: > Howdy all, longtime appreciative user, first time mailer-inner. > > I'm wondering if there is any support (tepid better than none) for the > following syntactic sugar: > > silence: > block > > -> > > try: > .

Re: case do problem

2010-03-03 Thread Andre Engels
On Tue, Mar 2, 2010 at 6:46 PM, Tracubik wrote: > and, generally > speaking, the try..except block slow down the execution of the program or > not? Try...except tends to be slow when the exception does occur, fast when it does not. Apart from that, if these fraction-of-a-fraction-of-a-second ga

Re: The Disappearing Program?

2010-02-19 Thread Andre Engels
On Fri, Feb 19, 2010 at 3:19 PM, Mark Lawrence wrote: > Andre Engels wrote: >> >> On Fri, Feb 19, 2010 at 12:20 PM, W. eWatson >> wrote: >>> >>> I've successfully compiled several small python programs on Win XP into >>> executables using p

Re: The Disappearing Program?

2010-02-19 Thread Andre Engels
On Fri, Feb 19, 2010 at 12:20 PM, W. eWatson wrote: > I've successfully compiled several small python programs on Win XP into > executables using py2exe. A program goes from a name like snowball.py to > snowball. A dir in the command prompt window finds snowball.py but not > snowball. If I type in

Re: Bizarre arithmetic results

2010-02-11 Thread Andre Engels
On Thu, Feb 11, 2010 at 1:44 AM, Terrence Cole wrote: > Can someone explain to me what python is doing here? > > Python 3.1.1 (r311:74480, Feb  3 2010, 13:36:47) > [GCC 4.3.4] on linux2 > Type "help", "copyright", "credits" or "license" for more information. -0.1 ** 0.1 > -0.7943282347242815

Re: list.extend([]) Question

2010-01-30 Thread Andre Engels
On Sat, Jan 30, 2010 at 4:32 PM, Dan Brown wrote: > Why does extending a list with the empty list result in None?  It > seems very counterintuitive to me, at least --- I expected ['a'].extend > ([]) to result in ['a'], not None. Extend is a method of the list. The list itself is changed, it does

Re: myths about python 3

2010-01-27 Thread Andre Engels
On Wed, Jan 27, 2010 at 11:32 AM, Daniel Fetchinson wrote: > Hi folks, > > I was going to write this post for a while because all sorts of myths > periodically come up on this list about python 3. I don't think the > posters mean to spread false information on purpose, they simply are > not aware

Re: scraping with urllib2

2010-01-26 Thread Andre Engels
On Wed, Jan 27, 2010 at 6:26 AM, Patrick wrote: > I'm trying to scrape the attached link for the price listed $99.99: > http://bananarepublic.gap.com/browse/product.do?cid=41559&vid=1&pid=692392 > > I can see the price if I view the source(I even turned off java and > javascript), but when I use u

Re: Symbols as parameters?

2010-01-21 Thread Andre Engels
On Thu, Jan 21, 2010 at 8:43 AM, Martin Drautzburg wrote: > Hello all, > > When passing parameters to a function, you sometimes need a paramter > which can only assume certain values, e.g. > >        def move (direction): >                ... > If direction can only be "up", "down", "left" or "rig

Re: a list/re problem

2009-12-11 Thread Andre Engels
On Fri, Dec 11, 2009 at 9:49 PM, Ed Keith wrote: > I have a problem and I am trying to find a solution to it that is both > efficient and elegant. > > I have a list call it 'l': > > l = ['asc', '*nbh*', 'jlsdjfdk', 'ikjh', '*jkjsdfjasd*', 'rewr'] > > Notice that some of the items in the list start

Re: Why the expression "(1)" is not an one-arity tuple, but int ?

2009-12-04 Thread Andre Engels
2009/12/4 Петров Александр : > Hello All ! > > In my code I try to use a generic approach to work with tuples. Let > "X" be a tuple. > When I want to access a first element of a tuple, I can write: "X[0]". > And that is really working when X is a n-arity tuple, with n>1 (for > example "foo( (1,2,3)

Re: Question about file objects...

2009-12-02 Thread Andre Engels
On Wed, Dec 2, 2009 at 3:14 PM, J wrote: > Something that came up in class... > > when you are pulling data from a file using f.next(), the file is read > one line at a time. > > What was explained to us is that Python iterates the file based on a > carriage return as the delimiter. > But what if

Re: Is there something similar to list comprehension in dict?

2009-11-20 Thread Andre Engels
On Fri, Nov 20, 2009 at 4:18 AM, Peng Yu wrote: > I'm wondering if there is something similar to list comprehension for > dict (please see the example code below). > > > d = dict(one=1, two=2) > print d > > def fun(d):#Is there a way similar to list comprehension to change the > argument d so that

  1   2   3   >