malay...@gmail.com wrote:
> вторник, 23 июля 2013 г., 11:25:00 UTC+4 пользователь Peter Otten написал:
>> malay...@gmail.com wrote:
>> For all but the most popular projects a url works wonders. I'm assuming
>> http://grablib.org
> Well, I have read the documentation, I guess the problem lies in
I'm currently learning Python, and I've been focusing on Python3. To try to
kill two birds with one stone, I would also like to learn the basics of
writing small web applications.
These web applications don't need to do much more than provide an interface
to a small database, and they may no
As alex23 already indicated you created a recursive data-structure (by
inserting a reference to the list into the second place of the list) and
the interpreter handles this gracefully by showing [...].
In case you really want to insert the lists members into the second place
you can assign a copy
David M. Cotter, 26.07.2013 08:15:
> in my app i initialize python on the main thread, then immediately call
> PyEval_SaveThread() because i do no further python stuff on the main thread.
>
> then, for each script i want to run, i use boost::threads to create a new
> thread, then on that thread
On 07/25/2013 09:54 AM, MRAB wrote:
On 25/07/2013 14:42, Devyn Collier Johnson wrote:
If I execute a Python3 script with this haspling (#!/usr/bin/python3.3)
and Python3.3 is not installed, but Python3.2 is installed, would the
script still work? Would it fall back to Python3.2?
Why don't you
On 07/25/2013 09:58 AM, Schneider wrote:
Hi,
nice idea.
mybe - for security reasons - you should ensure, that the right tool
is called and not some tool put the path with the same name.
bg,
Johannes
On Thu 25 Jul 2013 03:24:30 PM CEST, Devyn Collier Johnson wrote:
Aloha Python Users!
On 07/25/2013 10:01 AM, Matthew Lefavor wrote:
The answer is "probably not." If you just want to use the latest
version of Python 3 you have installed on your system, use:
"#!/usr/bin/python3". When you use the specific minor version numbers,
they point to that specific minor version.
Actual
On Fri, Jul 26, 2013 at 11:37 AM, Devyn Collier Johnson
wrote:
>
> On 07/25/2013 09:54 AM, MRAB wrote:
>>
>> On 25/07/2013 14:42, Devyn Collier Johnson wrote:
>>>
>>> If I execute a Python3 script with this haspling (#!/usr/bin/python3.3)
>>> and Python3.3 is not installed, but Python3.2 is instal
On 26/07/2013 11:37, Devyn Collier Johnson wrote:
>
> On 07/25/2013 09:54 AM, MRAB wrote:
>> On 25/07/2013 14:42, Devyn Collier Johnson wrote:
>>> If I execute a Python3 script with this haspling (#!/usr/bin/python3.3)
>>> and Python3.3 is not installed, but Python3.2 is installed, would the
>>> s
On 07/25/2013 10:09 AM, Alain Ketterlin wrote:
Devyn Collier Johnson writes:
I made a Python3 module that allows users to use certain Linux
shell commands from Python3 more easily than using os.system(),
subprocess.Popen(), or subprocess.getoutput(). This module (once
placed with the othe
Yeah trying to run virtualenv under IDLE was a desperate move as i couldnt make
anything work under cmd.
Apparently my problem was that i did not have correctly setup the new path..
Solution for me was the following from
"http://forums.udacity.com/questions/100064678/pip-installation-instructi
Le jeudi 25 juillet 2013 22:45:38 UTC+2, Ian a écrit :
> On Thu, Jul 25, 2013 at 12:18 PM, Steven D'Aprano
>
> wrote:
>
> > On Fri, 26 Jul 2013 01:36:07 +1000, Chris Angelico wrote:
>
> >
>
> >> On Fri, Jul 26, 2013 at 1:26 AM, Steven D'Aprano
>
> >> wrote:
>
> >>> On Thu, 25 Jul 2013 14:36
Le vendredi 26 juillet 2013 05:09:34 UTC+2, Michael Torrie a écrit :
> On 07/25/2013 11:18 AM, Steven D'Aprano wrote:
>
> > JMF has explained that it is impossible, impossible I say!, to write an
>
> > editor using a flexible string representation. Since Emacs uses such a
>
> > flexible string
On Thu, Jul 25, 2013 at 7:49 PM, John Ladasky
wrote:
> ===
>
> john@john:~/Desktop/pyglet-1.2alpha1$ sudo python3 setup.py install
>
> [sudo] password for john:
>
> running install
> running build
> running build_py
> running install_lib
> running install_egg_in
Le vendredi 26 juillet 2013 05:20:45 UTC+2, Ian a écrit :
> On Thu, Jul 25, 2013 at 8:48 PM, Steven D'Aprano
>
> wrote:
>
> > UTF-8 uses a flexible representation on a character-by-character basis.
>
> > When parsing UTF-8, one needs to look at EVERY character to decide how
>
> > many bytes yo
On 26/07/2013 11:43, Chris Angelico wrote:
On Fri, Jul 26, 2013 at 11:37 AM, Devyn Collier Johnson
wrote:
On 07/25/2013 09:54 AM, MRAB wrote:
On 25/07/2013 14:42, Devyn Collier Johnson wrote:
If I execute a Python3 script with this haspling (#!/usr/bin/python3.3)
and Python3.3 is not insta
CTSB01 wrote:
> On Thursday, July 25, 2013 3:19:27 PM UTC-4, Dave Angel wrote:
> > On 07/25/2013 12:03 PM, CTSB01 wrote:
> >
> > > I have the following code that runs perfectly:
> >
> >
> > > def psi_j(x, j):
> >
> > >rtn = []
> >
> > >for n2 in range(0, len(x) * j - 2
On Fri, Jul 26, 2013 at 2:53 PM, MRAB wrote:
> If you want to test what would happen if that version wasn't installed,
> set the shebang line to a future version, such as Python 3.4. I doubt
> you have that installed! :-)
Be careful, some people DO have a python3.4 binary :) Go for 3.5 for a
bit
In Rui Maciel writes:
> I'm currently learning Python, and I've been focusing on Python3. To try to
> kill two birds with one stone, I would also like to learn the basics of
> writing small web applications.
> These web applications don't need to do much more than provide an interface
> t
John Ladasky writes:
> On Thursday, July 25, 2013 3:26:01 PM UTC-7, John Ladasky wrote:
>> I'll try again from scratch, and see whether that clears up my problems.
>
> Nope, that didn't work.
>
> ===
>
> john@john:~/Desktop/pyglet-1.2alpha1$ sudo python3 setup.
>
>
> Thanks Matthew Lefavor! But specifically, why use "#!/usr/bin/env python3"
> instead of "#!/usr/bin/python3"?
>
The "env" program looks up its argument in the current $PATH environment
variable, and then executes that. This means you aren't necessarily tied to
/usr/bin/python3. It makes thin
>
> The main point of this is for shell users that are using Python and do
> not know some of the Python commands. This module would make Python more
> like a Linux shell. For instance, a shell user would type boash.uname()
> because they may not know they can type "import platform;
> platform.una
Devyn Collier Johnson wrote:
> Thanks Matthew Lefavor! But specifically, why use "#!/usr/bin/env python3"
> instead of
> "#!/usr/bin/python3"?
>
> Mahalo,
>
> DCJ
I believe this will work on Windows for Python 3.3+ and also with virtualenv.
https://pypi.python.org/pypi/virtualenv
Virtualenv i
Le vendredi 26 juillet 2013 05:20:45 UTC+2, Ian a écrit :
> On Thu, Jul 25, 2013 at 8:48 PM, Steven D'Aprano
>
> wrote:
>
> > UTF-8 uses a flexible representation on a character-by-character basis.
>
> > When parsing UTF-8, one needs to look at EVERY character to decide how
>
> > many bytes yo
does nobody know how to do this?
does nobody know where proper documentation on this is?
--
http://mail.python.org/mailman/listinfo/python-list
okay, i have simplified it: here is the code
==
import time
def main():
while True:
print "i'm alive"
time.sleep(0.25)
#-
if __name__ == "__main__":
main()
===
Works for me.
Except that if I then do:
touch time.py
I get the same error as you do.
Can you figure out the problem now?
On Fri, Jul 26, 2013 at 11:57 AM, David M. Cotter wrote:
> okay, i have simplified it: here is the code
>
> ==
> import time
>
> d
In <965b463e-e5bf-4ccd-9a3c-b0cb964b3...@googlegroups.com> "David M. Cotter"
writes:
> ==
> 9: Traceback (most recent call last):
> 9: File "", line 10, in ?
> 9: File "", line 6, in main
> 9: AttributeError: 'builtin_function_or_method
On 26 July 2013 16:08, Alister wrote:
> >
> > The main point of this is for shell users that are using Python and do
> > not know some of the Python commands. This module would make Python more
> > like a Linux shell. For instance, a shell user would type boash.uname()
> > because they may not kn
no, there is no "time.py" anywhere (except perhaps as the actual python library
originally imported)
did you understand that the function works perfectly, looping as it should, up
until the time i run a second script on a separate thread?
--
http://mail.python.org/mailman/listinfo/python-list
DOH! as my second thread, i had been using a sample script that i had
copy-pasted without much looking at it. guess what? it prints the time. and
yes, it did "from time import time", which explains it all.
thanks for the hints here, that helped me figure it out!
--
http://mail.python.org/mai
David M. Cotter, 26.07.2013 19:28:
> DOH! as my second thread, i had been using a sample script that i had
> copy-pasted without much looking at it. guess what? it prints the time. and
> yes, it did "from time import time", which explains it all.
Ah, and you were using the same globals dict f
Hi,
Can I somehow use pickle.dump() to store a dictionary of lists to a file?
I tried this:
>>> import pickle
>>> mylist = []
>>> mydict = {}
>>> mylist = '1','2'
>>> mydict['3'] = mylist
>>> fhg = open ("test", 'w')
>>> pickle.dump(fhg,mydict)
Traceback (most rece
In cerr
writes:
> Can I somehow use pickle.dump() to store a dictionary of lists to a file?
> I tried this:
> >>> import pickle
> >>> mylist = []
> >>> mydict = {}
> >>> mylist = '1','2'
> >>> mydict['3'] = mylist
> >>> fhg = open ("test", 'w')
> >>> pickle.dump(fhg
cerr wrote:
> Hi,
>
> Can I somehow use pickle.dump() to store a dictionary of lists to a file?
> I tried this:
>
> >>> import pickle
> >>> mylist = []
> >>> mydict = {}
> >>> mylist = '1','2'
> >>> mydict['3'] = mylist
> >>> fhg = open ("test", 'w')
> >>> pickle.dump(
Tim Golden writes:
> Devyn, I'm not a *nix person so someone can point out if I'm wrong,
> but my understanding is that the shebang line (or whatever you want to
> call it) just tells the shell: run this command to run this file. So
> you can put "#!/usr/bin/fish-and-chips" as the first line and
On 07/26/2013 10:14 AM, Chris Angelico wrote:
On Fri, Jul 26, 2013 at 2:53 PM, MRAB wrote:
If you want to test what would happen if that version wasn't installed,
set the shebang line to a future version, such as Python 3.4. I doubt
you have that installed! :-)
Be careful, some people DO have
On Fri, Jul 26, 2013 at 9:21 PM, cerr wrote:
> >>> mylist = []
> >>> mydict = {}
> >>> mylist = '1','2'
Side point: mylist is no longer a list, it's a tuple. I don't think
pickle has problems with tuples, but it's worth noting that
difference.
ChrisA
--
http://mail.python.org/mailm
On Thursday, July 25, 2013 4:49:16 PM UTC-7, John Ladasky wrote:
> On Thursday, July 25, 2013 3:26:01 PM UTC-7, John Ladasky wrote:
>
> > I'll try again from scratch, and see whether that clears up my problems.
>
> Nope, that didn't work.
Thanks to both Jerry and Kushal. You were right, I was d
I'm making progress, but I'm not out of the woods yet.
I'm trying to run some of the programs from the tutorial web pages, and from
the pyglet1.2alpha1/examples directory. I've realized that I will probably
need to run 2to3 on the many of the latter.
The Hello, World example runs.
http://ww
On 07/26/2013 07:21 AM, wxjmfa...@gmail.com wrote:
sys.getsizeof('––') - sys.getsizeof('–')
>
> I have already explained / commented this.
Maybe it got lost in translation, but I don't understand your point with
that.
> Hint: To understand Unicode (and every coding scheme), you should
> und
As requested, some constructive criticism of your module.
On Thu, 25 Jul 2013 09:24:30 -0400, Devyn Collier Johnson wrote:
> #!/usr/bin/python3
> #Made by Devyn Collier Johnson, NCLA, Linux+, LPIC-1, DCTS
What's NCLA, Linux+, LPIC-1, DCTS? Do these mean anything? Are we
supposed to know what th
On Fri, 26 Jul 2013 13:21:47 -0700, cerr wrote:
> or should I just write my own dump function that can hanle thiS?
>
> Please advise!
Given the choice between reading the documentation to pickle.dump:
help(pickle.dump)
or spending the next month writing a replacement for pickle, testing it,
On Thu, 25 Jul 2013 21:20:45 -0600, Ian Kelly wrote:
> On Thu, Jul 25, 2013 at 8:48 PM, Steven D'Aprano
> wrote:
>> UTF-8 uses a flexible representation on a character-by-character basis.
>> When parsing UTF-8, one needs to look at EVERY character to decide how
>> many bytes you need to read. In
Thank you everybody who replied. The problem is fixed now and the program is
running correctly. I will also try to use your suggestions in the future to
make sure I don't make the same mistake. Thanks again :).
--
http://mail.python.org/mailman/listinfo/python-list
On Friday, July 26, 2013 6:19:48 PM UTC-7, John Ladasky wrote:
> I'm making progress, but I'm not out of the woods yet.
And while I appreciate any comments that may appear here, I've just found the
pyglet-users group...
https://groups.google.com/forum/#!forum/pyglet-users
...so that's probably
On Fri, Jul 26, 2013 at 9:37 PM, Steven D'Aprano
wrote:
> See the similarity now? Both flexibly change the width used by code-
> points, UTF-8 based on the code-point itself regardless of the rest of
> the string, Python based on the largest code-point in the string.
No, I think we're just using
On Fri, 26 Jul 2013 22:12:36 -0600, Ian Kelly wrote:
> On Fri, Jul 26, 2013 at 9:37 PM, Steven D'Aprano
> wrote:
>> See the similarity now? Both flexibly change the width used by code-
>> points, UTF-8 based on the code-point itself regardless of the rest of
>> the string, Python based on the lar
Hi,
I got a chance to build an university website, within very short period of time.
I know web2py, little bit of Django, so please suggest me the best to build
rapidly.
Thanks in advance
Raghu
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 26 Jul 2013 08:46:58 -0700, wxjmfauth wrote:
> BTW, I'm pleased to read "sequence of bits" and not bytes. Again, utf
> transformers are producing sequence of bits, call Unicode Transformation
> Units, with lengths of 8/16/32 *bits*, from there the names utf8/16/32.
> UCS transformers are (
50 matches
Mail list logo