I think it probably will, since replacing anything with "_" would set 
compatible table name strings.

There's one caveat:

"abc[something]def" mapping will overwrite the "abc/something/def", so you 
cannot have both folders in your mail account.

Although the case is very uneven, perhaps a combined replacement could be 
performed with [ and ] and spacing mapping to different symbols.

El lunes, 16 de abril de 2012 01:25:43 UTC-3, Massimo Di Pierro escribió:
>
> Will the proposed solution solve the problem?
>
> replace mailbox_name = mailbox.replace("[", "").replace("]", "").replace("/", 
> "_")
>
> with
>
> mailbox_name = re.sub('[^_\w]','',re.sub('[/ ]','_',mailbox))
>
>
>
> On Sunday, 15 April 2012 18:40:29 UTC-5, Alan Etkin wrote:
>>
>> Not fixed yet in trunk. There is a regex replacement proposal in the 
>> issue page by Massimo.
>>
>> El sábado, 14 de abril de 2012 22:44:41 UTC-3, pyhead escribió:
>>>
>>>
>>> Hi web2py users,
>>>
>>> db = DAL('imap://') successfully logs in to the mail server, but fails 
>>> when the commonly used spaces or '.' are returned in a folder name. Is 
>>> there any way to substitute not allowed characters for '_' so imap works?
>>> <type 'exceptions.SyntaxError'> only [0-9a-zA-Z_] allowed in table and 
>>> field names, received Gmail_All Mail
>>>
>>> This was reported and was flagged as accepted, so the fix should already 
>>> be in the nightly build, right?
>>> http://code.google.com/p/web2py/issues/detail?id=644
>>>
>>> Please share the recipe if you are successfully using DAL with IMAP.  I 
>>> am developing a web2py email client and this is crucial to its success.  
>>> Thank you!
>>>
>>
>> El sábado, 14 de abril de 2012 22:44:41 UTC-3, pyhead escribió:
>>>
>>>
>>> Hi web2py users,
>>>
>>> db = DAL('imap://') successfully logs in to the mail server, but fails 
>>> when the commonly used spaces or '.' are returned in a folder name. Is 
>>> there any way to substitute not allowed characters for '_' so imap works?
>>> <type 'exceptions.SyntaxError'> only [0-9a-zA-Z_] allowed in table and 
>>> field names, received Gmail_All Mail
>>>
>>> This was reported and was flagged as accepted, so the fix should already 
>>> be in the nightly build, right?
>>> http://code.google.com/p/web2py/issues/detail?id=644
>>>
>>> Please share the recipe if you are successfully using DAL with IMAP.  I 
>>> am developing a web2py email client and this is crucial to its success.  
>>> Thank you!
>>>
>>
>> El sábado, 14 de abril de 2012 22:44:41 UTC-3, pyhead escribió:
>>>
>>>
>>> Hi web2py users,
>>>
>>> db = DAL('imap://') successfully logs in to the mail server, but fails 
>>> when the commonly used spaces or '.' are returned in a folder name. Is 
>>> there any way to substitute not allowed characters for '_' so imap works?
>>> <type 'exceptions.SyntaxError'> only [0-9a-zA-Z_] allowed in table and 
>>> field names, received Gmail_All Mail
>>>
>>> This was reported and was flagged as accepted, so the fix should already 
>>> be in the nightly build, right?
>>> http://code.google.com/p/web2py/issues/detail?id=644
>>>
>>> Please share the recipe if you are successfully using DAL with IMAP.  I 
>>> am developing a web2py email client and this is crucial to its success.  
>>> Thank you!
>>>
>>

Reply via email to