Hello guys,
I have a problem with my MacBook Pro ’13, version 10.13.4, because when I try
to open the shell it says that it couldn’t make any connection because it
wasn’t able to make a subprocess. Can you help me?
Giorgio
___
Tutor maillist
2010/3/8 Benno Lang
>
>
> WSGI is based on CGI, so I imagine that it's not too difficult to have
> a wrapper that converts between the protocols. I haven't tried
> wsgiref, though.
>
Yes Benno it isn't. It seems that mod_wsgi is the most used alternative.
>
> > Do you have any idea i should us
2010/3/8 Dave Angel
>
>> You still didn't provide the full context. Are you trying to do store
> binary data, or not?
>
Yes i think ti's binary data. I'm just reading with file.read a JPG image.
Stefan: yes, read that tutorial :)
Giorgio
>
>
>
--
-
uot;
This is the problem. Any idea?
> DaveA
>
Giorgio
--
--
AnotherNetFellow
Email: anothernetfel...@gmail.com
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
F8.
So, let's say i have to put into an image file:
filestream = file.read()
filetoput = filestream.encode('utf-8')
Do you think this is ok?
Oh, of course everything url-encoded then
Giorgio
>
> Denis
> --
>
>
> la vita e
due to #coding line in source.
> b is a latin-1 string, due to explicit encoding.
>
Oh, right. And, if i'm not wrong B is an UTF8 string decoded to unicode (due
to the coding: statement at the top of the file) and re-encoded to latin1
> -Mark
Thankyou again
Giorgio
--
--
Anoth
ork with strings
defined in the file.
> Don't store anything internally as strings, and you won't create the
> ambiguity you have with your 't' variable above.
>
> DaveA
>
Thankyou Dave
Giorgio
--
--
AnotherNetFellow
Email: anothernetfel...@gmail.com
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
but
t = "ciao è ciao"
t = unicode(t)
That should do exactly the same instead of using the specified encoding
always assume that if i'm not telling the function what the encoding is, i'm
using ASCII.
Is this a bug?
Giorgio
--
--
AnotherNetFellow
Email: anothernetfel...@gmail.com
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
hat supports CGI not only with apache and his dedicated mod).
Can you confirm this?
Do you have any idea i should use mod_wsgi instead of wsgiref + mod_cgi?
Thankyou
Giorgio
--
--
AnotherNetFellow
Email: anothernetfel...@gmail.com
___
Tutor maillist
;
> This trial uses the default format of your system. It does the same as
> a = "giorgio è giorgio".encode(default_format)
> It's a shorcut for ustring *literals* (constants), directly expressed by
> the programmer. In source code, it would use the format specified
e encoded. This makes clear this example:
c = "giorgio è giorgio"
d = c.decode("utf8")
I create an utf8 string, and to convert it into unicode i need to tell
python that the string IS utf8.
Just don't understand why in my Windows XP computer in Python IDLE doesn't
work:
I'm sorry, it's utf8_unicode_ci that's confusing me.
So, "UTF-8 is one of the most commonly used encodings. UTF stands for
"Unicode Transformation Format"" UTF8 is, we can say, a type of "unicode",
right? And what about utf8_unicode_ci in mysql?
f8_unicode_ci table. Ok,
the result was that strings were "double encoded". To fix that I simply
removed the utf8_encode() function and put the "raw" data in the database
(that converts them in utf8). In other words, in PHP, I can encode a string
multiple times:
$c = "gior
Ops, i have another update:
string = u"blabla"
This is unicode, ok. Unicode UTF-8?
Thankyou
2010/3/3 Giorgio
> Ok.
>
> So, how do you encode .py files? UTF-8?
>
> 2010/3/3 Dave Angel
>
> Giorgio wrote:
>>
>>>
>>>>
>>>>>
Ok.
So, how do you encode .py files? UTF-8?
2010/3/3 Dave Angel
> Giorgio wrote:
>
>>
>>>
>>>> Depends on your python version. If you use python 2.x, you have to use
>>>> a
>>>>
>>>>
>>> u before the string:
pages? The encoding i choose has to be the same than the
one i choose in the .htaccess file? Or maybe i can send content encoded how
i like more to apache and it re-encodes in the right way all pages?
Thankyou
2010/3/3 Patrick Sabin
> Giorgio wrote:
>
>>
>>Depends on your python ve
in1')
>
Ok, setting it to UTF-8.
> If you don't know the encoding on the way in, reject the input.
>
>
Well, the problem comes, i.e when i'm getting a string from an HTML form
with POST. I don't and can't know the encoding, right? It depends on
browser.
Oh, sorry, let me update my last post:
if i have a string, let's say:
s = "hi giorgio";
and want to store it in a latin1 db, i need to convert it to latin1 before
storing, right?
2010/3/3 Giorgio
>
>>> byte_string = unicode_string.encode('utf-8')
>&g
the
DB.
Do you think i'd better set my db to utf8? I don't need latin1, it's just
the default value.
Thankyou
Giorgio
--
--
AnotherNetFellow
Email: anothernetfel...@gmail.com
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
nd
extract his content in a python script, how can I handle it?
thankyou
Giorgio
--
--
AnotherNetFellow
Email: anothernetfel...@gmail.com
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailma
Alan, i don't know how to use it in this case.
import cgi
form = cgi.FieldStorage()
fileitem = form['file']
fileitem.file.read()
Function dir() lists all functions in a module, i could only use it for
"cgi" O_O.
Thankyou
2010/2/28 Alan Gauld
>
> "Gi
Hi,
today i need some help with the python manual.
I've found this fileupload example
http://webpython.codepoint.net/cgi_file_upload on that site.
It's taking from fileitem attributes like filename and file.
Where is the complete list of those attributes or methods?
Thankyou
--
--
AnotherNet
And, what about more powerful editors? I mean editors with features like
SVN/GIT management and so on.
I use Netbeans, but also know Eclipse/Aptana.
>
--
--
AnotherNetFellow
Email: anothernetfel...@gmail.com
___
Tutor maillist - Tutor@python.org
T
> The editors could be configured differently with respect to the "tab
> button".
> Some may insert tabs some may insert spaces.
>
Ok, found the problem. I'm inserting tabs, but the original file only has
spaces.
Do you think i can look for a function that automatically inserts a certain
number o
>
>
>>
>> Are you sure you're not mixing spaces and tabs?
>
Yes i'm sure. I'm using the "tab button" and the same button works perfectly
in the IDLE editor.
--
--
AnotherNetFellow
Email: anothernetfel...@gmail.com
___
Tutor maillist - Tutor@python.
O_O.
I've downloaded some python examples from my debian server. Then, have
edited one of them with pyscript. The IDLE (the real idle alan :D) was
giving out a "unexpected indent" error, so i've checked again and again the
code -it was ok-.
Then, i've opened it in the IDLE. And there, ONLY there
Yes sorry Alan i've only used the wrong word :D
I know the difference :)
Giorgio
2010/2/23 Alan Gauld
>
> "Giorgio" wrote
>
> Definitely i just use pyscripter because it has the py idle integrated in
>> the window.
>>
>
> PyScripter is an
ry.
But, what about python 2.5 that as you know is the default on linux?
Thankyou
Giorgio
2010/2/23 Hugo Arts
> On Tue, Feb 23, 2010 at 2:28 PM, Giorgio
> wrote:
> > Thankyou Hugo!
> > Ok, so i think the key is of my problem is that when doing X = 0 i'm
> > creatin
Definitely i just use pyscripter because it has the py idle integrated in
the window.
It's very useful!
2010/2/23 Steve Willoughby
> On Tue, Feb 23, 2010 at 05:24:13PM +0100, Giorgio wrote:
> > what text-editor do you use for python?
>
> While the can of worms that parti
Hi All,
what text-editor do you use for python?
I've always used kate/nano on Linux and Notepad++/PSPad on Win. Today i've
installed portablepython to my pendrive, and found pyscripter in that. It's
nice!
Do you think it's a good editor? Do you know o
the same, and is in the global
namespace.
Right?
2010/2/23 Hugo Arts
> On Tue, Feb 23, 2010 at 1:13 PM, Giorgio
> wrote:
> > I have an update:
> > I can easily undertand why this example doesn't work:
> > def nochange(x):
> > x = 0
> > y = 1
> &g
Thankyou.
It's clear, this definitely helps me with the first question. But still
doesn't explain almost anything about the example i've posted in the last
post, right?
Giorgio
2010/2/23 Christian Witts
> Giorgio wrote:
>
>> I have an update:
>>
>>
WHY this works:
def change(some_list):
some_list[1] = 4
x = [1,2,3]
change(x)
print x # Prints out [1,4,3]
some_list is a "local" list, isn't it? Maybe i can't have lists that are
only existing in a function?
Thankyou all
2010/2/22 Kent Johnson
> On Mon, Feb
ove because they are always enabled."
Kent, as i'm learning py, can you please spend some words on nested scopes?
What are them? And why are supported anymore?
And, if i'm not asking you too much: can you plase post an example on how
that function can return HEllo World in py 2.6?
sincos = compose(sin,cos) # Using the wrong version
x = sincos(3)
Won't work. Now, the problem is that the "inner" function gets fun1 and fun2
from other 2 functions.
My question is: why? inner is a sub-function of compose, where fun1 and fun2
are defined.
Giorgio
2010/2/21 Ste
all the Baskets the same empty list as default
contents.". Can you please help me understanding this part?
Thankyou
Giorgio
--
--
AnotherNetFellow
Email: anothernetfel...@gmail.com
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
Hi,
hope this mailing list is still active.
I'm learning phyton. I can write simple programs, and i've studied all
examples provided by the Google App Engine Documentation.
As i understood, i can import a module using something like:
import modulename
Or, import a specific function, using:
fro
37 matches
Mail list logo